-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
72 lines (60 loc) · 1.44 KB
/
CMakeLists.txt
File metadata and controls
72 lines (60 loc) · 1.44 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
project(srccmake)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake CACHE PATH "Project specific path. Set manually if it was not found.")
set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps)
find_package(ASSIMP REQUIRED)
find_package(GLFW3 REQUIRED)
find_package(GLM REQUIRED)
include_directories(
${ASSIMP_INCLUDE_DIR}
${GLFW3_INCLUDE_PATH}
${GLM_INCLUDE_PATH}
${EXTERNAL_DIR}/gl3w/include
${EXTERNAL_DIR}/imgui
${EXTERNAL_DIR}/stb
)
# copy dlls
set(DLLS
${GLFW3_DLL}
${ASSIMP_DLL}
)
file(COPY ${DLLS} DESTINATION /)
# copy other files
file(COPY shader DESTINATION /)
file(COPY textures DESTINATION /)
file(COPY model DESTINATION /)
# add source files
file(GLOB_RECURSE SOURCE_FILES
"src/*.cpp"
)
# add gl3w
file(GLOB_RECURSE GL3W
"${EXTERNAL_DIR}/gl3w/src/*.c"
)
# add stb_image
file(GLOB_RECURSE STB
"${EXTERNAL_DIR}/stb/*.h"
"${EXTERNAL_DIR}/stb/*.c"
)
# add imgui
file(GLOB_RECURSE IMGUI
"${EXTERNAL_DIR}/imgui/*.h"
"${EXTERNAL_DIR}/imgui/*.cpp"
)
add_executable(OpenGLTutorial
${SOURCE_FILES}
${GL3W}
${STB}
${IMGUI}
)
target_link_libraries(OpenGLTutorial
opengl32.lib
${GLFW3_LIBRARY}
ole32.lib
oleaut32.lib
version.lib
imm32.lib
winmm.lib
${ASSIMP_LIBRARY}
)