mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Support earlier versions of CMake.
At least, for the Unix build, so as to support Debian stable and a couple of prior Ubuntu LTSes. Not much needed to change in the cmake scripts; the only noticeable difference was that the 'install' command needs an explicit RUNTIME DESTINATION.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
project(puzzles
|
project(puzzles
|
||||||
LANGUAGES C)
|
LANGUAGES C)
|
||||||
|
@ -66,7 +66,16 @@ endfunction()
|
|||||||
function(set_platform_puzzle_target_properties NAME TARGET)
|
function(set_platform_puzzle_target_properties NAME TARGET)
|
||||||
set_target_properties(${TARGET} PROPERTIES
|
set_target_properties(${TARGET} PROPERTIES
|
||||||
OUTPUT_NAME ${NAME_PREFIX}${NAME})
|
OUTPUT_NAME ${NAME_PREFIX}${NAME})
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.14)
|
||||||
|
# CMake 3.13 and earlier required an explicit install destination.
|
||||||
|
install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
|
||||||
|
else()
|
||||||
|
# 3.14 and above selects a sensible default, which we should avoid
|
||||||
|
# overriding here so that end users can override it using
|
||||||
|
# CMAKE_INSTALL_BINDIR.
|
||||||
install(TARGETS ${TARGET})
|
install(TARGETS ${TARGET})
|
||||||
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(build_platform_extras)
|
function(build_platform_extras)
|
||||||
|
Reference in New Issue
Block a user