diff --git a/CMakeLists.txt b/CMakeLists.txt index c52b5a3d..828d2d57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,9 +26,16 @@ INCLUDE(GNUInstallDirs) ####### local cmake modules ####### SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules") -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() +# Policy CMP0043 introduced in cmake version 3.0 IGNORES the use of COMPILE_DEFINITIONS suffixed variables, e.g. COMPILE_DEFINITIONS_DEBUG +# Set to OLD behavior until minimum cmake version >= 2.8.10 (version that COMPILE_DEFINITIONS can be set by generator expressions instead) +if (POLICY CMP0043) + cmake_policy(SET CMP0043 OLD) +endif (POLICY CMP0043) +# Policy CMP0042 introduced in cmake version 3.0 enables the use of @rpath in an install name via MACOSX_RPATH by default +# Set to OLD behavior so that all versions use the same behavior, or until minimum cmake version >= 2.8.12 (version where @rpath is available) +if (POLICY CMP0042) + cmake_policy(SET CMP0042 OLD) +endif (POLICY CMP0042) ####################### # VERSION