]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
cmake adds newlines to variables set from command output, trashing the
authorGregory Economou <groik@devel-freebsd14-aarch64-01.lan>
Tue, 16 Apr 2024 12:04:20 +0000 (15:04 +0300)
committerGregory Economou <groik@devel-freebsd14-aarch64-01.lan>
Tue, 16 Apr 2024 12:04:20 +0000 (15:04 +0300)
usefulness of the flexible method of setting the rpath var. back to
the clunky manual setting.

cmake/osdetection.cmake

index c163a7ff97eaeb8c5458c93b8bd989cf9cf57ffa..23f6a5d5dee5697dea8bc8a6c95bcee62cfe2421 100644 (file)
@@ -5,7 +5,11 @@ endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
     set(FREEBSD true)
     set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-    execute_process(COMMAND "sh" "-c" "realpath `dirname \\`${CMAKE_C_COMPILER} --print-file-name=libgcc_s.so\\``" OUTPUT_VARIABLE CMAKE_BUILD_RPATH)
+    if(CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc12")
+        set(CMAKE_BUILD_RPATH "/usr/local/lib/gcc12")
+    elseif(CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc13")
+        set(CMAKE_BUILD_RPATH "/usr/local/lib/gcc13")
+    endif()
 endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
 
 if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")