Commit f93ebb95 authored by jehan's avatar jehan

better rpm integration using CMAKE_INSTALL_DIR

parent 1a0e98f9
......@@ -43,6 +43,7 @@ include(CheckLibraryExists)
include(CheckSymbolExists)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......@@ -81,7 +82,7 @@ if(POLARSSL_FOUND)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bctoolbox.pc.in ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox.pc DESTINATION lib/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
include_directories(
......@@ -172,7 +173,7 @@ configure_file(cmake/BcToolboxConfig.cmake.in
@ONLY
)
set(ConfigPackageLocation lib/cmake/BcToolbox)
set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/BcToolbox)
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BcToolboxTargets.cmake
DESTINATION ${ConfigPackageLocation}
......
......@@ -59,9 +59,9 @@ endif()
install(TARGETS bctoolbox EXPORT ${EXPORT_TARGETS_NAME}Targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment