-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
41 lines (32 loc) · 1.48 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
#============================================================================
#
# Copyright (C) 2020 Ivan Pinezhaninov <ivan.pinezhaninov@gmail.com>
#
# This file is part of the IntervalTree - Red-Black balanced interval tree
# which can be found at https://github.com/IvanPinezhaninov/IntervalTree/.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
#============================================================================
cmake_minimum_required(VERSION 2.8.11)
project(IntervalTree CXX)
option(BUILD_EXAMPLE "Build example" OFF)
option(BUILD_TESTS "Build tests" OFF)
if(BUILD_EXAMPLE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/example)
endif(BUILD_EXAMPLE)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/catch)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)
endif(BUILD_TESTS)
set(HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/intervaltree.hpp)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
install(FILES ${HEADERS} DESTINATION include)