diff --git a/CMakeLists.txt b/CMakeLists.txt index e92954852d..86b108b327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -296,9 +296,16 @@ else() endif() endif() +add_subdirectory(ext) +install(TARGETS ext-hwloc EXPORT arbor-targets) +install(TARGETS ext-random123 EXPORT arbor-targets) +target_link_libraries(arbor-public-deps INTERFACE ext-units) +install(TARGETS compile_flags_target EXPORT arbor-targets) + add_library(ext-units INTERFACE) if(ARB_USE_BUNDLED_UNITS) target_link_libraries(ext-units INTERFACE units::units) + install(TARGETS ext-units units EXPORT arbor-targets) else() find_package(units REQUIRED) target_link_directories(ext-units INTERFACE ${units_LIBRARY_DIRS}) @@ -306,14 +313,6 @@ else() target_include_directories(ext-units INTERFACE ${units_INCLUDE_DIR}) endif() - -add_subdirectory(ext) -install(TARGETS ext-hwloc EXPORT arbor-targets) -install(TARGETS ext-random123 EXPORT arbor-targets) -target_link_libraries(arbor-public-deps INTERFACE ext-units) -install(TARGETS ext-units EXPORT arbor-targets) -install(TARGETS units compile_flags_target EXPORT arbor-targets) - # Keep track of packages we need to add to the generated CMake config # file for arbor. diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index 009a5bc223..42180c3990 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -126,7 +126,7 @@ if (ARB_USE_BUNDLED_UNITS) set(UNITS_BUILD_CONVERTER_APP OFF CACHE INTERNAL "") set(UNITS_BUILD_WEBSERVER OFF CACHE INTERNAL "") set(UNITS_INSTALL ON CACHE INTERNAL "") - # set(UNITS_NAMESPACE "llnl::units" CACHE INTERNAL "") + set(UNITS_BINARY_ONLY_INSTALL ON CACHE INTERNAL "") add_subdirectory("${PROJECT_SOURCE_DIR}/ext/units" "${PROJECT_BINARY_DIR}/ext/units")