diff --git a/tests/libsingle/CMakeLists.txt b/tests/libsingle/CMakeLists.txt index 70902b7..acd9ea9 100644 --- a/tests/libsingle/CMakeLists.txt +++ b/tests/libsingle/CMakeLists.txt @@ -23,9 +23,16 @@ jcm_install_config_file_package( CONFIGURE_PACKAGE_CONFIG_FILES TARGETS libsingle::libsingle) +# Testing jcm_collect_subdirectory_targets: jcm_collect_subdirectory_targets(OUT_VAR targets) -set(expected_targets "libsingle_libsingle;clang-format;clang-format-check") +set(expected_targets "libsingle_libsingle" "clang-format" "clang-format-check") +if(LIBSINGLE_BUILD_DOCS) + list(APPEND expected_targets "doxygen-docs") +endif() +if(LIBSINGLE_BUILD_TESTS) + list(APPEND expected_targets "libsingle-integration-test" "widget-unit-test") +endif() if(NOT targets STREQUAL expected_targets) message(FATAL_ERROR "jcm_collect_subdirectory_targets failed. \n" - "Found targets:\n\t'${targets}'.\n\n Expected targets:\n\t'${targets}'") + "Found targets:\n\t'${targets}'.\n\n Expected targets:\n\t'${expected_targets}'") endif()