mirror of
https://github.com/vanilla-wiiu/vanilla.git
synced 2026-10-28 09:43:51 +00:00
45 lines
1.2 KiB
CMake
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. Objective-C is
|
|
# used by the VideoToolbox-to-Metal renderer.
|
|
enable_language(CXX OBJC)
|
|
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()
|