2022-02-08 01:22:51 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
|
|
set(BSD_PATH_PREFIX "/usr/local")
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
execute_process(
|
|
|
|
COMMAND brew config
|
|
|
|
COMMAND grep -i HOMEBREW_PREFIX
|
|
|
|
COMMAND awk "{print $2}"
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
OUTPUT_VARIABLE BSD_PATH_PREFIX)
|
|
|
|
endif()
|
2022-02-08 21:02:18 +00:00
|
|
|
|
2022-02-08 08:20:55 +00:00
|
|
|
message(STATUS "[configure-bsd-paths] resolved BSD_PATH_PREFIX to: '${BSD_PATH_PREFIX}'")
|
2022-02-08 21:02:18 +00:00
|
|
|
|
|
|
|
list(
|
|
|
|
APPEND
|
|
|
|
VENDOR_INCLUDE_DIRECTORIES
|
|
|
|
"${BSD_PATH_PREFIX}/include"
|
|
|
|
"${BSD_PATH_PREFIX}/opt/openssl/include"
|
|
|
|
"${BSD_PATH_PREFIX}/opt/ncurses/include")
|
2022-02-09 02:57:30 +00:00
|
|
|
|
2022-02-08 08:20:55 +00:00
|
|
|
list(
|
|
|
|
APPEND
|
|
|
|
VENDOR_LINK_DIRECTORIES
|
|
|
|
"${BSD_PATH_PREFIX}/lib"
|
|
|
|
"${BSD_PATH_PREFIX}/opt/openssl/lib"
|
|
|
|
"${BSD_PATH_PREFIX}/opt/ncurses/lib")
|
2022-02-08 01:22:51 +00:00
|
|
|
endif ()
|