cmake: install v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 18 Dec 2018 22:02:53 +0100
branchv_0
changeset 28 f2c97faab8d9
parent 27 930b8f1b836e
child 29 af3df945b51f
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 ""'.
src/CMakeLists.txt
--- 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)