ref: 09b16293865301543bd8db9e038b5608c44f2656
parent: 32c487ba577e7da84d32f7e67d98e7e72fd5da70
author: Simon Tatham <[email protected]>
date: Sun Jan 15 11:18:05 EST 2023
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.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,6 +278,8 @@
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()