Вот CMakeLists.txt
, который не работает:
find_package(Boost REQUIRED COMPONENTS program_options)
add_executable(foobar src/foobar.c)
target_link_libraries(foobar ${Boost_LIBRARIES})
message(STATUS "Boost_LIBRARIES==${Boost_LIBRARIES}")
... вероятно, потому что ${Boost_LIBRARIES}
не имеет параметров программы:
Boost_LIBRARIES==/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_chrono.so;/usr/lib/x86_64-linux-gnu/libboost_atomic.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;/usr/lib/x86_64-linux-gnu/libpthread.so
Кто-нибудь может предложить рабочую теорию относительно того, что здесь происходит?