Skip to content

Commit fb4af0e

Browse files
committed
1 parent 4ab63d7 commit fb4af0e

1 file changed

Lines changed: 7 additions & 32 deletions

File tree

base/tools/src/main/native/tpsclient/CMakeLists.txt

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,15 @@
11
project(tps CXX)
22

3-
# NOTE: TPS utilizes internal libraries located under '%{_libdir}/tps'.
3+
# Beware of rpath
44
#
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.
77
#
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
349

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)
3813

3914
add_subdirectory(src)
4015
add_subdirectory(tools)

0 commit comments

Comments
 (0)