1 include(Platform/NetBSD)
3 # On OpenBSD, the compile time linker does not share it's configuration with
4 # the runtime linker. This will extract the library search paths from the
5 # system's ld.so.hints file which will allow CMake to set the appropriate
7 if(NOT CMAKE_PLATFORM_RUNTIME_PATH)
8 execute_process(COMMAND /sbin/ldconfig -r
9 OUTPUT_VARIABLE LDCONFIG_HINTS
11 string(REGEX REPLACE ".*search\\ directories:\\ ([^\n]*).*" "\\1"
12 LDCONFIG_HINTS "${LDCONFIG_HINTS}")
13 string(REGEX REPLACE ":" ";"
14 CMAKE_PLATFORM_RUNTIME_PATH
18 set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
20 # OpenBSD policy requires that shared libraries be installed without
21 # executable permission.
22 set(CMAKE_INSTALL_SO_NO_EXE 1)