Add -largp on non linux systems.
authorGuido Falsi <mad@madpilot.net>
Thu, 23 Sep 2021 15:43:52 +0000 (17:43 +0200)
committerGuido Falsi <madpilot@freebsd.org>
Wed, 29 Sep 2021 13:46:07 +0000 (15:46 +0200)
Signed-off-by: Guido Falsi <madpilot@freebsd.org>
src/csync/ConfigureChecks.cmake

index 0910aa5b61a630e69846820030bc864ac4fe0c55..755f21c9b2848ca0ed7a43f78d8a8661f08eafb1 100644 (file)
@@ -22,6 +22,11 @@ if (NOT LINUX)
     check_library_exists(rt nanosleep "" HAVE_LIBRT)
 
     set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
+
+    # Systems not using glibc require linker flag for argp
+    if(HAVE_ARGP_H)
+        set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} argp)
+    endif()
 endif (NOT LINUX)
 
 if(WIN32)