Skip to content

Commit

Permalink
cmake: forward public macros of plutosvg to SDL_ttf
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Feb 24, 2025
1 parent 896dfe1 commit d1e85b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ endif()
list(APPEND SDLTTF_BACKENDS PLUTOSVG)
set(SDLTTF_PLUTOSVG_ENABLED FALSE)
if(SDLTTF_PLUTOSVG)
set(plutosvg_compile_definitions)
set(plutosvg_include_directories)
set(plutosvg_link_libraries)
set(plutosvg_sources)
Expand All @@ -350,6 +351,7 @@ if(SDLTTF_PLUTOSVG)
if(SDLTTF_BUILD_SHARED_LIBS)
set(plutosvg_link_libraries plutosvg::plutosvg)
else()
set(plutosvg_compile_definitions $<TARGET_PROPERTY:plutosvg::plutosvg,INTERFACE_COMPILE_DEFINITIONS>)
set(plutosvg_include_directories $<TARGET_PROPERTY:plutosvg::plutosvg,INTERFACE_INCLUDE_DIRECTORIES>)
set(plutosvg_sources $<TARGET_OBJECTS:plutosvg> $<TARGET_OBJECTS:plutovg>)
endif()
Expand All @@ -367,6 +369,7 @@ if(SDLTTF_PLUTOSVG)
if(SDLTTF_PLUTOSVG_ENABLED)
target_compile_definitions(${sdl3_ttf_target_name} PRIVATE TTF_USE_PLUTOSVG=1)
target_sources(${sdl3_ttf_target_name} PRIVATE ${plutosvg_sources})
target_compile_definitions(${sdl3_ttf_target_name} PRIVATE ${plutosvg_compile_definitions})
target_include_directories(${sdl3_ttf_target_name} PRIVATE ${plutosvg_include_directories})
target_link_libraries(${sdl3_ttf_target_name} PRIVATE ${plutosvg_link_libraries})
endif()
Expand Down

0 comments on commit d1e85b2

Please sign in to comment.