Skip to content

Commit

Permalink
Simplify CMake Policies
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed Jul 31, 2023
1 parent 57e7fdc commit 75f3014
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ 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(SET CMP0005 NEW) # Preprocessor definition values are now escaped automatically
CMAKE_POLICY(SET CMP0003 NEW) # Libraries linked via full path no longer produce linker search paths.
CMAKE_POLICY(SET CMP0026 NEW) # Disallow use of the LOCATION property for build targets.
CMAKE_POLICY(SET CMP0045 NEW) # Error on non-existent target in get_target_property.
CMAKE_POLICY(SET CMP0050 OLD) # Disallow add_custom_command SOURCE signatures.
CMAKE_POLICY(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows.
CMAKE_POLICY(SET CMP0057 NEW) # Support new if() IN_LIST operator.


# Import of windows.h breaks min()/max()
Expand Down

0 comments on commit 75f3014

Please sign in to comment.