@@ -127,24 +127,23 @@ set(SCAP_WORKBENCH_LINK_LIBRARIES
127
127
128
128
# ---------- RPATHS for linking
129
129
130
- # see https://cmake.org/Wiki/CMake_RPATH_handling
130
+ # see https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
131
131
132
- # use, i.e. don't skip the full RPATH for the build tree
133
- set (CMAKE_SKIP_BUILD_RPATH FALSE )
134
-
135
- # when building, don't use the install RPATH already
136
- # (but later on when installing)
137
- set (CMAKE_BUILD_WITH_INSTALL_RPATH ON )
132
+ if (APPLE )
133
+ # when building, use the install RPATH
134
+ # (but later on when installing)
135
+ set (CMAKE_BUILD_WITH_INSTALL_RPATH ON )
138
136
139
- set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR} )
137
+ set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR} )
140
138
141
- # add the automatically determined parts of the RPATH
142
- # which point to directories outside the build tree to the install RPATH
143
- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
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 )
144
142
145
- # Turn on RPATH for OSX for policy warning
146
- set (CMAKE_MACOSX_RPATH ON )
147
- # ---------- CONFIGURATION
143
+ # Turn on RPATH for OSX for policy warning
144
+ set (CMAKE_MACOSX_RPATH ON )
145
+ # ---------- CONFIGURATION
146
+ endif ()
148
147
149
148
configure_file ("include/Config.h.in" "${CMAKE_CURRENT_BINARY_DIR} /Config.h" )
150
149
# It is not trivial to make the resulting file executable :-(
0 commit comments