Skip to content

Commit dfc7238

Browse files
committed
cmake: pass SDL_MAIN_HANDLED to avoid renaming main -> SDL_main
1 parent 20fa7f2 commit dfc7238

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

skeleton/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ set_target_properties(librw_skeleton
2727
EXPORT_NAME skeleton
2828
)
2929

30+
31+
if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "SDL2")
32+
target_compile_definitions(librw_skeleton
33+
PRIVATE
34+
SDL_MAIN_HANDLED
35+
)
36+
endif()
37+
3038
target_include_directories(librw_skeleton
3139
PUBLIC
3240
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

tools/dumprwtree/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ add_executable(dumprwtree
22
dumprwtree.cpp
33
)
44

5+
if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "SDL2")
6+
target_compile_definitions(dumprwtree
7+
PRIVATE
8+
SDL_MAIN_HANDLED
9+
)
10+
endif()
11+
512
target_link_libraries(dumprwtree
613
PRIVATE
714
librw::librw

tools/ska2anm/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ add_executable(ska2anm
22
ska2anm.cpp
33
)
44

5+
if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "SDL2")
6+
target_compile_definitions(ska2anm
7+
PRIVATE
8+
SDL_MAIN_HANDLED
9+
)
10+
endif()
11+
512
target_link_libraries(ska2anm
613
PUBLIC
714
librw::librw

0 commit comments

Comments
 (0)