-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
104 lines (91 loc) · 2.8 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
100
101
102
103
104
cmake_minimum_required(VERSION 3.14.2)
project(PlanetGenerator)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
find_package(OpenGL REQUIRED)
#set( USE_GLUT )
set(USE_SDL ON)
if (MINGW)
elseif (USE_GLUT)
find_package(GLUT REQUIRED)
elseif (USE_SDL)
find_package(SDL REQUIRED)
endif ()
set(VL_BASE_COMPONENTS VLMain VLX VLGraphics VLCore VLVG VLVolume VLMolecule FreeType JPG PNG TIFF ZLib)
if (MINGW)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLWin32 REQUIRED)
elseif (USE_GLUT)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLGLUT REQUIRED)
elseif (USE_SDL)
find_package(VL COMPONENTS ${VL_BASE_COMPONENTS} VLSDL REQUIRED)
endif ()
add_definitions(-DVL_STATIC_LINKING)
# add VL include directories
include_directories(${VL_INCLUDE_DIRS})
if (MINGW)
set(PLATFORM_ENTRY win32_main.cpp)
elseif (USE_GLUT)
include_directories(${GLUT_INCLUDE_DIR})
set(PLATFORM_ENTRY glut_main.cpp)
elseif (USE_SDL)
include_directories(${SDL_INCLUDE_DIR})
set(PLATFORM_ENTRY sdl_main.cpp)
endif ()
add_executable(
PlanetGenerator
${PLATFORM_ENTRY}
MainWindow.cpp
MainWindow.h
util/fmath.cpp
util/fmath.h
delaunator.h
IndexedTessellator.cpp
IndexedTessellator.h
Planet.cpp
Planet.h
util/Profiler.cpp
util/Profiler.h
Graph.cpp
Graph.h
geom/DrawArrayGeometry.cpp
geom/DrawArrayGeometry.h
geom/BorderLineGeometry.cpp
geom/BorderLineGeometry.h
geom/CellLineGeometry.cpp
geom/CellLineGeometry.cpp
geom/CellLineGeometry.h
geom/CellVectorGeometry.cpp
geom/CellVectorGeometry.h
geom/PlanetGeometry.cpp
geom/PlanetGeometry.h
geom/DrawElementsGeometry.cpp
geom/DrawElementsGeometry.h
geom/RingGeometry.cpp
geom/RingGeometry.h
geom/PointsGeometry.cpp
geom/PointsGeometry.h
geom/TriangleGeometry.cpp
geom/TriangleGeometry.h
geom/CentroidsGeometry.cpp
geom/CentroidsGeometry.h
geom/WorldAxis.cpp
geom/WorldAxis.h
geom/GradientRingGeometry.cpp
geom/GradientRingGeometry.h
util/parameter.h
util/tree.h
PlanetIntersector.cpp
PlanetIntersector.h
util/PerlinNoise.h
util/PerlinNoise.cpp
geom/PlateOriginGeometry.cpp
geom/PlateOriginGeometry.h
util/keys.h
util/keys.cpp)
if (MINGW)
target_link_libraries(PlanetGenerator ${VL_LIBRARIES} ${OPENGL_LIBRARIES} -static)
elseif (USE_GLUT)
target_link_libraries(PlanetGenerator ${VL_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
elseif (USE_SDL)
target_link_libraries(PlanetGenerator ${VL_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL_LIBRARY})
endif ()