forked from prideout/heman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (49 loc) · 1.22 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
cmake_minimum_required(VERSION 3.6)
project(heman)
find_package(OpenMP)
include_directories(include .)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(HEMAN_SOURCE
src/color.c
src/distance.c
src/draw.c
src/export.c
src/gaussian.c
src/generate.c
src/image.c
src/image.h
src/import.c
src/lighting.c
src/noise.c
src/noise.h
src/ops.c
src/points.c)
set(MATH_SOURCE
kazmath/aabb2.c
kazmath/aabb3.c
kazmath/mat3.c
kazmath/mat4.c
kazmath/plane.c
kazmath/quaternion.c
kazmath/ray2.c
kazmath/ray3.c
kazmath/utility.c
kazmath/vec2.c
kazmath/vec3.c
kazmath/vec4.c)
add_library(heman STATIC ${HEMAN_SOURCE} ${MATH_SOURCE})
target_include_directories(heman PUBLIC include)
if(OpenMP_CXX_FOUND)
target_link_libraries(heman PUBLIC OpenMP::OpenMP_CXX)
target_include_directories(heman PUBLIC OpenMP::OpenMP_CXX)
elseif(APPLE)
target_link_directories(heman PUBLIC /usr/local/lib)
target_link_libraries(heman PUBLIC omp)
target_include_directories(heman PUBLIC /usr/local/include)
endif()
if (APPLE)
target_compile_options(heman PUBLIC -Xclang -fopenmp)
endif()
if (WIN32)
target_compile_options(heman PUBLIC /openmp)
endif()