|
1 | 1 | project(tps CXX) |
2 | 2 |
|
3 | | -# NOTE: TPS utilizes internal libraries located under '%{_libdir}/tps'. |
| 3 | +# Beware of rpath |
4 | 4 | # |
5 | | -# One method of resolving this issue is the use of RPATH as |
6 | | -# described in 'http://www.cmake.org/Wiki/CMake_RPATH_handling'. |
| 5 | +# Since the Linux dynamic linker is usually smarter than a hardcoded path, |
| 6 | +# we usually do not permit the use of rpath in Fedora. |
7 | 7 | # |
8 | | -# While Fedora allows the use of RPATH for this purpose as documented |
9 | | -# in the section entitled 'Rpath_for_Internal_Libraries' in the URL |
10 | | -# called 'http://fedoraproject.org/wiki/Packaging/Guidelines', |
11 | | -# the RPM '%cmake' macro overrides use of RPATH on Fedora and RHEL. |
12 | | -# |
13 | | -# To resolve this issue on Fedora and RHEL, one of the following |
14 | | -# methods may be utilized: |
15 | | -# |
16 | | -# (1) Uncomment the 'SET(CMAKE_SKIP_RPATH FALSE)' line below, or |
17 | | -# (2) Implement the files described in the section entitled |
18 | | -# 'Alternatives to Rpath' in the URL called |
19 | | -# 'http://fedoraproject.org/wiki/Packaging/Guidelines'. |
20 | | - |
21 | | -# use, i.e. don't skip the full RPATH |
22 | | -# (overrides '%cmake' macro setting of true) |
23 | | -#SET(CMAKE_SKIP_RPATH FALSE) |
24 | | - |
25 | | -# use, i.e. don't skip the full RPATH for the build tree |
26 | | -SET(CMAKE_SKIP_BUILD_RPATH FALSE) |
27 | | - |
28 | | -# when building, don't use the install RPATH already |
29 | | -# (but later on when installing) |
30 | | -SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) |
31 | | - |
32 | | -# the RPATH to be used when installing |
33 | | -SET(CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}/tps") |
| 8 | +# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_beware_of_rpath |
34 | 9 |
|
35 | | -# add the automatically determined parts of the RPATH |
36 | | -# which point to directories outside the build tree to the install RPATH |
37 | | -SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) |
| 10 | +# skip RPATH on all platforms |
| 11 | +# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#no-rpath-at-all |
| 12 | +SET(CMAKE_SKIP_RPATH TRUE) |
38 | 13 |
|
39 | 14 | add_subdirectory(src) |
40 | 15 | add_subdirectory(tools) |
|
0 commit comments