Skip to content

Commit

Permalink
All libraries shall go to lib64
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthelemy committed Oct 1, 2018
1 parent 3fb50e5 commit 14f3e55
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 9 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(CMakeParseArguments)
include(QCModulesUtils)
include(GNUInstallDirs)

# ---- Project ----

Expand Down
10 changes: 4 additions & 6 deletions Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Framework/readoutChainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"password": "qc_user",
"name": "quality_control",
"implementation": "CCDB",
"host": "localhost:8080"
"host": "ccdb-test.cern.ch:8080"
},
"Activity": {
"number": "42",
Expand All @@ -30,7 +30,7 @@
"moduleOfChecks": "QcExample",
"outputDataOrigin": "ITS",
"cycleDurationSeconds": "10",
"maxNumberCycles": "-1",
"maxNumberCycles": "10",
"outputDataDescription": "HIST_SKLT_TASK",
"inputs": "readoutInput",
"fraction": "0.01",
Expand Down
7 changes: 7 additions & 0 deletions Modules/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions Modules/Daq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions Modules/Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions Modules/Skeleton/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions Modules/SkeletonDPL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion cmake/QCModulesUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 14f3e55

Please sign in to comment.