diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2913dccfb..a7958cbd0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -104,8 +104,12 @@ endif() # Test the generated build configs ############################################################################# -add_subdirectory(cmake_import) -add_subdirectory(cmake_import_minver) +# these tests depend on the generated file nlohmann_jsonConfig.cmake +if (JSON_Install) + add_subdirectory(cmake_import) + add_subdirectory(cmake_import_minver) +endif() + add_subdirectory(cmake_add_subdirectory) add_subdirectory(cmake_fetch_content) add_subdirectory(cmake_target_include_directories)