Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit f719d54

Browse files
committed
Make rpath universal
1 parent d10f6f5 commit f719d54

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

CMakeLists.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,18 @@ set(SCAP_WORKBENCH_LINK_LIBRARIES
129129

130130
# see https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
131131

132-
if (APPLE)
133-
# when building, use the install RPATH
134-
# (but later on when installing)
135-
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
132+
# when building, use the install RPATH
133+
# (but later on when installing)
134+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
136135

137-
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
136+
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
138137

139-
# add the automatically determined parts of the RPATH
140-
# which point to directories outside the build tree to the install RPATH
141-
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
138+
# add the automatically determined parts of the RPATH
139+
# which point to directories outside the build tree to the install RPATH
140+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
142141

143-
# Turn on RPATH for OSX for policy warning
144-
set(CMAKE_MACOSX_RPATH ON)
145-
# ---------- CONFIGURATION
146-
endif()
142+
# Turn on RPATH for OSX
143+
set(CMAKE_MACOSX_RPATH ON)
147144

148145
configure_file("include/Config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/Config.h")
149146
# It is not trivial to make the resulting file executable :-(

0 commit comments

Comments
 (0)