-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
99 lines (82 loc) · 3.42 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Root cmake file for project.
cmake_minimum_required(VERSION 2.8.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
option(USE_CLANG "Using Clang compiler" OFF)
if(USE_CLANG)
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
endif()
project(interactive_computer_graphics)
option(BUILD_CHAP_02 "Build Chap 02 subproject." ON)
option(BUILD_CHAP_03 "Build Chap 03 subproject." ON)
option(BUILD_CHAP_04 "Build Chap 04 subproject." ON)
option(BUILD_CHAP_05 "Build Chap 05 subproject." ON)
option(BUILD_CHAP_07 "Build Chap 07 subproject." ON)
option(BUILD_CHAP_08 "Build Chap 08 subproject." ON)
option(BUILD_CHAP_09 "Build Chap 09 subproject." ON)
option(BUILD_CHAP_10 "Build Chap 10 subproject." ON)
option(BUILD_APPEN_A "Build Appendix A subproject." ON)
add_library(GfxModule
${CMAKE_SOURCE_DIR}/common/InitShader.cc
)
target_link_libraries(GfxModule -lglut)
target_link_libraries(GfxModule -lGLEW)
target_link_libraries(GfxModule -lGL)
target_link_libraries(GfxModule -lGLU)
if(BUILD_CHAP_02)
add_subdirectory(chap_02/LINUX_VERSIONS/example1)
add_subdirectory(chap_02/LINUX_VERSIONS/example2)
add_subdirectory(chap_02/LINUX_VERSIONS/example3)
add_subdirectory(chap_02/LINUX_VERSIONS/example4)
add_subdirectory(chap_02/LINUX_VERSIONS/example4b)
add_subdirectory(chap_02/LINUX_VERSIONS/example5)
endif()
if(BUILD_CHAP_03)
add_subdirectory(chap_03/LINUX_VERSIONS/example1)
add_subdirectory(chap_03/LINUX_VERSIONS/example2)
add_subdirectory(chap_03/LINUX_VERSIONS/example6)
endif()
if(BUILD_CHAP_04)
add_subdirectory(chap_04/LINUX_VERSIONS/example1)
add_subdirectory(chap_04/LINUX_VERSIONS/example2)
add_subdirectory(chap_04/LINUX_VERSIONS/example3)
endif()
if(BUILD_CHAP_05)
add_subdirectory(chap_05/LINUX_VERSIONS/example1)
add_subdirectory(chap_05/LINUX_VERSIONS/example2)
add_subdirectory(chap_05/LINUX_VERSIONS/example3)
add_subdirectory(chap_05/LINUX_VERSIONS/example6)
endif()
if(BUILD_CHAP_07)
add_subdirectory(chap_07/LINUX_VERSIONS/example1)
add_subdirectory(chap_07/LINUX_VERSIONS/example2)
add_subdirectory(chap_07/LINUX_VERSIONS/example3)
endif()
if(BUILD_CHAP_08)
add_subdirectory(chap_08/LINUX_VERSIONS/example1)
add_subdirectory(chap_08/LINUX_VERSIONS/example2)
add_subdirectory(chap_08/LINUX_VERSIONS/example3)
endif()
if(BUILD_CHAP_09)
add_subdirectory(chap_09/LINUX_VERSIONS/example1)
add_subdirectory(chap_09/LINUX_VERSIONS/example1_6E)
add_subdirectory(chap_09/LINUX_VERSIONS/example2)
endif()
if(BUILD_CHAP_10)
add_subdirectory(chap_10/LINUX_VERSIONS/example1)
add_subdirectory(chap_10/LINUX_VERSIONS/example2)
add_subdirectory(chap_10/LINUX_VERSIONS/example3)
add_subdirectory(chap_10/LINUX_VERSIONS/example4)
endif()
if(BUILD_APPEN_A)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example2)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example3)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example4)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example5)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example6)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example7)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example8)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example9)
add_subdirectory(APPENDIX_A_EXAMPLES/LINUX_VERSIONS/append_example10)
endif()