cmake: install
Projects can be build using (PREFIX and VERSION are optional):
rm -rf /tmp/relpipe/ && rm -rf ../xxx/* && cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/relpipe/usr -DPROJECT_VERSION=1.2.3 ../../ && make && make install && find /tmp/relpipe/ -type f
INSTALL_RPATH_USE_LINK_PATH will retain the build-time paths to libraries and get rid of the message: 'Set runtime path of .. to ""'.
--- a/src/CMakeLists.txt Sun Dec 09 23:27:21 2018 +0100
+++ b/src/CMakeLists.txt Tue Dec 18 22:02:53 2018 +0100
@@ -35,3 +35,6 @@
# Link libraries:
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIBS_LIBRARIES})
+set_property(TARGET ${EXECUTABLE_FILE} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+install(TARGETS ${EXECUTABLE_FILE} DESTINATION bin)