1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/CMakeLists.txt

48 lines
1.5 KiB
Text
Raw Permalink Normal View History

2013-12-18 08:58:27 +00:00
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles/modules/")
project(sprout)
ENABLE_TESTING()
include(CheckIncludeFiles)
include (FindPkgConfig)
include(CheckCXXSourceCompiles)
# build type
2017-09-01 18:39:59 +00:00
if( NOT DEFINED CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE Debug)
endif( NOT DEFINED CMAKE_BUILD_TYPE )
option( BUILD_TESTS "If true Sprout's tests will be built" TRUE)
2013-12-18 08:58:27 +00:00
set(CMAKE_CXX_FLAGS_DEBUG "-W -Wall -Wextra -Wno-unused-parameter -Werror -std=c++0x -O0 -g")
set(CMAKE_C_FLAGS_DEBUG "-W -Wall -Wextra -Wno-unused-parameter -Werror -O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-W -Wall -Wextra -Wno-unused-parameter -Werror -std=c++0x -O2")
set(CMAKE_C_FLAGS_RELEASE "-W -Wall -Wextra -Wno-unused-parameter -Werror -O2")
#if you don't want the full compiler output, remove the following line
if( NOT DEFINED CMAKE_VERBOSE_MAKEFILE )
set(CMAKE_VERBOSE_MAKEFILE OFF)
endif( NOT DEFINED CMAKE_VERBOSE_MAKEFILE )
2017-09-01 18:39:59 +00:00
2013-12-18 08:58:27 +00:00
if( NOT DEFINED Boost_USE_MULTITHREADED )
set(Boost_USE_MULTITHREADED ON)
endif( NOT DEFINED Boost_USE_MULTITHREADED )
find_package( Boost 1.49.0 REQUIRED )
if( NOT Boost_FOUND )
message( SEND_ERROR "Required package Boost was not detected." )
endif (NOT Boost_FOUND)
pkg_check_modules(OpenCV opencv)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS} )
link_directories( ${Boost_LIBRARY_DIRS} )
2017-09-01 18:39:59 +00:00
subdirs( sprout tools cmake )
if( ${BUILD_TESTS} )
subdirs(libs)
endif( ${BUILD_TESTS} )
2013-12-18 08:58:27 +00:00