Another attempt to get cross platform package finding working

This commit is contained in:
Bill Somerville 2021-04-17 03:08:06 +01:00
parent 3591f13ff0
commit 8065f3b889
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -93,8 +93,6 @@ libfind_process (Hamlib)
if (NOT Hamlib_PKGCONF_FOUND)
if (WIN32)
set (Hamlib_LIBRARIES ${Hamlib_LIBRARIES};${Usb_LIBRARY};ws2_32)
# pretend pkg-config worked
set (Hamlib_PKGCONF_LDFLAGS ${Usb_LIBRARY};ws2_32)
else ()
set (Hamlib_LIBRARIES ${Hamlib_LIBRARIES};m;dl)
endif ()
@ -106,7 +104,7 @@ endif ()
# it wrong for frameworks
unset (_next_is_framework)
unset (_Hamlib_EXTRA_LIBS)
foreach (_lib IN LISTS Hamlib_PKGCONF_LDFLAGS)
foreach (_lib IN LISTS Hamlib_LIBRARIES)
if (_next_is_framework)
list (APPEND _Hamlib_EXTRA_LIBS "-framework ${_lib}")
unset (_next_is_framework)