diff --git a/CMakeLists.txt b/CMakeLists.txt index d90e1341..c8828ad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,14 @@ SET(CMAKE_POLICY_VERSION_MINIMUM 3.5) # libzmq must be made available BEFORE sls_detector_package for the override above to take effect. FetchContent_MakeAvailable(libzmq) -FetchContent_MakeAvailable(zstd sls_detector_package catch2 hdf5 spdlog httplib) +IF (JFJOCH_VIEWER_ONLY) + # A viewer-only build still needs zstd/hdf5/spdlog/httplib (JFJochReader uses httplib). + # Only sls_detector_package (detector) and catch2 (tests) are not built here -- and sls + # in particular does not configure under MSVC -- so skip just those two. + FetchContent_MakeAvailable(zstd hdf5 spdlog httplib) +ELSE() + FetchContent_MakeAvailable(zstd sls_detector_package catch2 hdf5 spdlog httplib) +ENDIF() IF (JFJOCH_VIEWER_ONLY) # Minimal subtree: jfjoch_viewer and only the libraries it transitively links.