mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
Add support for CMake
This commit is contained in:
parent
403e83eaf0
commit
e3cb3bae99
35 changed files with 583 additions and 1 deletions
39
CMakeLists.txt
Normal file
39
CMakeLists.txt
Normal file
|
@ -0,0 +1,39 @@
|
|||
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
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
|
||||
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 )
|
||||
|
||||
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} )
|
||||
subdirs( sprout libs tools cmake )
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue