-
Notifications
You must be signed in to change notification settings - Fork 130
/
CMakeLists.txt
56 lines (42 loc) · 1.36 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
cmake_minimum_required(VERSION 3.1.0)
project(cofusion)
set(CMAKE_CXX_STANDARD 14)
# Warnings / Errors
add_compile_options(-Wall -Wno-unused-function -Wno-unused-variable
-Wno-unused-but-set-variable -Wno-unused-but-set-variable -Wno-write-strings
-Wno-deprecated -Wno-deprecated-declarations -Werror -Wno-unknown-pragmas)
# Don't follow symlinks when FILE GLOB_RECURSE (and don't warn)
cmake_policy(SET CMP0009 NEW)
set(BUILD_TESTS OFF CACHE BOOL "Build unit tests")
# OpenMP
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
# boost
find_package(Boost REQUIRED)
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
# gSLICr
find_package(gSLICr REQUIRED)
# Pangolin
find_package(Pangolin 0.5 REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})
# Eigen3
find_package (Eigen3 REQUIRED NO_MODULE)
# project-wide paths
include_directories(${PROJECT_SOURCE_DIR})
# -- CORE
add_subdirectory(Core)
# -- GUI
add_subdirectory(GUI)
# -- show all files
file(GLOB_RECURSE showfiles Core/* GUI/*)
add_custom_target(showthings SOURCES ${showfiles})
# export library
install(EXPORT cofusion
DESTINATION share/${PROJECT_NAME}/cmake
FILE ${PROJECT_NAME}Config.cmake
)