Closed chr-thien closed 1 year ago
Hi,
did you try something like set(CONAN OFF)
?
before using the cmakelists (as a subproject for example)
Regards,
OK. I tried setting -DCONAN:BOOL=OFF on CMake commandline and I end up in non-Conan mode. So we could keep the code as is.
But that means that Conan-mode is supposed to be the default build environment. I'd rather suggest to make plain CMake the default build environment because this is what a user would expect.
I still need to change the condition to 'if (DEFINED CONAN AND CONAN)' because now with my PR one can give -DCONAN:BOOL=OFF and it would still enter Conan-mode.
I renamed the PR because original title did not tell correctly what is the result of this PR. Now after you told me how to disable Conan-mode this PR reduces to a change of default behaviour. Since it is a matter of taste now you might just close PR if you like Conan-mode to stay default build environment.
Cool if it works now.
yes, I prefer to not change the default behavor and using Conan by default, else it will break previous CI/CD that expect this behavior. Did you use any other package manager ?
May be I will change my mind if lot of people complains about the default (already made Meson build, Makefile only build, ...)
May be I will add the section in the documentation on how to build without conan...
I use plain CMake when a library offers CMake builds. CMake works great when providing library dependencies as commandline arguments. E.g. in case of Beauty I give: -DBUILD_SHARED_LIBS:BOOL=ON -DCONAN:BOOL=OFF -DBEAUTY_ENABLE_OPENSSL:BOOL=ON -DBOOST_ROOT:PATH=... -DBoost_USE_STATIC_LIBS:BOOL=OFF -DBoost_USE_STATIC_RUNTIME:BOOL=OFF -DOPENSSL_ROOT_DIR:PATH=... No package manager needed.
Ok, why not, if it enough for your usage. Thanks.
In CMake build system properly distinguish between Conan mode and non-Conan build. Conan-mode was always enabled.