Revert "cmake: use pkg-config ldflags directly instead of spliting libs and dirs"
authorUwe Hermann <uwe@hermann-uwe.de>
Fri, 24 Jun 2016 21:17:51 +0000 (23:17 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 24 Jun 2016 21:17:51 +0000 (23:17 +0200)
This reverts commit bb4dede4c8bd711628566d3eb2136442f7205a41.

The -Wl,--whole-archive in libsigrok that lead to this change no longer
exists, so this change can be reverted (since it also causes issues with
"make test").

This fixes bug #808.

CMakeLists.txt

index 44f810e3c5fec71a299a166ee546a705ceb22ef8..49c35cae15f6ab318f6d161b61c22d98e31be107 100644 (file)
@@ -440,13 +440,15 @@ set(PULSEVIEW_LINK_LIBS
 )
 
 if(STATIC_PKGDEPS_LIBS)
-       list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LDFLAGS})
+       link_directories(${PKGDEPS_STATIC_LIBRARY_DIRS})
+       list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LIBRARIES})
 if(WIN32)
        # Workaround for a MinGW linking issue.
        list(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2")
 endif()
 else()
-       list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LDFLAGS})
+       link_directories(${PKGDEPS_LIBRARY_DIRS})
+       list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES})
 endif()
 
 if(WIN32)