-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
51 lines (41 loc) · 1.11 KB
/
Copy pathCMakeLists.txt
File metadata and controls
51 lines (41 loc) · 1.11 KB
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
cmake_minimum_required(VERSION 3.19)
project(godot-gameplay-abilities)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
## the name must be like lib{project_name}.{platform}.{debug/release}.{arch}.{ext}
## the platform are windows, linux, android, etc
## the envs are debug or release
## the arch is x86_64, arm32, arm64
## the ext is dll, so, dylib, etc
if (WIN32)
set(PLATFORM "windows")
set(EXT "dll")
elseif (UNIX AND NOT APPLE)
## use uname -m to get the actual arch
set(PLATFORM "linux")
set(EXT "so")
elseif (ANDROID)
set(PLATFORM "android")
set(EXT "so")
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(DEBUG_RELEASE "debug")
else ()
set(DEBUG_RELEASE "release")
endif ()
if (NOT DEFINED ARCH)
if (CMAKE_SIZEOF_VOID_P GREATER 4)
set(ARCH x86_64)
else ()
set(ARCH x86)
endif ()
endif ()
include(FetchContent)
FetchContent_Declare(
GDExtension
GIT_REPOSITORY https://github.com/godotengine/godot-cpp.git
GIT_TAG 4.4
)
FetchContent_MakeAvailable(GDExtension)
add_subdirectory(src)