/
CMakeLists.txt
34 lines (26 loc) · 949 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
31
32
33
34
#In Qt Creator, run cmake with "-DCMAKE_BUILD_TYPE=Debug" to debug.
project(imgexp)
#common
cmake_policy(SET CMP0020 NEW)
cmake_minimum_required (VERSION 2.8.7)
add_definitions(-DJSON_IS_AMALGAMATION)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_DEBUG 0)
find_package(Boost 1.55.0)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-std=c++11 HAS_STD_CXX11)
if(HAS_STD_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
file(TO_CMAKE_PATH $ENV{JSONCPP_DIR} jsoncpp_dir)
set(jsoncpp_source ${jsoncpp_dir}/jsoncpp.cpp)
include_directories(include ${Boost_INCLUDE_DIR} ${jsoncpp_dir})
#imgexp
set(imgexp_source src/imgexp.cpp src/imgexputil.cpp)
set(imgexp_include include/config.h include/imgexputil.h include/imgexp.h)
add_library(imgexp STATIC ${jsoncpp_source} ${imgexp_source} ${imgexp_include})
SET_TARGET_PROPERTIES(imgexp PROPERTIES PREFIX "")
#imgexptest
add_subdirectory(test)
#expbuilder
add_subdirectory(expbuilder)