diff --git a/CMakeLists.txt b/CMakeLists.txt index c5de064a54a..a68b788d68e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,18 +6,7 @@ SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR}) SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR}) -IF(COMMAND CMAKE_POLICY) - CMAKE_POLICY(SET CMP0005 NEW) - CMAKE_POLICY(SET CMP0003 NEW) - IF (CMAKE_MAJOR_VERSION GREATER 2) - CMAKE_POLICY(SET CMP0026 NEW) - CMAKE_POLICY(SET CMP0045 NEW) - CMAKE_POLICY(SET CMP0050 OLD) - ENDIF() - CMAKE_POLICY(SET CMP0020 NEW) - CMAKE_POLICY(SET CMP0057 NEW) -ENDIF(COMMAND CMAKE_POLICY) - +# CMAKE_POLICY Section # Import of windows.h breaks min()/max() ADD_DEFINITIONS(-DNOMINMAX) diff --git a/cmake/modules/DefineInstallVar.cmake b/cmake/modules/DefineInstallVar.cmake index b13cb1d52b3..0ca8fa429e6 100644 --- a/cmake/modules/DefineInstallVar.cmake +++ b/cmake/modules/DefineInstallVar.cmake @@ -24,7 +24,7 @@ function(DEFINE_INSTALL_VAR) endif() else() if(VAR_GENERATOR_EXPRESSION) - cmake_policy(SET CMP0087 NEW) + cmake_policy(SET CMP0087 NEW) # install(CODE) and install(SCRIPT) support generator expressions. endif() install(CODE "set(\"${VAR_NAME}\" \"${VAR_CONTENT}\")") endif() diff --git a/cmake/modules/InstallDependencies.cmake b/cmake/modules/InstallDependencies.cmake index 791041bb24a..167a93f351f 100644 --- a/cmake/modules/InstallDependencies.cmake +++ b/cmake/modules/InstallDependencies.cmake @@ -1,8 +1,8 @@ include(GetPrerequisites) include(CMakeParseArguments) -CMAKE_POLICY(SET CMP0011 NEW) -CMAKE_POLICY(SET CMP0057 NEW) +# Project's cmake_minimum_required doesn't always propagate +cmake_policy(SET CMP0057 NEW) # Support new if() IN_LIST operator. function(make_absolute var) get_filename_component(abs "${${var}}" ABSOLUTE BASE_DIR "${CMAKE_INSTALL_PREFIX}") diff --git a/plugins/CarlaBase/CMakeLists.txt b/plugins/CarlaBase/CMakeLists.txt index d4f7939c9b5..8f9e14dd101 100644 --- a/plugins/CarlaBase/CMakeLists.txt +++ b/plugins/CarlaBase/CMakeLists.txt @@ -1,11 +1,3 @@ -# For MacOS, use "OLD" RPATH install_name behavior -# This can be changed to "NEW" safely if install_apple.sh.in -# is updated to relink libcarlabase.dylib. MacOS 10.8 uses -# cmake 3.9.6, so this can be done at any time. -IF(NOT CMAKE_VERSION VERSION_LESS 3.9) - CMAKE_POLICY(SET CMP0068 OLD) -ENDIF() - # If Carla was not provided by the system, make a dummy library instead if(LMMS_HAVE_WEAKCARLA) SET(CARLA_INCLUDE_DIRS