-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi,
I am trying to make this plugin works with CLion 2024.1.2
. I have a package made by conan that is private, and built locally - so it only exists in my local cache. I failed to figure out how to configure this plugin in CLion in this case. It does not detect my package from cache. Moreover, I am not sure how to configure CMake profiles so I can build and debug using CLion.
What I tried from console is:
export BUILD_TYPE=Debug
conan install . -pr profiles/gcc -s build_type="${BUILD_TYPE}"
cmake -DCMAKE_TOOLCHAIN_FILE="build/${BUILD_TYPE}/generators/conan_toolchain.cmake" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -B "build/${BUILD_TYPE}" -S .
cmake --build "build/${BUILD_TYPE}"
Above commands work. They produces executable that link appropriate GraphicsMagick 1.3.43
(instead of system's 1.3.42
).
But if I try to use from CLion it constantly refuses to find it. I tried adding CMake options to Debug profile:
-G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="build/Debug/generators/conan_toolchain.cmake" -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" -DCONAN_COMMAND="~/.local/bin/conan"
The output of the build is:
CMake Error at CMakeLists.txt:4 (find_package):
Could not find a configuration file for package "graphicsmagick" that is
compatible with requested version "1.3.43".
The following configuration files were considered but not accepted:
~/project_conan/build/Debug/generators/graphicsmagick-config.cmake, version: unknown
I see there are files graphicsmagick-config-version.cmake
(with set(PACKAGE_VERSION "1.3.43")
) and build/Debug/generators/graphicsmagick-config.cmake
So in the end I am unsure did I do something wrong when building Conan package (asked this on their repo already), is there some problem in this plugin or CLion itself?
Thank you kindly