aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-01-15 16:18:05 +0000
committerSimon Tatham <anakin@pobox.com>2023-01-15 16:18:05 +0000
commit09b16293865301543bd8db9e038b5608c44f2656 (patch)
tree17ade00d9491df37af64620d148456f2995fad60
parent32c487ba577e7da84d32f7e67d98e7e72fd5da70 (diff)
downloadpuzzles-09b16293865301543bd8db9e038b5608c44f2656.zip
puzzles-09b16293865301543bd8db9e038b5608c44f2656.tar.gz
puzzles-09b16293865301543bd8db9e038b5608c44f2656.tar.bz2
puzzles-09b16293865301543bd8db9e038b5608c44f2656.tar.xz
Fix Emscripten cmake setup after fuzzpuzz was added.
The call to cliprogram() doesn't actually add the target 'fuzzpuzz' on that platform, so the subsequent target_include_directories fails. Fix is to condition target_include_directories on the build_cli_programs flag.
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e7992c..226d1e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,6 +278,8 @@ cliprogram(tree234-test tree234.c COMPILE_DEFINITIONS TEST)
write_generated_games_header()
cliprogram(fuzzpuzz fuzzpuzz.c list.c ${puzzle_sources}
COMPILE_DEFINITIONS COMBINED)
-target_include_directories(fuzzpuzz PRIVATE ${generated_include_dir})
+if(build_cli_programs)
+ target_include_directories(fuzzpuzz PRIVATE ${generated_include_dir})
+endif()
build_extras()