Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
godot-cpp/CMakeLists.txt at master · HiddenVariableStudios/godot-cpp · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
HiddenVariableStudios
godot-cpp
Repository navigation
Code
Pull requests
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
godot-cpp
/
CMakeLists.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
82 lines (62 loc) · 2.81 KB
master
Breadcrumbs
godot-cpp
/
CMakeLists.txt
Copy path
Top
File metadata and controls
Code
Blame
82 lines (62 loc) · 2.81 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required
(
VERSION
3.10...3.17
)
#[=======================================================================[
.rst:
CMake Version requirements
--------------------------
To enable use of the emscripten emsdk hack for pseudo shared library support
without polluting options for consumers we need to use the
CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE which was introduced in version 3.17
For more information check cmake/emsdkHack.cmake
SCons Compatibility
-------------------
There is an understandable conflict between build systems as they define
similar concepts in different ways. When there isn't a 1:1 relationship,
compromises need to be made to resolve those differences.
As we are attempting to maintain feature parity, and ease of maintenance, these
CMake scripts are built to resemble the SCons build system wherever possible.
Where they are not, we will attempt to document common difference in
the docs (https://docs.godotengine.org/en/latest/tutorials/scripting/cpp/build_system/cmake.html)
and platform specific differences in their respective
cmake/<platform>.cmake file.
The file structure and file content are made to match, if not in content then
in spirit. The closer the two build systems look the easier they will be to
maintain.
Where the SCons additional scripts in the tools directory, The CMake scripts
are in the cmake directory.
For example; the tools/godotcpp.py is matched by the cmake/godotcpp.cmake file
.. highlight:: python
cpp_tool = Tool("godotcpp", toolpath=["tools"])
cpp_tool.options(opts, env)
The CMake equivalent is below.
]=======================================================================]
include
(
cmake/godotcpp.cmake
)
godotcpp_options
()
#[[
People are compiling godot by itself and expecting template_debug
Replace this with PROJECT_IS_TOP_LEVEL, <PROJECT-NAME>_IS_TOP_LEVEL when minimum reaches 3.21
]]
if
(
NOT
PROJECT_NAME
)
set
(GODOTCPP_IS_TOP_LEVEL
ON
)
endif
()
#
Define our project.
project
(
godot-cpp
VERSION
10.0
DESCRIPTION
"C++ bindings for the Godot Engine's GDExtensions API."
HOMEPAGE_URL
"https://github.com/godotengine/godot-cpp"
LANGUAGES
CXX
)
#
Set the default API version for the test project.
#
We're only setting this here because the test project is built weird;
#
in a normal project, it would be set before including this CMakeLists.txt.
if
(GODOTCPP_ENABLE_TESTING)
set
(GODOTCPP_DEFAULT_API_VERSION
"4.7"
)
endif
()
compiler_detection
()
godotcpp_generate
()
#
Conditionally enable the godot-cpp.test.<target> integration testing targets
if
(GODOTCPP_ENABLE_TESTING)
add_subdirectory
(
test
)
endif
()
#[[
If this is the top level CMakeLists.txt, Generators which honor the
USE_FOLDERS flag will organize godot-cpp targets under a subfolder named
'godot-cpp'. This is enable by default from CMake version 3.26
]]
set_property
(
GLOBAL
PROPERTY
USE_FOLDERS
ON
)
You can’t perform that action at this time.