-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
60 lines (49 loc) · 1.26 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
PROJECT(BDM C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.7)
FIND_PACKAGE(PNG REQUIRED)
ADD_DEFINITIONS(${PNG_DEFINITIONS})
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIRS})
LINK_LIBRARIES(${PNG_LIBRARIES})
SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost 1.48 COMPONENTS system chrono timer REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_LIBRARIES(${Boost_LIBRARIES})
FIND_PACKAGE(OpenMP REQUIRED)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
SET(SRC_MATH
src/math/matrix4x4.cpp
src/math/point.cpp
src/math/transform.cpp
src/math/vector.cpp
)
SET(SRC_TOOLS
src/tools/tinystr.cpp
src/tools/tinyxml.cpp
src/tools/tinyxmlerror.cpp
src/tools/tinyxmlparser.cpp
)
SET(SRC_MAIN
src/aggregate.cpp
src/bbox.cpp
src/bde.cpp
src/bdesettings.cpp
src/camera.cpp
src/image.cpp
src/kdtreeaccel.cpp
src/light.cpp
src/material.cpp
src/memoryarena.cpp
src/montecarlo.cpp
src/parser.cpp
src/pointlight.cpp
src/ray.cpp
src/render.cpp
src/sampler.cpp
src/scene.cpp
src/surfel.cpp
)
INCLUDE_DIRECTORIES(src src/math src/tools)
ADD_LIBRARY(bdemath ${SRC_MATH})
ADD_EXECUTABLE(bde ${SRC_MAIN} ${SRC_TOOLS})
TARGET_LINK_LIBRARIES(bde bdemath)