Browse Source

Drop CMake 2.8.12 support.

simd
Vladimír Vondruš 8 years ago
parent
commit
b31eea37e4
  1. 20
      CMakeLists.txt
  2. 2
      doc/building.dox
  3. 4
      doc/changelog.dox
  4. 3
      doc/generated/CMakeLists.txt
  5. 2
      doc/getting-started.dox
  6. 3
      modules/FindEGL.cmake
  7. 18
      modules/FindGLFW.cmake
  8. 3
      modules/FindOpenGLES2.cmake
  9. 3
      modules/FindOpenGLES3.cmake
  10. 21
      modules/FindSDL2.cmake
  11. 14
      package/ci/travis.yml
  12. 2
      package/debian/control

20
CMakeLists.txt

@ -23,25 +23,7 @@
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
# #
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.1)
# CMake policies. 0025 needs to be before project(), so putting all there.
# Use AppleClang instead of Clang on Apple
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif()
# Don't treat imported targets with :: as files
if(POLICY CMP0028)
cmake_policy(SET CMP0028 NEW)
endif()
# Enable MACOSX_RPATH by default
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
# Quoted variables should not be dereferenced
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
# Configuration fails on < 3.4 if only C++ is enabled (CheckFunctionExists # Configuration fails on < 3.4 if only C++ is enabled (CheckFunctionExists
# macro called from FindX11). Also, Android needs C for compiling some glue # macro called from FindX11). Also, Android needs C for compiling some glue

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** >= 2.8.12 - **CMake** >= 3.1
- **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.

4
doc/changelog.dox

@ -43,6 +43,10 @@ See also:
- Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported - Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported
anymore. Minimal Clang version is now 3.3, since that's the first version anymore. Minimal Clang version is now 3.3, since that's the first version
with a complete C++11 support. with a complete C++11 support.
- Minimal supported CMake version is now 3.1. 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).
@subsection changelog-latest-new New features @subsection changelog-latest-new New features

3
doc/generated/CMakeLists.txt

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

2
doc/getting-started.dox

@ -70,7 +70,7 @@ these two new subdirectories using @cmake add_subdirectory() @ce so the file
looks like this: looks like this:
@code{.cmake} @code{.cmake}
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.1)
project(MyApplication) project(MyApplication)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/modules/")

3
modules/FindEGL.cmake

@ -77,9 +77,6 @@ if(NOT TARGET EGL::EGL)
IMPORTED_LOCATION ${EGL_LIBRARY}) IMPORTED_LOCATION ${EGL_LIBRARY})
endif() endif()
else() else()
# This won't work in CMake 2.8.12, but that affects Emscripten only so
# I assume people building for that are not on that crap old Ubuntu
# 14.04 LTS
add_library(EGL::EGL INTERFACE IMPORTED) add_library(EGL::EGL INTERFACE IMPORTED)
endif() endif()

18
modules/FindGLFW.cmake

@ -78,23 +78,7 @@ find_package_handle_standard_args("GLFW" DEFAULT_MSG
GLFW_INCLUDE_DIR) GLFW_INCLUDE_DIR)
if(NOT TARGET GLFW::GLFW) if(NOT TARGET GLFW::GLFW)
# CMake 3.0 doesn't propagate the local target as dependency upwards add_library(GLFW::GLFW UNKNOWN IMPORTED)
# the tree and then complains that GLFW::GLFW target was not found,
# which it shouldn't. This is reproducible with the base bootstrap
# project *and* when using Magnum as CMake subproject. Works with both
# 2.8.12 and 3.1, so I'm assuming this is a CMake 3.0 bug. The
# workaround is to make the target GLOBAL so it's propagated upwards
# the tree unconditionally. For some reason, UNKNOWN targets can't be
# marked as GLOBAL, so I'm biting the bullet and saying the library is
# shared -- CMake 3.0 is only on Debian Jessie now and I'm assuming GLFW
# comes from system package, which *should be* shared. Hopefully this won't
# bite back in the future.
if(CMAKE_VERSION VERSION_GREATER "2.8.12.2" AND CMAKE_VERSION VERSION_LESS "3.1.0")
set(_GLFW_IMPORTED_LIBRARY_KIND SHARED IMPORTED GLOBAL)
else()
set(_GLFW_IMPORTED_LIBRARY_KIND UNKNOWN IMPORTED)
endif()
add_library(GLFW::GLFW ${_GLFW_IMPORTED_LIBRARY_KIND})
# Work around BUGGY framework support on macOS # Work around BUGGY framework support on macOS
# https://cmake.org/Bug/view.php?id=14105 # https://cmake.org/Bug/view.php?id=14105

3
modules/FindOpenGLES2.cmake

@ -78,9 +78,6 @@ if(NOT TARGET OpenGLES2::OpenGLES2)
IMPORTED_LOCATION ${OPENGLES2_LIBRARY}) IMPORTED_LOCATION ${OPENGLES2_LIBRARY})
endif() endif()
else() else()
# This won't work in CMake 2.8.12, but that affects Emscripten only so
# I assume people building for that are not on that crap old Ubuntu
# 14.04 LTS
add_library(OpenGLES2::OpenGLES2 INTERFACE IMPORTED) add_library(OpenGLES2::OpenGLES2 INTERFACE IMPORTED)
endif() endif()

3
modules/FindOpenGLES3.cmake

@ -82,9 +82,6 @@ if(NOT TARGET OpenGLES3::OpenGLES3)
IMPORTED_LOCATION ${OPENGLES3_LIBRARY}) IMPORTED_LOCATION ${OPENGLES3_LIBRARY})
endif() endif()
else() else()
# This won't work in CMake 2.8.12, but that affects Emscripten only so
# I assume people building for that are not on that crap old Ubuntu
# 14.04 LTS
add_library(OpenGLES3::OpenGLES3 INTERFACE IMPORTED) add_library(OpenGLES3::OpenGLES3 INTERFACE IMPORTED)
endif() endif()

21
modules/FindSDL2.cmake

@ -112,23 +112,7 @@ find_package_handle_standard_args("SDL2" DEFAULT_MSG
if(NOT TARGET SDL2::SDL2) if(NOT TARGET SDL2::SDL2)
if(SDL2_LIBRARY_NEEDED) if(SDL2_LIBRARY_NEEDED)
# CMake 3.0 doesn't propagate the local target as dependency upwards add_library(SDL2::SDL2 UNKNOWN IMPORTED)
# the tree and then complains that SDL2::SDL2 target was not found,
# which it shouldn't. This is reproducible with the base bootstrap
# project *and* when using Magnum as CMake subproject. Works with both
# 2.8.12 and 3.1, so I'm assuming this is a CMake 3.0 bug. The
# workaround is to make the target GLOBAL so it's propagated upwards
# the tree unconditionally. For some reason, UNKNOWN targets can't be
# marked as GLOBAL, so I'm biting the bullet and saying the library is
# shared -- CMake 3.0 is only on Debian Jessie now and I'm assuming SDL
# comes from system libsdl2-dev package, which *is* shared. Hopefully
# this won't bite back in the future.
if(CMAKE_VERSION VERSION_GREATER "2.8.12.2" AND CMAKE_VERSION VERSION_LESS "3.1.0")
set(_SDL2_IMPORTED_LIBRARY_KIND SHARED IMPORTED GLOBAL)
else()
set(_SDL2_IMPORTED_LIBRARY_KIND UNKNOWN IMPORTED)
endif()
add_library(SDL2::SDL2 ${_SDL2_IMPORTED_LIBRARY_KIND})
# Work around BUGGY framework support on macOS # Work around BUGGY framework support on macOS
# https://cmake.org/Bug/view.php?id=14105 # https://cmake.org/Bug/view.php?id=14105
@ -169,9 +153,6 @@ if(NOT TARGET SDL2::SDL2)
INTERFACE_LINK_LIBRARIES EGL::EGL) INTERFACE_LINK_LIBRARIES EGL::EGL)
endif() endif()
else() else()
# This won't work in CMake 2.8.12, but that affects Emscripten only so
# I assume people building for that are not on that crap old Ubuntu
# 14.04 LTS
add_library(SDL2::SDL2 INTERFACE IMPORTED) add_library(SDL2::SDL2 INTERFACE IMPORTED)
endif() endif()

14
package/ci/travis.yml

@ -7,7 +7,6 @@ addons:
- g++-4.8 - g++-4.8
- ninja-build - ninja-build
- lcov - lcov
- "libc6:i386" # CMake 2.8.12 is 32bit
- libsdl2-dev - libsdl2-dev
- freeglut3-dev - freeglut3-dev
- libopenal-dev - libopenal-dev
@ -190,15 +189,14 @@ install:
- if [ "$WITH_GLUTAPPLICATION" != "ON" ]; then export WITH_GLUTAPPLICATION=OFF; fi - if [ "$WITH_GLUTAPPLICATION" != "ON" ]; then export WITH_GLUTAPPLICATION=OFF; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PLATFORM_GL_API=GLX; fi - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! "$TARGET" == "desktop-vulkan" ]; then export PLATFORM_GL_API=GLX; 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 2.8.12 to ensure we're still compatible with it (Travis has # Download CMake 3.1.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). ASan doesn't like when 32bit libraries # separate (bit me two times already). Android needs CMake 3.7, but
# are running, so for it we use the preinstalled CMake. Android needs CMake # https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in 3.9.2, so
# 3.7, but https://gitlab.kitware.com/cmake/cmake/issues/17253 is fixed in # grab that. FindVulkan is since 3.7, in that case just use the system package.
# 3.9.2, so grab that. - 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-sanitizers" ] && [ ! "$TARGET" == "android" ] && [ ! "$TARGET" == "desktop-vulkan" ] && [ ! -e "$HOME/cmake/bin" ]; then cd $HOME ; wget -nc --no-check-certificate https://cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz && mkdir -p cmake && cd cmake && tar --strip-components=1 -xzf ../cmake-2.8.12.2-Linux-i386.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" ] && [ ! "$TARGET" == "desktop-sanitizers" ]; 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
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi - if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi - if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "$TARGET" == "desktop" ]; then export PLATFORM_GL_API=CGL; fi

2
package/debian/control vendored

@ -1,7 +1,7 @@
Source: magnum Source: magnum
Priority: optional Priority: optional
Maintainer: Vladimír Vondruš <mosra@centrum.cz> Maintainer: Vladimír Vondruš <mosra@centrum.cz>
Build-Depends: debhelper (>= 9), cmake (>= 2.8.12), corrade-dev, libgl-dev, libopenal-dev, libsdl2-dev Build-Depends: debhelper (>= 9), cmake (>= 3.1), corrade-dev, libgl-dev, libopenal-dev, libsdl2-dev
Standards-Version: 3.9.2 Standards-Version: 3.9.2
Section: libs Section: libs
Homepage: https://magnum.graphics Homepage: https://magnum.graphics

Loading…
Cancel
Save