From cca2a18edb62bcf86c36b243c6a0433e07b6c964 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 3 Sep 2021 14:00:19 +0200 Subject: [PATCH] Fix C++ build with the interpreter disabled --- CMakeLists.txt | 10 +++++++--- api/sixtyfps-cpp/CMakeLists.txt | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01f782cbe..95ca473c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,15 +23,19 @@ if(SIXTYFPS_BUILD_EXAMPLES) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) endif() add_subdirectory(examples/printerdemo/cpp/) - add_subdirectory(examples/printerdemo/cpp_interpreted/) + if (SIXTYFPS_FEATURE_INTERPRETER) + add_subdirectory(examples/printerdemo/cpp_interpreted/) + endif() add_subdirectory(examples/printerdemo_old/cpp/) add_subdirectory(examples/todo/cpp/) add_subdirectory(examples/gallery/) add_subdirectory(examples/memory/) - add_subdirectory(examples/qt_viewer/) + if (SIXTYFPS_FEATURE_INTERPRETER) + add_subdirectory(examples/qt_viewer/) + endif() # iot-dashboard uses fmtlib via FetchContent and 3.16 has a bug # configuring it (issue #232) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.17.0) + if (SIXTYFPS_FEATURE_INTERPRETER AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.17.0) add_subdirectory(examples/iot-dashboard/) endif() if(BUILD_TESTING) diff --git a/api/sixtyfps-cpp/CMakeLists.txt b/api/sixtyfps-cpp/CMakeLists.txt index eb0bbd785..e0c56f314 100644 --- a/api/sixtyfps-cpp/CMakeLists.txt +++ b/api/sixtyfps-cpp/CMakeLists.txt @@ -232,7 +232,9 @@ if(BUILD_TESTING) endmacro(sixtyfps_test) sixtyfps_test(datastructures) - sixtyfps_test(interpreter) + if(SIXTYFPS_FEATURE_INTERPRETER) + sixtyfps_test(interpreter) + endif() sixtyfps_test(eventloop) target_link_libraries(test_eventloop PRIVATE Threads::Threads) endif()