forked from deltille/detector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (48 loc) · 1.83 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## Copyright (C) 2017-present, Facebook, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with this library; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(Deltille VERSION 1.0.0 LANGUAGES C CXX)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake")
include(GNUInstallDirs)
option(BUILD_APPS "Build the executable to detect and write corners to disk. Requires Boost" OFF)
option(WITH_MATLAB "Build Matlab buindings" OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
else()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(WARNING "CMAKE_BUILD_TYPE is set to Debug. This will be produce inefficient code")
endif()
endif()
set(CMAKE_CXX_EXTENSIONS OFF)
if(MSVC)
add_compile_options(/W3 /WX)
else()
add_compile_options(-Wall)
endif()
add_subdirectory(src)
if(BUILD_APPS)
add_subdirectory(apps)
endif()
if(WITH_MATLAB)
include(ExternalProject)
add_subdirectory(matlab)
endif()
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()