diff options
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/BuildMacros.cmake | 11 | ||||
-rw-r--r-- | cmake/Modules/FindSysrepo.cmake | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake index 85789a08a..ed767dbcc 100644 --- a/cmake/Modules/BuildMacros.cmake +++ b/cmake/Modules/BuildMacros.cmake @@ -73,7 +73,7 @@ macro(build_library lib) cmake_parse_arguments(ARG "SHARED;STATIC;NO_DEV" "COMPONENT;" - "SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;INSTALL_ROOT_DIR" + "SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;INSTALL_ROOT_DIR;INSTALL_FULL_PATH_DIR" ${ARGN} ) @@ -145,11 +145,17 @@ macro(build_library lib) ) endif() + set(INSTALL_LIB_PATH ${CMAKE_INSTALL_LIBDIR}) + + if (ARG_INSTALL_FULL_PATH_DIR) + set(INSTALL_LIB_PATH ${ARG_INSTALL_FULL_PATH_DIR}) + endif() + install( TARGETS ${library} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${INSTALL_LIB_PATH} COMPONENT ${ARG_COMPONENT} ) @@ -160,7 +166,6 @@ macro(build_library lib) # install headers if(ARG_INSTALL_HEADERS) - if (NOT ARG_INSTALL_ROOT_DIR) set(ARG_INSTALL_ROOT_DIR "hicn") endif() diff --git a/cmake/Modules/FindSysrepo.cmake b/cmake/Modules/FindSysrepo.cmake index 4228ef93a..1c389e480 100644 --- a/cmake/Modules/FindSysrepo.cmake +++ b/cmake/Modules/FindSysrepo.cmake @@ -43,4 +43,4 @@ set(SYSREPO_INCLUDE_DIRS ${SYSREPO_INCLUDE_DIR} ${SYSREPO_INCLUDE_MAIN_DIR}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Sysrepo DEFAULT_MSG SYSREPO_LIBRARIES SYSREPO_INCLUDE_DIRS) -mark_as_advanced(SYSREPO_LIBRARY SYSREPO_INCLUDE_DIR SYSREPO_INCLUDE_MAIN_DIR)
\ No newline at end of file +mark_as_advanced(SYSREPO_LIBRARY SYSREPO_INCLUDE_DIR SYSREPO_INCLUDE_MAIN_DIR) |