forked from Kenix3/libultraship
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (47 loc) · 1.75 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.24.0)
option(NON_PORTABLE "Build a non-portable version" OFF)
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
option(SIGN_LIBRARY "Enable xcode signing" OFF)
option(BUNDLE_ID "Bundle ID for xcode signing" "com.example.libultraship")
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
endif()
project(libultraship LANGUAGES C CXX)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
enable_language(OBJCXX)
set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} -fobjc-arc")
set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} -fobjc-arc")
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
include(cmake/Utils.cmake)
set(ADDITIONAL_LIB_INCLUDES "")
# ========= Configuration Options =========
set(EXCLUDE_MPQ_SUPPORT FALSE CACHE BOOL "Exclude StormLib and MPQ archive support")
if(EXCLUDE_MPQ_SUPPORT)
add_compile_definitions(EXCLUDE_MPQ_SUPPORT)
endif()
option(GBI_UCODE "Specify the GBI ucode version" F3DEX_GBI_2)
# =========== Dependencies =============
include(cmake/dependencies/common.cmake)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
include(cmake/dependencies/android.cmake)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include(cmake/dependencies/mac.cmake)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
include(cmake/dependencies/ios.cmake)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
include(cmake/dependencies/linux.cmake)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
include(cmake/dependencies/windows.cmake)
endif()
# === Platform Specific Configuration ===
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
include(cmake/ios-toolchain-populate.cmake)
endif()
# =========== Sources =============
add_subdirectory("src")