|
1 | 1 | # cmake arguments
|
2 | 2 | # CMAKE_BUILD_TYPE: Compilation target (Debug or Release defaults to Debug)
|
3 |
| -# |
| 3 | +# |
4 | 4 | # godot-cpp cmake arguments
|
5 | 5 | # GODOT_HEADERS_DIR: This is where the gdnative include folder is (godot_source/modules/gdnative/include)
|
6 | 6 | # GODOT_CUSTOM_API_FILE: This is if you have another path for the godot_api.json
|
7 |
| -# |
| 7 | +# |
8 | 8 | # Android cmake arguments
|
9 | 9 | # CMAKE_TOOLCHAIN_FILE: The path to the android cmake toolchain ($ANDROID_NDK/build/cmake/android.toolchain.cmake)
|
10 | 10 | # ANDROID_NDK: The path to the android ndk root folder
|
11 | 11 | # ANDROID_TOOLCHAIN_NAME: The android toolchain (arm-linux-androideabi-4.9 or aarch64-linux-android-4.9 or x86-4.9 or x86_64-4.9)
|
12 | 12 | # ANDROID_PLATFORM: The android platform version (android-23)
|
13 | 13 | # More info here: https://godot.readthedocs.io/en/latest/development/compiling/compiling_for_android.html
|
14 |
| -# |
| 14 | +# |
15 | 15 | # Examples
|
16 |
| -# |
| 16 | +# |
17 | 17 | # Builds a debug version:
|
18 | 18 | # cmake .
|
19 | 19 | # cmake --build .
|
20 |
| -# |
| 20 | +# |
21 | 21 | # Builds a release version with clang
|
22 | 22 | # CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" .
|
23 | 23 | # cmake --build .
|
24 |
| -# |
| 24 | +# |
25 | 25 | # Builds an android armeabi-v7a debug version:
|
26 | 26 | # cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_NDK=$ANDROID_NDK \
|
27 | 27 | # -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DANDROID_PLATFORM=android-23 -DCMAKE_BUILD_TYPE=Debug .
|
28 | 28 | # cmake --build .
|
29 |
| -# |
| 29 | +# |
30 | 30 | # Protip
|
31 | 31 | # Generate the buildfiles in a sub directory to not clutter the root directory with build files:
|
32 | 32 | # mkdir build && cd build && cmake -G "Unix Makefiles" .. && cmake --build .
|
33 |
| -# |
| 33 | +# |
34 | 34 | # Todo
|
35 | 35 | # Test build for Windows, Mac and mingw.
|
36 | 36 |
|
@@ -62,14 +62,14 @@ else()
|
62 | 62 | add_definitions(-DNDEBUG)
|
63 | 63 | endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
64 | 64 |
|
65 |
| -# Set the c++ standard to c++14 |
66 |
| -set(CMAKE_CXX_STANDARD 14) |
| 65 | +# Set the c++ standard to c++17 |
| 66 | +set(CMAKE_CXX_STANDARD 17) |
67 | 67 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
68 | 68 | set(CMAKE_CXX_EXTENSIONS OFF)
|
69 | 69 |
|
70 | 70 | # Input from user for godot headers and the api file
|
71 |
| -set(GODOT_HEADERS_DIR "godot-headers" CACHE STRING "") |
72 |
| -set(GODOT_CUSTOM_API_FILE "godot-headers/api.json" CACHE STRING "") |
| 71 | +set(GODOT_HEADERS_DIR "godot-headers-temp" CACHE STRING "") |
| 72 | +set(GODOT_CUSTOM_API_FILE "godot-headers-temp/extension_api.json" CACHE STRING "") |
73 | 73 |
|
74 | 74 | set(GODOT_COMPILE_FLAGS )
|
75 | 75 | set(GODOT_LINKER_FLAGS )
|
@@ -178,8 +178,7 @@ add_library(${PROJECT_NAME}
|
178 | 178 | target_include_directories(${PROJECT_NAME}
|
179 | 179 | PUBLIC
|
180 | 180 | include
|
181 |
| - include/core |
182 |
| - ${CMAKE_CURRENT_BINARY_DIR}/include/gen/ |
| 181 | + ${CMAKE_CURRENT_BINARY_DIR}/gen/include |
183 | 182 | )
|
184 | 183 |
|
185 | 184 | # Put godot headers as SYSTEM PUBLIC to exclude warnings from irrelevant headers
|
|
0 commit comments