From: Aurelien Jacobs Date: Thu, 19 May 2016 22:23:11 +0000 (+0200) Subject: cmake: use pkg-config ldflags directly instead of spliting libs and dirs X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=bb4dede4c8bd711628566d3eb2136442f7205a41 cmake: use pkg-config ldflags directly instead of spliting libs and dirs This allows picking some necessary linker flags such as -Wl,--whole-archive --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b4120..9dac69f 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)