diff --git a/CMakeLists.txt b/CMakeLists.txt index f8b630d06..0998bb781 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ set( CMAKE_BUILD_RPATH # the RPATH to be used when installing, but only if it's not a system directory list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib64:${CMAKE_INSTALL_PREFIX}/lib") endif("${isSystemDir}" STREQUAL "-1") # Setting the include directory for the application to find config.h @@ -131,9 +131,16 @@ pkg_check_modules(UUID REQUIRED IMPORTED_TARGET uuid) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) -find_package(Boost 1.66 REQUIRED COMPONENTS +find_package(Boost CONFIG 1.66 COMPONENTS graph - ) +) +# if the upstream boost cmake config is not found, fall back +# TODO: remove this when we require 1.70+ +if (NOT Boost_FOUND) + find_package(Boost 1.66 REQUIRED COMPONENTS + graph + ) +endif () message(STATUS "Boost version: ${Boost_VERSION}") # Install paths diff --git a/cmake/FindFluxCore.cmake b/cmake/FindFluxCore.cmake index 8cae18c66..7c5703148 100644 --- a/cmake/FindFluxCore.cmake +++ b/cmake/FindFluxCore.cmake @@ -5,7 +5,7 @@ else() if(FLUX) get_filename_component(EXTRA_FLUX_CORE_PREFIX_BIN ${FLUX} DIRECTORY) get_filename_component(EXTRA_FLUX_CORE_PREFIX ${EXTRA_FLUX_CORE_PREFIX_BIN} DIRECTORY) - set(ENV{PKG_CONFIG_PATH} "${EXTRA_FLUX_CORE_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") + set(ENV{PKG_CONFIG_PATH} "${EXTRA_FLUX_CORE_PREFIX}/lib64/pkgconfig:${EXTRA_FLUX_CORE_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") message(STATUS "found ${FLUX} in PATH with prefix=${EXTRA_FLUX_CORE_PREFIX}") endif() endif() diff --git a/qmanager/modules/CMakeLists.txt b/qmanager/modules/CMakeLists.txt index a6cd40a6c..36615d8ee 100644 --- a/qmanager/modules/CMakeLists.txt +++ b/qmanager/modules/CMakeLists.txt @@ -10,6 +10,5 @@ target_link_libraries(sched-fluxion-qmanager PRIVATE flux::core flux::schedutil PkgConfig::JANSSON - intern cppwrappers ) diff --git a/resource/CMakeLists.txt b/resource/CMakeLists.txt index 2ab5b922b..625be874c 100644 --- a/resource/CMakeLists.txt +++ b/resource/CMakeLists.txt @@ -1,5 +1,12 @@ add_library(fluxion-data SHARED schema/data_std.cpp) -install(TARGETS fluxion-data LIBRARY) +target_link_libraries(fluxion-data PRIVATE + intern + ) +set_target_properties(fluxion-data PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} + ) +install(TARGETS fluxion-data LIBRARY NAMELINK_SKIP) add_subdirectory(libjobspec) add_subdirectory(planner) set(RESOURCE_HEADERS @@ -77,7 +84,6 @@ add_library(resource STATIC target_include_directories(resource PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(resource PRIVATE planner - intern ) target_link_libraries(resource PUBLIC flux::hostlist @@ -87,7 +93,6 @@ target_link_libraries(resource PUBLIC PkgConfig::UUID Boost::graph jobspec_conv - fluxion-data ) add_sanitizers(resource) diff --git a/resource/libjobspec/CMakeLists.txt b/resource/libjobspec/CMakeLists.txt index 7a4f2a8c9..b8e0aa9e7 100644 --- a/resource/libjobspec/CMakeLists.txt +++ b/resource/libjobspec/CMakeLists.txt @@ -13,7 +13,6 @@ add_sanitizers(jobspec_conv) target_link_libraries(jobspec_conv PUBLIC flux::hostlist flux::idset flux::core yaml-cpp PkgConfig::JANSSON PkgConfig::UUID - intern fluxion-data ) @@ -26,5 +25,5 @@ target_link_libraries(flux-jobspec-validate PRIVATE jobspec_conv) add_executable(test_constraint.t test/constraint.cpp) add_sanitizers(test_constraint.t) -target_link_libraries(test_constraint.t jobspec_conv libtap intern) +target_link_libraries(test_constraint.t jobspec_conv libtap) flux_add_test(NAME test_constraint COMMAND test_constraint.t) diff --git a/resource/modules/CMakeLists.txt b/resource/modules/CMakeLists.txt index 915d526cf..bbf43989f 100644 --- a/resource/modules/CMakeLists.txt +++ b/resource/modules/CMakeLists.txt @@ -7,6 +7,5 @@ target_link_libraries (sched-fluxion-resource PRIVATE resource PkgConfig::JANSSON PkgConfig::UUID - intern cppwrappers ) diff --git a/src/common/libintern/CMakeLists.txt b/src/common/libintern/CMakeLists.txt index ec2bc19d0..2eb657831 100644 --- a/src/common/libintern/CMakeLists.txt +++ b/src/common/libintern/CMakeLists.txt @@ -1,7 +1,5 @@ -add_library(intern SHARED +add_library(intern STATIC interner.cpp) -install(TARGETS intern - LIBRARY) add_executable(interned_string_test test/interned_string_test.cpp) add_sanitizers(interned_string_test)