-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (44 loc) · 1.61 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.5.0)
project(learn-opengl)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic")
# -fsanitize=address")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set(CMAKE_BUILD_RPATH ${CMAKE_SOURCE_DIR}/bin/)
# set(CMAKE_INSTALL_RPATH ${CMAKE_SOURCE_DIR}/bin/)
# Assimp
# set(3DPARTY_FOLDER ./extern)
# include(FetchContent)
# Set(FETCHCONTENT_QUIET FALSE)
# if(NOT TARGET assimp)
# message(STATUS "============start config assimp============")
# FetchContent_Declare(
# assimp
# GIT_REPOSITORY https://gitclone.com/github.com/assimp/assimp.git
# GIT_TAG v5.2.5
# GIT_PROGRESS TRUE
# SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/assimp
# )
# set(ASSIMP_FOLDER ${3DPARTY_FOLDER}/assimp)
# set(ASSIMP_BUILD_OBJ_IMPORTER ON CACHE INTERNAL "")
# set(ASSIMP_DOUBLE_PRECISION ON CACHE INTERNAL "")
# set(ASSIMP_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "")
# set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE INTERNAL "")
# set(ASSIMP_BUILD_TESTS OFF CACHE INTERNAL "")
# set(ASSIMP_INSTALL OFF CACHE INTERNAL "")
# FetchContent_MakeAvailable(assimp)
# set_target_properties(assimp PROPERTIES DEBUG_POSTFIX "_debug")
# set_target_properties(assimp PROPERTIES RELEASE_POSTFIX "_release")
# endif()
# OpenGL
# find_package(OpenGL REQUIRED)
include_directories(
./extern
./include
./src
)
add_subdirectory(./src)
add_subdirectory(./apps)
add_subdirectory(./extern/ImGui)