Closed m1maker closed 1 month ago
Make sure you're using latest SDL3 and SDL3_ttf. From your logs it appears they are incompatible.
I updated Git tag for SDL3 project, but no changes.
ExternalProject
is for handling external projects that you only want to make available. Your code cannot depend on them, and these projects can also not depend on each other.
If you want to build your application in the same project, and link to it using SDL3::SDL3
, you need to use the functions provided by FetchContent
instead.
Having said that, after adding DEPENDS SDL3
to the arguments of the second ExternalProject_Add
, I got it working on Linux. (I also added GIT_SHALLOW TRUE
for faster cloning)
Also, verify the CMAKE_ARGS
: -DSDL_SHARED
and -DSDL_STATIC
are SDL3-only options, not used by SDL_ttf. Use DBUILD_SHARED_LIBS=...
for the satellite libraries.
Also, -DFORCE_STATIC_VCRT
is not used by any SDL library.
Also, MSVC_RUNTIME_LIBRARY
is not a CMake variable. You probably meant CMAKE_MSVC_RUNTIME_LIBRARY
But as I said before, you probably want to use FetchContent
instead.
Hello. I'm trying to build TTF with SDL3 and CMake and getting these errors. My CMakeLists
Just with SDL3, project is building good, but with TTF I getting strange build errors: