summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-06-20 20:57:25 +0200
committerSander Vrijders <[email protected]>2016-06-20 20:57:25 +0200
commit16323dcc9df15020e368d4324cf1c1d9dceac805 (patch)
treec70e36289153d37f4c642b33d5003e5709d788d0 /CMakeLists.txt
parentc4d614e041c693d95d1b62d3e33911b53fabf2c2 (diff)
downloadouroboros-16323dcc9df15020e368d4324cf1c1d9dceac805.tar.gz
ouroboros-16323dcc9df15020e368d4324cf1c1d9dceac805.zip
build: Change install directories and set correct permissions
This sets the correct install directories for all the binaries, library and header files. It also sets the right permissions on the sockets and shared memory so that regular users can also use the ouroboros library. Root privileges are required to run the irmd. Fixes #7
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d31262d..9875bd7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,9 +23,10 @@ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
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}usr/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/usr/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
message(STATUS "Package name is: ${PACKAGE_NAME}")
@@ -49,7 +50,7 @@ configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc"
@ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc"
- DESTINATION "lib/pkgconfig")
+ DESTINATION "usr/lib/pkgconfig")
enable_testing()
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
@@ -71,7 +72,8 @@ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR "${PACKAGE_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PACKAGE_VERSION_MINOR}")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY
+ "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
set(CPACK_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")