]> sigrok.org Git - pulseview.git/commitdiff
cmake: use pkg-config ldflags directly instead of spliting libs and dirs
authorAurelien Jacobs <redacted>
Thu, 19 May 2016 22:23:11 +0000 (00:23 +0200)
committerAurelien Jacobs <redacted>
Thu, 19 May 2016 22:23:11 +0000 (00:23 +0200)
This allows picking some necessary linker flags such as
-Wl,--whole-archive

CMakeLists.txt

index a3b41205e2d447fc20a7527479b655bb3ad983af..9dac69f2b08155200bf9bd49bcd78a99c74f9a08 100644 (file)
@@ -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)