Browse Source

Require at least CMake 3.4.

findsdl-include-root
Vladimír Vondruš 7 years ago
parent
commit
7f4da303cb
  1. 11
      CMakeLists.txt
  2. 2
      doc/building.dox
  3. 9
      doc/changelog.dox
  4. 4
      doc/generated/CMakeLists.txt
  5. 4
      package/ci/travis.yml
  6. 1
      src/Magnum/Platform/CMakeLists.txt

11
CMakeLists.txt

@ -23,21 +23,14 @@
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
# #
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.4)
# Configuration fails on < 3.4 if only C++ is enabled (CheckFunctionExists
# macro called from FindX11). Also, Android needs C for compiling some glue
# code.
if(NOT CMAKE_VERSION VERSION_LESS 3.4.0 AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
set(LANG CXX)
endif()
option(HUNTER_ENABLED "Get dependencies (Corrade, GLFW, SDL2, ...) via Hunter" OFF) option(HUNTER_ENABLED "Get dependencies (Corrade, GLFW, SDL2, ...) via Hunter" OFF)
if(HUNTER_ENABLED) if(HUNTER_ENABLED)
include(${CMAKE_CURRENT_LIST_DIR}/package/hunter/HunterInit.cmake) include(${CMAKE_CURRENT_LIST_DIR}/package/hunter/HunterInit.cmake)
endif() endif()
project(Magnum ${LANG}) project(Magnum CXX)
if(HUNTER_ENABLED) if(HUNTER_ENABLED)
include(${CMAKE_CURRENT_LIST_DIR}/package/hunter/HunterAddPackages.cmake) include(${CMAKE_CURRENT_LIST_DIR}/package/hunter/HunterAddPackages.cmake)

2
doc/building.dox

@ -40,7 +40,7 @@ Minimal set of tools and libraries required for building is:
- C++ compiler with good C++11 support. Compilers which are tested to have - C++ compiler with good C++11 support. Compilers which are tested to have
everything needed are **GCC** >= 4.8.1, **Clang** >= 3.3 and **MSVC** everything needed are **GCC** >= 4.8.1, **Clang** >= 3.3 and **MSVC**
>= 2015. On Windows you can also use **MinGW-w64**. >= 2015. On Windows you can also use **MinGW-w64**.
- **CMake** >= 3.1 - **CMake** >= 3.4
- **Corrade** --- Plugin management and utility library. See - **Corrade** --- Plugin management and utility library. See
@ref building-corrade "Corrade download and installation guide" for more @ref building-corrade "Corrade download and installation guide" for more
information. information.

9
doc/changelog.dox

@ -38,6 +38,15 @@ See also:
@section changelog-latest Changes since 2019.01 @section changelog-latest Changes since 2019.01
@subsection changelog-latest-dependencies Dependency changes
- Minimal supported CMake version is now 3.4. Older versions are not
supported anymore and all workarounds for them were removed. Download a
prebuilt release of a newer version if you need to use Corrade on older
systems (such as Ubuntu 14.04 or Debian 8). This is a conservative change
that shouldn't affect any additional distribution compared to the CMake 3.1
requirement in 2019.01.
@subsection changelog-latest-new New features @subsection changelog-latest-new New features
- MSVC 2019 compatibility, with slightly less workarounds needed compared to - MSVC 2019 compatibility, with slightly less workarounds needed compared to

4
doc/generated/CMakeLists.txt

@ -23,9 +23,9 @@
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
# #
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.4)
project(MagnumDocumentationImageGenerator) project(MagnumDocumentationImageGenerator CXX)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../modules/" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../modules/" ${CMAKE_MODULE_PATH})

4
package/ci/travis.yml

@ -212,12 +212,12 @@ install:
- if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then export PLATFORM_GL_API=GLX; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && ( [ "$TARGET" == "desktop" ] || [ "$TARGET" == "desktop-sanitizers" ] ); then export PLATFORM_GL_API=GLX; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then export PLATFORM_GL_API=EGL; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "desktop-gles" ]; then export PLATFORM_GL_API=EGL; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ]; then wget -nc https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && unzip -q android-*.zip; fi
# Download CMake 3.1.3 to ensure we're still compatible with it (Travis has # Download CMake 3.4.3 to ensure we're still compatible with it (Travis has
# 3.9 since December 2017). Also, the PATH setting can't be cached, so it's # 3.9 since December 2017). Also, the PATH setting can't be cached, so it's
# separate (bit me two times already). Android needs CMake 3.7, but # separate (bit me two times already). Android needs CMake 3.7, but
# https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so # https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so
# grab that. FindVulkan is since 3.7, in that case just use the system package. # grab that. FindVulkan is since 3.7, in that case just use the system package.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.1.3-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.4.3-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.2-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.9.2-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TARGET" == "android" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.2-Linux-x86_64.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-3.9.2-Linux-x86_64.tar.gz && cd $TRAVIS_BUILD_DIR ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PATH=$HOME/cmake/bin:$PATH && cmake --version; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; fi

1
src/Magnum/Platform/CMakeLists.txt

@ -144,6 +144,7 @@ if(WITH_ANDROIDAPPLICATION)
set(MagnumAndroidApplication_PRIVATE_HEADERS set(MagnumAndroidApplication_PRIVATE_HEADERS
Implementation/Egl.h) Implementation/Egl.h)
enable_language(C)
add_library(MagnumAndroidApplicationGlue OBJECT add_library(MagnumAndroidApplicationGlue OBJECT
"${CMAKE_ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c") "${CMAKE_ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c")
set_target_properties(MagnumAndroidApplicationGlue PROPERTIES set_target_properties(MagnumAndroidApplicationGlue PROPERTIES

Loading…
Cancel
Save