CMakeLists backwards compatibility (#2607)
use version checks supported on older cmakes use atleast 3.11 FindBoost.cmake as import targets are not properly exposed on previous versions
This commit is contained in:
parent
bac78d0273
commit
81d92057d5
2 changed files with 2106 additions and 2 deletions
|
@ -1,13 +1,19 @@
|
|||
cmake_minimum_required (VERSION 3.4)
|
||||
|
||||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.12 OR CMAKE_VERSION VERSION_EQUAL 3.12)
|
||||
#find_package uses <PACKAGENAME>_ROOT variables
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
|
||||
if (CMAKE_VERSION VERSION_GREATER 3.13 OR CMAKE_VERSION VERSION_EQUAL 3.13)
|
||||
#option honors normal variables
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS 3.11)
|
||||
# compatibility for boost import targets use bundled 3.11 FindBoost.cmake
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/legacyModules")
|
||||
endif ()
|
||||
|
||||
# compatibility for osx sierra and on
|
||||
# needs to be set before project
|
||||
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "")
|
||||
|
|
2098
cmake/legacyModules/FindBoost.cmake
Normal file
2098
cmake/legacyModules/FindBoost.cmake
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue