diff --git a/CMakeLists.txt b/CMakeLists.txt index bde88f1e2ca..f7429a99be4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,10 @@ endif() # PkgConfig if(VW_INSTALL) + FOREACH(BOOST_LIBRARY ${Boost_LIBRARIES}) + SET (BOOST_LINK_LIBRARIES "${BOOST_LINK_LIBRARIES} ${BOOST_LIBRARY}") + ENDFOREACH() + configure_file(libvw.pc.in libvw.pc) configure_file(libvw_c_wrapper.pc.in libvw_c_wrapper.pc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libvw.pc ${CMAKE_CURRENT_BINARY_DIR}/libvw_c_wrapper.pc DESTINATION lib/pkgconfig) diff --git a/libvw.pc.in b/libvw.pc.in index 2973182bd4c..dd4b4cb725b 100644 --- a/libvw.pc.in +++ b/libvw.pc.in @@ -8,5 +8,5 @@ Description: Vowpal Wabbit Machine Learning System URL: @PACKAGE_URL@ Version: @PACKAGE_VERSION@ Requires: zlib -Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lvw -lallreduce @CMAKE_THREAD_LIBS_INIT@ @Boost_LIBRARIES@ +Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lvw -lallreduce @CMAKE_THREAD_LIBS_INIT@ @BOOST_LINK_LIBRARIES@ Cflags: -I@CMAKE_INSTALL_PREFIX@/include/vowpalwabbit