Skip to content

Commit f08ddf8

Browse files
committed
CMakeLists.txt: For FreeBSD, now looking into /usr/lib in addition to
/usr/local/lib if argp gets moved into the FreeBSD distribution in the future.
1 parent b925b47 commit f08ddf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ set(ARGP_LIBS "")
7878
check_function_exists(argp_parse HAVE_ARGP_PARSE)
7979
if(NOT HAVE_ARGP_PARSE)
8080
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
81-
check_library_exists(argp argp_parse "/usr/local/lib" ARGP)
81+
find_library(FBSD_ARGP_PATH NAMES argp PATHS "/usr/local/lib" "/usr/lib")
82+
if(FBSD_ARGP_PATH)
83+
check_library_exists(${FBSD_ARGP_PATH} argp_parse "" ARGP)
84+
endif()
8285
else()
8386
check_library_exists(argp argp_parse "" ARGP)
8487
endif()

0 commit comments

Comments
 (0)