diff --git a/CMakeLists.txt b/CMakeLists.txt index 759cab8a266..d1ed70f919f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,8 +226,8 @@ get_filename_component(BOOST_LIBRARY_LISTING "${BOOST_LIBRARY_FIRST}" PATH) set(BOOST_LIBRARY_LISTING "-L${BOOST_LIBRARY_LISTING}") foreach (lib ${Boost_LIBRARIES}) get_filename_component(BOOST_LIBRARY_NAME "${lib}" NAME_WE) - string(REPLACE "lib" "-l" BOOST_LIBRARY_NAME ${BOOST_LIBRARY_NAME}) - set(BOOST_LIBRARY_LISTING "${BOOST_LIBRARY_LISTING} ${BOOST_LIBRARY_NAME}") + string(REPLACE "lib" "" BOOST_LIBRARY_NAME ${BOOST_LIBRARY_NAME}) + set(BOOST_LIBRARY_LISTING "${BOOST_LIBRARY_LISTING} -l${BOOST_LIBRARY_NAME}") endforeach () configure_file(${CMAKE_SOURCE_DIR}/cmake/pkgconfig.in libosrm.pc @ONLY)