cmake: don't require SDL2main

This commit is contained in:
Anonymous Maarten 2024-08-16 18:04:16 +02:00
parent 0155539316
commit e40a19be72
3 changed files with 13 additions and 1 deletions

View File

@ -38,6 +38,10 @@ target_link_libraries(librw_skeleton
librw
)
if (LIBRW_GL3_GFXLIB STREQUAL "SDL2")
target_compile_definitions(librw_skeleton PRIVATE SDL_MAIN_HANDLED)
endif()
target_include_directories(librw_skeleton
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

View File

@ -7,6 +7,10 @@ target_link_libraries(dumprwtree
librw::librw
)
if(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
target_compile_definitions(dumprwtree PRIVATE SDL_MAIN_HANDLED)
endif()
if(LIBRW_INSTALL)
install(TARGETS dumprwtree
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"

View File

@ -7,10 +7,14 @@ target_link_libraries(ska2anm
librw::librw
)
librw_platform_target(ska2anm INSTALL)
if(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
target_compile_definitions(ska2anm PRIVATE SDL_MAIN_HANDLED)
endif()
if(LIBRW_INSTALL)
install(TARGETS ska2anm
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
endif()
librw_platform_target(ska2anm INSTALL)