mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-31 18:03:07 -04:00
4c24ae2bc2
* some start of refactor * Update SetFlags.cmake * Update SetCmakeVar.cmake * Update SetFlags.cmake * Fix error int-convertion * more refactor * clean up include and source file * fix link of lib * fix a warning * fix include in src/actors * fix include in src/debug * fix include in src/ending * fix include in src/engine/actors * fix include in src/engine/cameras * fix include in src/engine/editor * fix include in src/engine/objects * fix include in src/engine/tracks * fix include in src/port/ui * fix include in src/racing * fix include in src/engine/vehicles * fix include in subfolder of src/engine * fix include in src/engine * fix include in src/enhancements * fix include in src * fix switch * invert common and findlib * Update SetFlags.cmake * clean up some workflow * some splification * Update build.sh * Update Game.h * add header back * Delete test_check.cmake * continue * Update common.cmake
35 lines
1.4 KiB
CMake
35 lines
1.4 KiB
CMake
if(APPLE)
|
|
enable_language(OBJCXX)
|
|
endif()
|
|
|
|
# Set the minimum version of CMake and the deployment target for macOS
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
|
|
|
|
|
|
# Set the C++ standard and enable the MSVC parallel build option
|
|
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use")
|
|
|
|
# Automatically select the game target (for Visual Studio, etc.)
|
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT
|
|
${PROJECT_NAME})
|
|
|
|
# Add a custom module path to locate additional CMake modules
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
|
|
|
|
################################################################################
|
|
# Set target arch type if empty. Visual studio solution generator provides it.
|
|
################################################################################
|
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
if(NOT CMAKE_VS_PLATFORM_NAME)
|
|
set(CMAKE_VS_PLATFORM_NAME "x64")
|
|
endif()
|
|
message("${CMAKE_VS_PLATFORM_NAME} architecture in use")
|
|
|
|
if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64"
|
|
OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32"))
|
|
message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!")
|
|
endif()
|
|
endif()
|