File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,10 +72,15 @@ else()
7272 add_compile_options (-ffp-model=strict )
7373endif ()
7474
75- add_compile_definitions (
76- SDL_MAIN_HANDLED
77- _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR # Microsoft wtf?
78- _CRT_SECURE_NO_WARNINGS )
75+ set (UNLEASHED_RECOMP_COMPILE_DEFINITIONS
76+ _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR # Microsoft wtf?
77+ _CRT_SECURE_NO_WARNINGS)
78+
79+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "iOS" )
80+ list (APPEND UNLEASHED_RECOMP_COMPILE_DEFINITIONS SDL_MAIN_HANDLED)
81+ endif ()
82+
83+ add_compile_definitions (${UNLEASHED_RECOMP_COMPILE_DEFINITIONS} )
7984
8085set (UNLEASHED_RECOMP_PRECOMPILED_HEADERS
8186 "stdafx.h"
@@ -422,15 +427,20 @@ if (WIN32)
422427 )
423428endif ()
424429
425- target_link_libraries (UnleashedRecomp PRIVATE
426- fmt::fmt
427- libzstd_static
428- msdf-atlas-gen::msdf-atlas-gen
430+ set (UNLEASHED_RECOMP_SDL_LIBS SDL2::SDL2-static)
431+ if (CMAKE_SYSTEM_NAME STREQUAL "iOS" AND TARGET SDL2::SDL2main)
432+ list (PREPEND UNLEASHED_RECOMP_SDL_LIBS SDL2::SDL2main)
433+ endif ()
434+
435+ target_link_libraries (UnleashedRecomp PRIVATE
436+ fmt::fmt
437+ libzstd_static
438+ msdf-atlas-gen::msdf-atlas-gen
429439 nfd::nfd
430- o1heap
431- XenonUtils
432- SDL2::SDL2-static
433- SDL2_mixer
440+ o1heap
441+ XenonUtils
442+ ${UNLEASHED_RECOMP_SDL_LIBS}
443+ SDL2_mixer
434444 tomlplusplus::tomlplusplus
435445 UnleashedRecompLib
436446 xxHash::xxhash
You can’t perform that action at this time.
0 commit comments