blob: e586c400e42e6217bd6e52651b2d7cad4440d07f (
plain)
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
|
Only use FITS support if explicitly enabled.
--- luminance-hdr-2.4.0/CMakeLists.txt
+++ luminance-hdr-2.4.0/CMakeLists.txt
@@ -10,6 +10,8 @@
include(cmake/CompilerSettings.cmake)
include(cmake/Internationalization.cmake)
+OPTION(USE_FITS "Enable FITS support." ON)
+
# find and setup Qt5 for this project
# Tell CMake to run moc when necessary:
@@ -122,13 +124,15 @@
INCLUDE_DIRECTORIES(${JPEGLIB_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR})
-FIND_PACKAGE(CCfits)
-IF(CCFITS_FOUND)
- INCLUDE_DIRECTORIES(${CCFITS_INCLUDE_DIRS})
- SET(LIBS ${LIBS} ${CCFITS_LIBRARIES})
- ADD_DEFINITIONS(-DHAVE_CCFITS)
-ELSE()
- message(WARNING "CCfits not found! Building without FITS support!")
+IF(USE_FITS)
+ FIND_PACKAGE(CCfits REQUIRED)
+ IF(CCFITS_FOUND)
+ INCLUDE_DIRECTORIES(${CCFITS_INCLUDE_DIRS})
+ SET(LIBS ${LIBS} ${CCFITS_LIBRARIES})
+ ADD_DEFINITIONS(-DHAVE_CCFITS)
+ ELSE()
+ MESSAGE(FATAL_ERROR "CCfits not found!")
+ ENDIF()
ENDIF()
SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
|