aboutsummaryrefslogtreecommitdiff
path: root/cmake/platforms
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-05-23 10:01:06 +0100
committerSimon Tatham <anakin@pobox.com>2021-05-25 10:45:40 +0100
commitd5b53853aad6c3bbfe255c063c045e7986de33ad (patch)
tree3bbc687c667fb1b3ceb196d3312e1690c603b92d /cmake/platforms
parentb54702168b5c0759604302f198d85bc28af40feb (diff)
downloadpuzzles-d5b53853aad6c3bbfe255c063c045e7986de33ad.zip
puzzles-d5b53853aad6c3bbfe255c063c045e7986de33ad.tar.gz
puzzles-d5b53853aad6c3bbfe255c063c045e7986de33ad.tar.bz2
puzzles-d5b53853aad6c3bbfe255c063c045e7986de33ad.tar.xz
Permit building GUI helper tools.
These look like puzzles, in that they link against a frontend and provide the usual 'struct game', but they don't count as a puzzle for purposes of shipping, or even having to have descriptions and icons. There's one of these buried in the code already under an ifdef, which I'll re-enable in the next commit.
Diffstat (limited to 'cmake/platforms')
-rw-r--r--cmake/platforms/emscripten.cmake4
-rw-r--r--cmake/platforms/nestedvm.cmake5
-rw-r--r--cmake/platforms/osx.cmake5
-rw-r--r--cmake/platforms/unix.cmake3
-rw-r--r--cmake/platforms/windows.cmake5
5 files changed, 20 insertions, 2 deletions
diff --git a/cmake/platforms/emscripten.cmake b/cmake/platforms/emscripten.cmake
index c7e55fe..5673ebe 100644
--- a/cmake/platforms/emscripten.cmake
+++ b/cmake/platforms/emscripten.cmake
@@ -35,11 +35,15 @@ set(CMAKE_C_LINK_FLAGS "\
-s EXTRA_EXPORTED_RUNTIME_METHODS='[cwrap,callMain]'")
set(build_cli_programs FALSE)
+set(build_gui_programs FALSE)
function(get_platform_puzzle_extra_source_files OUTVAR NAME)
set(${OUTVAR} PARENT_SCOPE)
endfunction()
+function(set_platform_gui_target_properties TARGET)
+endfunction()
+
function(set_platform_puzzle_target_properties NAME TARGET)
em_link_pre_js(${TARGET} ${CMAKE_SOURCE_DIR}/emccpre.js)
em_link_js_library(${TARGET} ${CMAKE_SOURCE_DIR}/emcclib.js)
diff --git a/cmake/platforms/nestedvm.cmake b/cmake/platforms/nestedvm.cmake
index 6862896..3f768a4 100644
--- a/cmake/platforms/nestedvm.cmake
+++ b/cmake/platforms/nestedvm.cmake
@@ -15,7 +15,7 @@ function(get_platform_puzzle_extra_source_files OUTVAR NAME)
set(${OUTVAR} PARENT_SCOPE)
endfunction()
-function(set_platform_puzzle_target_properties NAME TARGET)
+function(set_platform_gui_target_properties TARGET)
set(build_subdir ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-tmp)
add_custom_command(OUTPUT ${build_subdir}
@@ -56,5 +56,8 @@ function(set_platform_puzzle_target_properties NAME TARGET)
${build_subdir}/PuzzleEngine.class)
endfunction()
+function(set_platform_puzzle_target_properties NAME TARGET)
+endfunction()
+
function(build_platform_extras)
endfunction()
diff --git a/cmake/platforms/osx.cmake b/cmake/platforms/osx.cmake
index 4577a73..2e95d4b 100644
--- a/cmake/platforms/osx.cmake
+++ b/cmake/platforms/osx.cmake
@@ -6,10 +6,15 @@ set(CPACK_DMG_VOLUME_NAME "Simon Tatham's Puzzle Collection")
include(CPack)
set(build_individual_puzzles FALSE)
+set(build_gui_programs FALSE) # they don't really fit in the OS X GUI model
+
function(get_platform_puzzle_extra_source_files OUTVAR NAME)
set(${OUTVAR} PARENT_SCOPE)
endfunction()
+function(set_platform_gui_target_properties TARGET)
+endfunction()
+
function(set_platform_puzzle_target_properties NAME TARGET)
endfunction()
diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake
index 26d2e97..09eed6a 100644
--- a/cmake/platforms/unix.cmake
+++ b/cmake/platforms/unix.cmake
@@ -75,6 +75,9 @@ function(get_platform_puzzle_extra_source_files OUTVAR NAME)
set(${OUTVAR} ${c_icon_file} PARENT_SCOPE)
endfunction()
+function(set_platform_gui_target_properties TARGET)
+endfunction()
+
function(set_platform_puzzle_target_properties NAME TARGET)
get_target_property(official ${TARGET} official)
get_target_property(exename ${TARGET} exename)
diff --git a/cmake/platforms/windows.cmake b/cmake/platforms/windows.cmake
index 377b05d..d4b9092 100644
--- a/cmake/platforms/windows.cmake
+++ b/cmake/platforms/windows.cmake
@@ -37,11 +37,14 @@ function(get_platform_puzzle_extra_source_files OUTVAR NAME)
set(${OUTVAR} ${CMAKE_SOURCE_DIR}/puzzles.rc PARENT_SCOPE)
endfunction()
+function(set_platform_gui_target_properties TARGET)
+ set_target_properties(${TARGET} PROPERTIES WIN32_EXECUTABLE ON)
+endfunction()
+
function(set_platform_puzzle_target_properties NAME TARGET)
if(DEFINED ICO_DIR AND EXISTS ${ICO_DIR}/${NAME}.ico)
target_compile_definitions(${TARGET} PRIVATE ICON_FILE=\"${ICO_DIR}/${NAME}.ico\")
endif()
- set_target_properties(${TARGET} PROPERTIES WIN32_EXECUTABLE ON)
endfunction()
function(build_platform_extras)