cmake: Check for Argp also on Linux to fix alpine build

This adjusts also usage of ARGP_LIBRARY to use ARGP_LIBRARIES which is defined
by the FindArgp module, unlike the former one in case it is provided by libc
directly.

Fixes: #167

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2022-12-12 15:00:23 +01:00
parent d54d45871a
commit 8f237bde15
5 changed files with 18 additions and 16 deletions

View File

@@ -73,9 +73,9 @@ if (CLIENT_TESTING)
)
endif ()
if (ARGP_LIBRARY)
if (ARGP_LIBRARIES)
target_link_libraries(${TORTURE_LIBRARY}
${ARGP_LIBRARY}
${ARGP_LIBRARIES}
)
endif()

View File

@@ -30,7 +30,7 @@ if (UNIX AND NOT WIN32)
target_link_libraries(test_server
testserver
ssh::ssh
${ARGP_LIBRARY}
${ARGP_LIBRARIES}
util)
endif ()