-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (24 loc) · 947 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
project(dcraw)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
option(WITH_JPEG "Use libjpeg for decoding some compressed images and lossy Adobe DNGs." OFF)
add_executable(dcraw "dcraw.c")
if(WITH_JPEG)
find_package(JPEG)
include_directories(${JPEG_INCLUDE_DIR})
target_link_libraries(dcraw ${JPEG_LIBRARIES})
else()
add_definitions(/DNO_JPEG)
endif()
# TODO: Add support for JasPer and LCMS.
add_definitions(/DNO_JASPER)
add_definitions(/DNO_LCMS)
if(MSVC)
# Disable some warnings.
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
add_definitions(/wd4018) # '<' : signed/unsigned mismatch
add_definitions(/wd4244) # '=' : conversion from 'double' to 'float', possible loss of data
add_definitions(/wd4305) # '*=' : truncation from 'double' to 'float'
endif(MSVC)