-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
38 lines (30 loc) · 1.01 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
cmake_minimum_required(VERSION 3.12)
project(intersect)
set(CMAKE_CXX_STANDARD 11)
add_compile_definitions(THIS_PROJECT_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
# test boost.geometry.spatial_indexes.rtree
set(TEST_BOOST_RTREE OFF)
if(TEST_BOOST_RTREE)
set(Boost_INCLUDE_DIR "..//boost_1_79_0")
set(Boost_LIBRARY_DIRS "..//boost_1_79_0//stage//lib")
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(BOOST_ALL_DYN_LINK ON)
add_compile_definitions(TEST_BOOST_RTREE)
endif()
# 工程文件
aux_source_directory(./ SRCS)
aux_source_directory(./bound SRCS)
aux_source_directory(./common SRCS)
aux_source_directory(./sqlite SRCS)
aux_source_directory(./test SRCS)
#打印SRC中列表信息
message(STATUS "SRC = ${SRCS}")
add_executable(${PROJECT_NAME} ${SRCS})
if(TEST_BOOST_RTREE)
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
endif()