Skip to content

Commit 17e481a

Browse files
committed
Add CMAKE_INSTAL_PREFIX/lib to the RPATH if not already done to make json-schema-validator happy
1 parent 20e4d79 commit 17e481a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ include_directories(
116116

117117
if (NOT PHASAR_IN_TREE)
118118
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
119+
120+
if (NOT "${CMAKE_INSTALL_LIBDIR}" STREQUAL "lib")
121+
message(STATUS "Detected CMAKE_INSTALL_LIBDIR that deviates from 'lib': ${CMAKE_INSTALL_LIBDIR}. Add ${CMAKE_INSTALL_PREFIX}/lib to the RPATH as json-schema-validator needs it")
122+
list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
123+
endif()
124+
119125
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
120126
endif()
121127

0 commit comments

Comments
 (0)