-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
69 lines (55 loc) · 2.04 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.27.7)
project(VAULT_ENGINE)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/vendor)
include_directories(${CMAKE_SOURCE_DIR}/external/bullet)
add_subdirectory(api)
if(NOT PROJECT_SELECTOR)
add_subdirectory(app)
else()
add_subdirectory(app-project)
endif()
add_subdirectory(engine)
# add_subdirectory(hyperscript)
add_subdirectory(external/box2d)
add_subdirectory(vendor/imgui)
add_subdirectory(vendor/ImGuizmo)
add_subdirectory(external/efsw)
add_subdirectory(external/discord-rpc)
if (NOT EMSCRIPTEN)
add_subdirectory(external/glfw)
else()
include_directories(/usr/lib/emsdk/upstream/emscripten/cache/sysroot/include)
set_target_properties(api
PROPERTIES SUFFIX ".html"
LINK_FLAGS " --bind -s WASM=0 -s MIN_WEBGL_VERSION=1 -s ABORT_ON_WASM_EXCEPTIONS=1 -g2 -s USE_GLFW=3")
set_target_properties(app
PROPERTIES SUFFIX ".html"
LINK_FLAGS " --bind -s WASM=0 -s MIN_WEBGL_VERSION=1 -s ABORT_ON_WASM_EXCEPTIONS=1 -g2 -s USE_GLFW=3")
set_target_properties(engine
PROPERTIES SUFFIX ".html"
LINK_FLAGS " --bind -s WASM=0 -s MIN_WEBGL_VERSION=1 -s ABORT_ON_WASM_EXCEPTIONS=1 -g2 -s USE_GLFW=3")
endif()
add_subdirectory(external/assimp)
add_subdirectory(external/yaml-cpp)
add_subdirectory(external/bullet)
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++ -w")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
# file(GLOB SRC_FILES
# "include/*.hpp"
# "src/*.cpp"
# "include/*/*.hpp"
# "src/*/*.cpp"
# "include/*/*/*.hpp"
# "src/*/*/*.cpp"
# "include/*/*/*/*.hpp"
# "src/*/*/*/*.cpp"
# )
# include_directories(${CMAKE_SOURCE_DIR}/include)
# include_directories(${CMAKE_SOURCE_DIR}/vendor)
# add_executable(${PROJECT_NAME} ${SRC_FILES})
# # target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/libGL.so)
# target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/libglfw.so)
# target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/glad.o)