-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
41 lines (34 loc) · 957 Bytes
/
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
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
#link_directories (/usr/lib)
#include_directories (/usr/include)
IF(APPLE)
FIND_LIBRARY(GLUT_LIBRARY GLUT)
FIND_LIBRARY(OpenGL_LIBRARY OpenGL)
find_package(PNG REQUIRED)
include_directories(${PNG_INCLUDE_DIR})
include_directories(/usr/X11R6/include/)
link_directories(/usr/X11R6/lib)
set(EXT_LIBRARIES ${OpenGL_LIBRARY} GLEW GLU ${GLUT_LIBRARY} ${PNG_LIBRARY})
ELSE()
set(EXT_LIBRARIES GL GLEW GLU glut png)
ENDIF()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nvModel)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nvImage)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(nvModel)
add_subdirectory(nvImage)
add_executable (
csm_demo_glm
src/cascaded_shadow_maps.cpp
src/terrain.cpp
src/utility.cpp
src/camera.cpp
src/frustum.cpp
src/shadow_map.cpp
)
target_link_libraries (
csm_demo_glm
nvimage_static
nvmodel_static
${EXT_LIBRARIES}
)