Skip to content

Commit 03ac541

Browse files
committed
cmake: pass SDL_MAIN_HANDLED to avoid renaming main -> SDL_main
1 parent 70c29f2 commit 03ac541

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
@@ -31,6 +31,14 @@ set_target_properties(librw_skeleton
3131
EXPORT_NAME skeleton
3232
)
3333

34+
35+
if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "SDL2")
36+
target_compile_definitions(librw_skeleton
37+
PRIVATE
38+
SDL_MAIN_HANDLED
39+
)
40+
endif()
41+
3442
target_include_directories(librw_skeleton
3543
PUBLIC
3644
$<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)