forked from frkd-dev/yuvit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (34 loc) · 1.29 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
cmake_minimum_required(VERSION 2.8.0)
project(yuvit)
set(PROJECT_VERSION 0.1.1)
set(PROJECT_URL "https://github.com/stunpix/yuvit")
set(PROJECT_AUTHOR "Alexander Shashkevich <[email protected]>")
set(PROJECT_LICENSE "LGPLv3")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
# set strict code checking
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c1x -Werror -pedantic -Wall -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Werror -pedantic -Wall -Wextra")
find_path(FreeImageIncludeDir NAMES FreeImage.h)
find_library(FreeImageLib freeimage)
if(FreeImageIncludeDir MATCHES "NOTFOUND" OR FreeImageLib MATCHES "NOTFOUND")
message(FATAL_ERROR "NOT FOUND: FreeImage.
Not installed? Try install:
Debian: sudo apt-get install libfreeimage-dev
RedHat: sudo yum install freeimage-devel
OS X: brew install freeimage")
else()
if(CMAKE_HOST_APPLE)
# On OS X freeimage installed under /usr/local and
# clang doesn't see it, so we must set paths explicitly
get_filename_component(FreeImageLibDir ${FreeImageLib} DIRECTORY)
include_directories(${FreeImageIncludeDir})
link_directories(${FreeImageLibDir})
endif()
message(STATUS "FreeImage: FOUND")
endif()
include_directories(${PROJECT_BINARY_DIR})
configure_file(config.h.in config.h)
add_subdirectory(src)
include(CPackOptions.txt)