/
CMakeLists.txt
70 lines (58 loc) · 2 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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenEXR Project.
# We require this to get object library link library support and
# combined python 2 + 3 support
cmake_minimum_required(VERSION 3.12)
# we include this first to parse configure.ac and extract the version
# numbers
include(config/ParseConfigure.cmake)
project(OpenEXR VERSION ${OPENEXR_VERSION} LANGUAGES C CXX)
#######################################
#######################################
# This declares all the configuration variables visible
# in cmake-gui or similar and the rest of the global
# project setup
#
# Please look at this file to see what is configurable
#######################################
#######################################
include(config/OpenEXRSetup.cmake)
# Everyone depends on IlmBase, and we currently rely on
# the version matched with our release
find_package(IlmBase ${OPENEXR_VERSION} EXACT REQUIRED CONFIG)
# generates config headers, package config files
add_subdirectory(config)
# utility function for the repeated boilerplate of defining
# the libraries
include(config/LibraryDefine.cmake)
##########################
add_subdirectory( IlmImf )
add_subdirectory( IlmImfUtil )
add_subdirectory( IlmImfExamples )
##########################
# Tests
##########################
# Can't seem to do EXCLUDE_FROM_ALL on the test executables
# since you can't then create a dependency on the internal
# "test" target such that it is auto built
include(CTest)
if(BUILD_TESTING)
enable_testing()
add_subdirectory( IlmImfTest )
add_subdirectory( IlmImfUtilTest )
add_subdirectory( IlmImfFuzzTest )
endif()
##########################
# Binaries / Utilities
##########################
if(OPENEXR_BUILD_UTILS)
add_subdirectory( exr2aces )
add_subdirectory( exrheader )
add_subdirectory( exrmaketiled )
add_subdirectory( exrstdattr )
add_subdirectory( exrmakepreview )
add_subdirectory( exrenvmap )
add_subdirectory( exrmultiview )
add_subdirectory( exrmultipart )
endif()
add_subdirectory(doc)