2024-03-20 19:25:56 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2023-05-06 06:55:41 +00:00
|
|
|
project(godot-cpp LANGUAGES CXX)
|
2018-12-02 20:07:26 +00:00
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
# Configure CMake
|
|
|
|
# https://discourse.cmake.org/t/how-do-i-remove-compile-options-from-target/5965
|
|
|
|
# https://stackoverflow.com/questions/74426638/how-to-remove-rtc1-from-specific-target-or-file-in-cmake
|
|
|
|
if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
|
|
|
STRING(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
|
|
string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
|
|
|
endif ()
|
2024-09-12 04:11:18 +00:00
|
|
|
endif ()
|
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
include( ${PROJECT_SOURCE_DIR}/cmake/godotcpp.cmake )
|
2018-12-02 20:07:26 +00:00
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
# I know this doesn't look like a typical CMakeLists.txt, but as we are
|
|
|
|
# attempting mostly feature parity with SCons, and easy maintenance, the closer
|
|
|
|
# the two build systems look the easier they will be to keep in lockstep.
|
2018-12-02 20:07:26 +00:00
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
# The typical target definitions are in ${PROJECT_SOURCE_DIR}/cmake/godotcpp.cmake
|
2022-12-03 21:43:00 +00:00
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
godotcpp_options()
|
2022-12-03 21:43:00 +00:00
|
|
|
|
2024-09-18 22:41:03 +00:00
|
|
|
godotcpp_generate()
|