Files
vanilla/CMakeLists.txt
T
Joshua Brest (杰成)andMattKC 78b923719c Add iOS support with build scripts, toolchain, and assets (#302)
* feat: add iOS support

* ios: clean up icon

* ci: add ios build

* fix(gui): revert asset lookups to use "%s/assets/%s/%s" for macOS

* refactor(gui): remove extra `iconv` linkage for iOS

* chore(gitignore): remove unused `xcuserdata` and `DerivedData` entries

* fix(gui): use provided `LibXML2` in non-vendored builds

* fix(ci): add Xcode setup step for iOS build

* fix(pipe): prevent relay threads from using freed stack memory

* fix(input): replace bitfields with explicit wire packing for touch and gyro data

* fix merge issues

* fix cmake merge bug

* cmake: attempt iOS SDL fix

* older ios

* feat: add iOS support

* ios: clean up icon

* ci: add ios build

* refactor(gui): remove extra `iconv` linkage for iOS

* chore(gitignore): remove unused `xcuserdata` and `DerivedData` entries

* fix(ci): add Xcode setup step for iOS build

* cmake: attempt iOS SDL fix

* older ios

* cleanup

* build signed macOS app alongside iOS app

* cmake: detect ios version and include liquid glass icon if available

* ci: upload continuous release

* cmake: move more ios code to toolchain

* remove ios simulator target

* improvements

* remove CMakePresets.json

* Update ios-toolchain.cmake

* move ios folder to gui folder

* converge Info.plist templates

* update comments and readme

* cmake: remove redundant code

* remove redundant ios folder

* cmake: add comments to cache strings

* cmake/ci: maybe fix new apple builds

* cmake: fix new ios build

* cmake: fix macOS build?

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2026-09-09 02:25:50 -07:00

45 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.21)
project(Vanilla C)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_C_STANDARD 23)
if(UNIX AND NOT APPLE AND NOT ANDROID)
set(LINUX TRUE)
endif()
if(APPLE)
# FFmpeg's configure step expects both compiler drivers even though Vanilla
# itself is written in C.
enable_language(CXX)
endif()
if(ANDROID OR MSVC OR IOS)
set(vendored_default TRUE)
else()
set(vendored_default FALSE)
endif()
set(vanilla_pipe_default OFF)
if(LINUX OR ANDROID)
set(vanilla_pipe_default ON)
endif()
OPTION(VANILLA_BUILD_GUI "Build SDL2 GUI app" ON)
OPTION(VANILLA_BUILD_TESTS "Build unit tests for Vanilla" OFF)
OPTION(VANILLA_BUILD_PIPE "Build vanilla-pipe for connecting to Wii U" ${vanilla_pipe_default})
OPTION(VANILLA_BUILD_VENDORED "Build Vanilla with \"vendored\" third-party libraries" ${vendored_default})
add_subdirectory(lib)
if (VANILLA_BUILD_PIPE)
add_subdirectory(pipe)
endif()
if (VANILLA_BUILD_GUI)
add_subdirectory(gui)
endif()