conan-clion-plugin
conan-clion-plugin copied to clipboard
Am I misunderstanding something? (conan already ran / target exists)
I'm using this plugin, and putting this kind of code in my CMakeLists.txt:
find_package(SDL2 REQUIRED CONFIG)
target_link_libraries(${TARGET_NAME} SDL2::SDL2main)
if (TARGET SDL2::SDL2-static)
target_link_libraries(${TARGET_NAME} SDL2::SDL2-static)
else ()
target_link_libraries(${TARGET_NAME} SDL2::SDL2)
endif ()
Everything works, but I also get these sort of warnings:
-- Shared link flags (Release): -Wl,-dead_strip;-Wl,-dead_strip
-- CMake-Conan: find_package(SDL2) found, 'conan install' already ran
-- Conan: Component target declared 'SDL2::SDL2'
-- Conan: Component target declared 'SDL2::SDL2main'
CMake Warning at cmake-build-debug/conan/SDL2Targets.cmake:25 (message):
Target name 'SDL2::SDL2-static' already exists.
Call Stack (most recent call first):
cmake-build-debug/conan/SDL2Config.cmake:16 (include)
conan_provider.cmake:348 (find_package)
project/cube/CMakeLists.txt:24 (find_package)
Am I doing something wrong? Or are warnings of the sort expected?