From 09b16293865301543bd8db9e038b5608c44f2656 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 15 Jan 2023 16:18:05 +0000 Subject: [PATCH] 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. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()