Skip to content

Commit f6d2bd1

Browse files
committed
Updated cmake to actually build something
1 parent 742fa11 commit f6d2bd1

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
cmake_minimum_required(VERSION 3.1)
2-
project(spatialalgorithms LANGUAGES CXX)
2+
project(spatialalgorithms LANGUAGES CXX C)
33
set(CMAKE_CXX_STANDARD 14)
44

55
include(cmake/spatialalgorithms.cmake)
66
include(cmake/mason.cmake)
77

88
mason_use(boost VERSION 1.63.0 HEADER_ONLY)
9+
mason_use(geometry VERSION 0.9.0 HEADER_ONLY)
910
mason_use(variant VERSION 1.1.4 HEADER_ONLY)
1011
mason_use(wagyu VERSION 0.4.1 HEADER_ONLY)
12+
13+
14+
include_directories("${PROJECT_SOURCE_DIR}/include")
15+
16+
file(GLOB_RECURSE Sources src src/*.cpp)
17+
18+
add_library(spatialalgorithms ${Sources})
19+
target_include_directories(spatialalgorithms SYSTEM PRIVATE ${MASON_PACKAGE_boost_INCLUDE_DIRS})
20+
target_include_directories(spatialalgorithms SYSTEM PUBLIC ${MASON_PACKAGE_geometry_INCLUDE_DIRS})
21+
target_include_directories(spatialalgorithms SYSTEM PRIVATE ${MASON_PACKAGE_wagyu_INCLUDE_DIRS})
22+
target_include_directories(spatialalgorithms SYSTEM PUBLIC ${MASON_PACKAGE_variant_INCLUDE_DIRS})
23+
24+
file(GLOB_RECURSE Test_Sources test test/*.cpp)
25+
add_executable(test_sa ${Test_Sources})
26+
target_include_directories(test_sa SYSTEM PRIVATE ${MASON_PACKAGE_boost_INCLUDE_DIRS})
27+
target_include_directories(test_sa SYSTEM PUBLIC ${MASON_PACKAGE_geometry_INCLUDE_DIRS})
28+
target_include_directories(test_sa SYSTEM PRIVATE ${MASON_PACKAGE_wagyu_INCLUDE_DIRS})
29+
target_include_directories(test_sa SYSTEM PUBLIC ${MASON_PACKAGE_variant_INCLUDE_DIRS})
30+

0 commit comments

Comments
 (0)