From bb4dede4c8bd711628566d3eb2136442f7205a41 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Fri, 20 May 2016 00:23:11 +0200 Subject: [PATCH] cmake: use pkg-config ldflags directly instead of spliting libs and dirs This allows picking some necessary linker flags such as -Wl,--whole-archive --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b41205..9dac69f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -390,15 +390,13 @@ set(PULSEVIEW_LINK_LIBS ) if(STATIC_PKGDEPS_LIBS) - link_directories(${PKGDEPS_STATIC_LIBRARY_DIRS}) - list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LIBRARIES}) + list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LDFLAGS}) if(WIN32) # Workaround for a MinGW linking issue. list(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2") endif() else() - link_directories(${PKGDEPS_LIBRARY_DIRS}) - list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES}) + list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LDFLAGS}) endif() if(WIN32) -- 2.30.2