-
-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call project() after cmake_minimum_required() #191
Comments
As you can see, the logic before |
Even if there is an option, this logic leads to an illformed CMakeLists, where options and some logic unrelated to vcpkg are defined before projects just because of this vcpkg intrusion (actually I realize that you could not even move other options after project() because you have vcpkg logic based on these options which has be done before project()). |
Could you at least move I mean this part: if(MSDFGEN_DYNAMIC_RUNTIME)
set(MSDFGEN_MSVC_RUNTIME "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(MSDFGEN_MSVC_RUNTIME "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
if(BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif() |
But why? |
Because it defeats conan toolchain. |
Sorry, I kind of forgot about this but changed it now. |
Could you call project() after cmake_minimum_required() please (well after
include(cmake/version.cmake)
actually)? It's problematic when someone has to use a toolchain, since CMakeLists of msdfgen has lot of logic between cmake_minimum_required() and project(), and stuff in toolchain files are ignored before project() is called (it's tedious for conan for example).Moreover it's not really a good idea to hardcode vcpkg stuff in a CMakeLists. vcpkg should come as a toolchain file injected externally. CMakeLists should be package manager agnostic.
The text was updated successfully, but these errors were encountered: