-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
72 lines (58 loc) · 1.83 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
68
69
70
71
72
cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0022 NEW)
cmake_policy(SET CMP0079 NEW)
project(reproject VERSION 0.1)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_CXX_STANDARD 17)
add_subdirectory(lib/filesystem)
add_subdirectory(lib/cxxopts)
add_subdirectory(lib/tracy)
add_library(TracyHeaders INTERFACE)
target_include_directories(TracyHeaders INTERFACE "lib/tracy/")
if ($TRACY_ENABLE)
add_definitions(-DTRACY_ENABLE)
endif()
add_library(lodepng STATIC "lib/lodepng/lodepng.cpp")
target_include_directories(lodepng PUBLIC "lib/lodepng/")
add_subdirectory(lib/Imath)
set(OPENEXR_INSTALL OFF CACHE BOOL "" FORCE)
set(OPENEXR_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
set(OPENEXR_INSTALL_TOOLS OFF CACHE BOOL "" FORCE)
set(OPENEXR_INSTALL_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(lib/openexr)
target_link_libraries(OpenEXRCore PUBLIC Imath::Imath)
add_library(ctpl INTERFACE)
target_include_directories(ctpl INTERFACE "lib/ctpl/")
set(JSON_MultipleHeaders ON CACHE BOOL "" FORCE)
add_subdirectory(lib/json)
find_package(JPEG)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
add_executable(reproject
"src/main.cpp"
"src/reproject.cpp"
"src/image_formats.cpp"
"src/config.cpp"
)
target_include_directories(reproject PUBLIC "src")
target_link_libraries(reproject PUBLIC
TracyHeaders
ghc_filesystem
lodepng
cxxopts
TracyClient
OpenEXR::OpenEXR
ctpl
nlohmann_json
JPEG::JPEG
)
set_target_properties(reproject PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
target_compile_definitions(reproject PRIVATE -D_USE_MATH_DEFINES)
foreach(LIBRARY OpenEXRCore OpenEXR Imath Iex IlmThread)
set_target_properties(${LIBRARY} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
endforeach()