Fix C++ build with the interpreter disabled

This commit is contained in:
Simon Hausmann 2021-09-03 14:00:19 +02:00 committed by Simon Hausmann
parent 5a81976f3b
commit cca2a18edb
2 changed files with 10 additions and 4 deletions

View file

@ -23,15 +23,19 @@ if(SIXTYFPS_BUILD_EXAMPLES)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
endif()
add_subdirectory(examples/printerdemo/cpp/)
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/)
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)

View file

@ -232,7 +232,9 @@ if(BUILD_TESTING)
endmacro(sixtyfps_test)
sixtyfps_test(datastructures)
if(SIXTYFPS_FEATURE_INTERPRETER)
sixtyfps_test(interpreter)
endif()
sixtyfps_test(eventloop)
target_link_libraries(test_eventloop PRIVATE Threads::Threads)
endif()