您好,我尝试将cmake文件与lib boost链接,所以我在Windows上安装了柯南。
project(TestLink)
set(CMAKE_CXX_STANDARD 17)
include(./conanbuildinfo.cmake)
conan_basic_setup()
LINK_DIRECTORIES (
TestLink
./lib
)
add_executable(
TestLink
./src/test.cpp
)
set(CMAKE_CXX_FLAGS "-L./lib/ -L/usr/X11R6/lib64 -lGL -lXxf86vm -lXext -lX11 -lXcursor")
set(CMAKE_EXE_LINKER_FLAGS "-L./lib/ -L/usr/X11R6/lib64 -lGL -lXxf86vm -lXext -lX11 -lXcursor")
set_target_properties(TestLink PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}")
target_link_libraries(
TestLink
${CONAN_LIBS}
)
但是我收到了错误消息:Cannot specify link libraries for target "boost_wave" which is not built by this project.
,但我不知道如何解决该错误。
谢谢:)!