Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Xcode example
Browse files Browse the repository at this point in the history
Vano committed May 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent fa4a391 commit d5e261c
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration for building godot-cpp only
# See `tests/CMakeLists.txt` for example configuration
########## Configuration for building godot-cpp only ##########
########## See `tests/CMakeLists.txt` for example configuration ##########
#
# Main cmake arguments
#
@@ -28,18 +28,21 @@
# cmake . -Bbuild
# cmake --build build
#
#
# Builds template_release version
#
# cmake -DTARGET=TEMPLATE_RELEASE -Bbuild
# cmake --build build
#
#
# Creates multi-config setup and builds Release version
#
# cmake -G "Ninja Multi-Config" -Bbuild # For Linux/non-MSVC
# OR
# cmake -G "Visual Studio 16 2019" -A x64 -Bbuild # For Windows/MSVC
# cmake --build build --config Release
#
#
# Builds web version, using Emscripten toolchain
#
# cmake --toolchain /usr/lib/emscripten/cmake/Modules/Platform/Emscripten.cmake -Bbuild
@@ -52,8 +55,9 @@
# cmake --build build
#
#
# TODO:
# Test builds for MacOS/IOS
# Builds MacOS version via Xcode
# cmake -G Xcode -Bbuild
# cmake --build build

cmake_minimum_required(VERSION 3.13)
project(godot-cpp LANGUAGES CXX)
2 changes: 1 addition & 1 deletion cmake/macos.cmake
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ list(APPEND GODOT_C_FLAGS
>

$<$<NOT:$<STREQUAL:${MACOS_DEPLOYMENT_TARGET},DEFAULT>>:
-mmacosx-version-min=${MACOS_DEPLOYMENT_TARGET}
-mmacosx-version-min=${MACOS_DEPLOYMENT_TARGET}
>
)

4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ add_subdirectory(
)

# Get Sources
file(GLOB_RECURSE SOURCES src/*.c**)
file(GLOB_RECURSE HEADERS src/*.h**)
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.c**)
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS src/*.h**)

get_target_property(LIBRARY_SUFFIX godot-cpp LIBRARY_SUFFIX)

0 comments on commit d5e261c

Please sign in to comment.