aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-28 14:55:10 +0200
committerThomas White <taw@physics.org>2018-05-28 15:04:13 +0200
commit11c01160688771c3627186d3f7080a965a66abf5 (patch)
tree9fe9e1ab887aad1ec1e72ac356ef78f03195f11c
parentde3f797ee3def7bab339e02df84ee4ed65b3e01f (diff)
Fix installation paths
-rw-r--r--CMakeLists.txt12
-rw-r--r--libcrystfel/CMakeLists.txt8
2 files changed, 9 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 665aa482..276c5219 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,9 +30,9 @@ add_definitions(-DHAVE_CONFIG_H -DDATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}\")
set(CMAKE_C_STANDARD 99)
# Make programs work without LD_LIBRARY_PATH when installed to a non system directory
-list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_RPATH}")
+ list(INSERT CMAKE_INSTALL_RPATH 0 ${CMAKE_INSTALL_FULL_LIBDIR})
endif("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
@@ -88,11 +88,6 @@ add_subdirectory(libcrystfel)
enable_testing()
add_subdirectory(tests)
-# crystfel.pc
-configure_file(libcrystfel/crystfel.pc.in crystfel.pc)
-install(FILES ${CMAKE_BINARY_DIR}/crystfel.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-
# Install scripts
install(DIRECTORY ${CMAKE_SOURCE_DIR}/scripts
DESTINATION ${CMAKE_INSTALL_DOCDIR})
@@ -345,8 +340,7 @@ install(TARGETS
geoptimiser
# hdfsee, cell_explorer, render_hkl only if dependencies are satisfied
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
RESOURCE DESTINATION share/crystfel
)
diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt
index f6019b22..5cd288ac 100644
--- a/libcrystfel/CMakeLists.txt
+++ b/libcrystfel/CMakeLists.txt
@@ -121,5 +121,9 @@ endif (CURSES_FOUND)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall)
install (TARGETS libcrystfel
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+# crystfel.pc
+configure_file(crystfel.pc.in crystfel.pc)
+install(FILES ${CMAKE_BINARY_DIR}/libcrystfel/crystfel.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)