forked from podgorskiy/ProceduralSky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (53 loc) · 2.93 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
cmake_minimum_required (VERSION 2.8)
project (ProceduralSky)
option (GLFW_BUILD_EXAMPLES OFF)
option (GLFW_BUILD_TESTS OFF)
option (GLFW_INSTALL OFF)
message("Executing gl3w_gen.py")
execute_process(COMMAND python gl3w_gen.py WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/gl3w)
add_subdirectory (libs/glfw)
add_subdirectory (libs/gl3w)
add_subdirectory (libs/pugixml/scripts)
include_directories(libs/glfw/include)
include_directories(libs/gl3w/include)
include_directories(libs/glm)
include_directories(libs/imgui)
include_directories(libs/pugixml/src)
include_directories(libs/lz4/lib)
include_directories(libs/SimpleText/include)
include_directories(sources/SBFramework)
find_package(OpenGL)
if (OPENGL_FOUND)
message("OpenGL Correctly Found")
include_directories(${OPENGL_INCLUDE_DIR})
else (OPENGL_FOUND)
message("OpenGL environment missing")
endif (OPENGL_FOUND)
include_directories("${PROJECT_BINARY_DIR}")
file(GLOB_RECURSE SOURCES sources/*.cpp sources/*.h)
file(GLOB SOURCES_IMGUI libs/imgui/*.cpp libs/imgui/*.h)
set(LZ4_DIR libs/lz4/lib/)
set(SOURCES_LZ4 ${LZ4_DIR}lz4.c ${LZ4_DIR}lz4hc.c ${LZ4_DIR}lz4.h ${LZ4_DIR}lz4hc.h ${LZ4_DIR}xxhash.c ${LZ4_DIR}xxhash.h)
file(GLOB SOURCES_SBFRAMEWORK sources/SBFramework/*.cpp sources/SBFramework/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBSCENE sources/SBFramework/SBScene/*.cpp sources/SBFramework/SBScene/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBSHADER sources/SBFramework/SBShader/*.cpp sources/SBFramework/SBShader/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBDYNAMICDATA sources/SBFramework/SBDynamicData/*.cpp sources/SBFramework/SBDynamicData/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBTIMER sources/SBFramework/SBTimer/*.cpp sources/SBFramework/SBTimer/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBASYNCDATA sources/SBFramework/SBAsyncDataLoad/*.cpp sources/SBFramework/SBAsyncDataLoad/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBFILESYSTEM sources/SBFramework/SBFileSystem/*.cpp sources/SBFramework/SBFileSystem/*.h)
file(GLOB SOURCES_SBFRAMEWORK_SBTEXTURE sources/SBFramework/SBTexture/*.cpp sources/SBFramework/SBTexture/*.h)
source_group("" FILES ${SOURCES})
source_group(SBFramework FILES ${SOURCES_SBFRAMEWORK})
source_group(SBFramework\\SBScene FILES ${SOURCES_SBFRAMEWORK_SBSCENE})
source_group(SBFramework\\SBShader FILES ${SOURCES_SBFRAMEWORK_SBSHADER})
source_group(SBFramework\\SBDynamicData FILES ${SOURCES_SBFRAMEWORK_SBDYNAMICDATA})
source_group(SBFramework\\SBTimer FILES ${SOURCES_SBFRAMEWORK_SBTIMER})
source_group(SBFramework\\SBAsyncDataLoad FILES ${SOURCES_SBFRAMEWORK_SBASYNCDATA})
source_group(SBFramework\\SBFileSystem FILES ${SOURCES_SBFRAMEWORK_SBFILESYSTEM})
source_group(SBFramework\\SBTexture FILES ${SOURCES_SBFRAMEWORK_SBTEXTURE})
add_library(imgui ${SOURCES_IMGUI})
add_library(lz4 ${SOURCES_LZ4})
add_definitions(-DFORCE_PROFILING)
add_executable(ProceduralSky ${SOURCES})
target_link_libraries(ProceduralSky glfw gl3w imgui pugixml lz4 ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES})
set(EXECUTABLE_NAME "ProceduralSky")