-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (46 loc) · 2.08 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
cmake_minimum_required(VERSION 3.6)
project(readdyviewer VERSION 1.0 LANGUAGES C CXX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(HIDDEN_FRANK_MODE OFF CACHE BOOL "hidden frank mode!")
set(BUILD_PYTHON_LIBRARY ON CACHE BOOL "build python library")
set(READDYVIEWER_ROOT ${CMAKE_SOURCE_DIR})
set(READDYVIEWER_BINARY_ROOT ${CMAKE_BINARY_DIR})
include(cmake/scripts/DownloadProject.cmake)
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/glfw-src)
download_project(PROJ glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.3.4
${UPDATE_DISCONNECTED_IF_AVAILABLE}
)
set(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
set(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
set(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
add_subdirectory(${glfw_SOURCE_DIR} ${glfw_BINARY_DIR})
else ()
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/glfw-src ${CMAKE_CURRENT_BINARY_DIR}/glfw-build)
endif ()
#set (OPTION_BUILD_EXAMPLES OFF CACHE BOOL "Don't need the examples")
#set (OPTION_BUILD_TESTS OFF CACHE BOOL "Don't need to test")
#set (OPTION_BUILD_GPU_TESTS OFF CACHE BOOL "Don't need to test")
#set (OPTION_BUILD_TOOLS OFF CACHE BOOL "Don't need the tools")
#if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/glbinding-src)
# download_project(PROJ glbinding
# GIT_REPOSITORY https://github.com/cginternals/glbinding.git
# GIT_TAG master
# ${UPDATE_DISCONNECTED_IF_AVAILABLE}
# )
# add_subdirectory(${glbinding_SOURCE_DIR} ${glbinding_BINARY_DIR})
#else ()
# add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/glbinding-src ${CMAKE_CURRENT_BINARY_DIR}/glbinding-build)
#endif ()
find_package(glbinding REQUIRED)
add_subdirectory(libs/pybind11)
# set(BUILD_SHARED_LIBS ON)
add_subdirectory(libs/fmt)
add_subdirectory(libs/spdlog)
add_subdirectory(libs/glm)
add_subdirectory(readdyviewer/resources/shaders)
add_subdirectory(readdyviewer/resources/textures)
add_subdirectory(src)