-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·54 lines (42 loc) · 1.33 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
cmake_minimum_required(VERSION 2.8)
project(envmap)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/modules)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
include_directories( "src/")
include_directories(SYSTEM "deps/")
set(SOURCES
src/envmap.cpp src/envUtils.cpp
src/computeSphericalHarmonicsFromCubemap.cpp
src/environmentConversion.cpp
src/prefilterCubemapGGX.cpp
src/package.cpp
src/utils.cpp
src/io.cpp
src/log.cpp
src/encode.cpp
src/Image.cpp
src/Cubemap.cpp
src/SummedAreaTable.cpp
src/lightExtraction.cpp
)
set(CLANG_FORMAT_EXCLUDE_PATTERNS "build/" "debug/" "deps/")
include("${CMAKE_MODULE_PATH}/ClangFormat.cmake")
add_executable(envmap ${SOURCES})
target_link_libraries(envmap pthread)
target_compile_options(envmap PRIVATE -Wall -Wextra -pedantic -Werror -Wdouble-promotion -Wmissing-variable-declarations -Wfloat-conversion -Wpadded -g)
install(TARGETS envmap
RUNTIME DESTINATION bin
)
add_executable(sampling
tests/sampling.cpp
src/Cubemap.cpp
src/Image.cpp
)
target_link_libraries(sampling)
target_compile_options(sampling PRIVATE -Wall -Wextra -pedantic -Werror -Wdouble-promotion -Wmissing-variable-declarations -Wfloat-conversion -Wpadded -g)
add_custom_target(check)
add_custom_command( TARGET check
POST_BUILD
COMMAND ./sampling
)