diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b221f1b3f..4f65df8e13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(CMakeParseArguments) include(QCModulesUtils) +include(GNUInstallDirs) # ---- Project ---- diff --git a/Framework/CMakeLists.txt b/Framework/CMakeLists.txt index fba57c7bd9..45dcbb54c2 100644 --- a/Framework/CMakeLists.txt +++ b/Framework/CMakeLists.txt @@ -99,7 +99,7 @@ root_generate_dictionary("${dict}" ${HEADERS} LINKDEF include/QualityControl/Lin # TODO review how and what to install for dictionary install( FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${dict}_rdict.pcm ${CMAKE_CURRENT_BINARY_DIR}/lib${dict}.rootmap - DESTINATION lib + DESTINATION ${CMAKE_INSTALL_LIBDIR} ) # ---- Library ---- @@ -233,21 +233,19 @@ endforeach() # ---- Install ---- -include(GNUInstallDirs) - # Build targets with install rpath on Mac to dramatically speed up installation # https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) +list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") if("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "@loader_path/../lib") + set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}") endif() set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) endif() unset(isSystemDir) -# Install library +# Install library and header install( TARGETS QualityControl ${EXE_NAMES} tobject2json EXPORT QualityControlTargets diff --git a/Framework/readoutChainTemplate.json b/Framework/readoutChainTemplate.json index 1a76f592f5..107e0fe6c0 100644 --- a/Framework/readoutChainTemplate.json +++ b/Framework/readoutChainTemplate.json @@ -13,7 +13,7 @@ "password": "qc_user", "name": "quality_control", "implementation": "CCDB", - "host": "localhost:8080" + "host": "ccdb-test.cern.ch:8080" }, "Activity": { "number": "42", @@ -30,7 +30,7 @@ "moduleOfChecks": "QcExample", "outputDataOrigin": "ITS", "cycleDurationSeconds": "10", - "maxNumberCycles": "-1", + "maxNumberCycles": "10", "outputDataDescription": "HIST_SKLT_TASK", "inputs": "readoutInput", "fraction": "0.01", diff --git a/Modules/Common/CMakeLists.txt b/Modules/Common/CMakeLists.txt index d6b27cce51..03cf2330c0 100644 --- a/Modules/Common/CMakeLists.txt +++ b/Modules/Common/CMakeLists.txt @@ -34,6 +34,13 @@ target_include_directories( target_link_libraries(${MODULE_NAME} PUBLIC QualityControl PRIVATE ROOT::Graf) +install( + TARGETS ${MODULE_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + # ---- ROOT dictionary ---- generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/Common/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") diff --git a/Modules/Daq/CMakeLists.txt b/Modules/Daq/CMakeLists.txt index 9d5ea9194b..bc1e89788b 100644 --- a/Modules/Daq/CMakeLists.txt +++ b/Modules/Daq/CMakeLists.txt @@ -26,6 +26,13 @@ target_include_directories( target_link_libraries(${MODULE_NAME} PUBLIC QualityControl PRIVATE ROOT::Gpad) +install( + TARGETS ${MODULE_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + # ---- ROOT dictionary ---- generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/Daq/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") diff --git a/Modules/Example/CMakeLists.txt b/Modules/Example/CMakeLists.txt index 1f1a2ba314..52dc958491 100644 --- a/Modules/Example/CMakeLists.txt +++ b/Modules/Example/CMakeLists.txt @@ -28,6 +28,13 @@ target_include_directories( target_link_libraries(${MODULE_NAME} PUBLIC QualityControl) +install( + TARGETS ${MODULE_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + # ---- ROOT dictionary ---- generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/Example/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") diff --git a/Modules/Skeleton/CMakeLists.txt b/Modules/Skeleton/CMakeLists.txt index f86ef85f11..c3c7cbd7ff 100644 --- a/Modules/Skeleton/CMakeLists.txt +++ b/Modules/Skeleton/CMakeLists.txt @@ -26,6 +26,13 @@ target_include_directories( target_link_libraries(${MODULE_NAME} PUBLIC QualityControl) +install( + TARGETS ${MODULE_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + # ---- ROOT dictionary ---- generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/Skeleton/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") diff --git a/Modules/SkeletonDPL/CMakeLists.txt b/Modules/SkeletonDPL/CMakeLists.txt index bba38364fd..c5b8233df8 100644 --- a/Modules/SkeletonDPL/CMakeLists.txt +++ b/Modules/SkeletonDPL/CMakeLists.txt @@ -26,6 +26,13 @@ target_include_directories( target_link_libraries(${MODULE_NAME} PUBLIC QualityControl) +install( + TARGETS ${MODULE_NAME} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + # ---- ROOT dictionary ---- generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/SkeletonDPL/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") diff --git a/cmake/QCModulesUtils.cmake b/cmake/QCModulesUtils.cmake index 6d7f16ee4d..1b5238ce1f 100644 --- a/cmake/QCModulesUtils.cmake +++ b/cmake/QCModulesUtils.cmake @@ -64,7 +64,7 @@ function(GENERATE_ROOT_DICT) # TODO review how and what to install for dictionary install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${PARSED_ARGS_MODULE_NAME}Dict_rdict.pcm ${CMAKE_CURRENT_BINARY_DIR}/lib${PARSED_ARGS_MODULE_NAME}Dict.rootmap - DESTINATION lib) + DESTINATION ${CMAKE_INSTALL_LIBDIR}) endfunction()