-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (30 loc) · 967 Bytes
/
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(Visualization)
set(CMAKE_CXX_STANDARD 14)
set(APP_EXE main)
set(APP_LIB Visualization)
set(CMAKE_CXX_FLAGS "-O3")
# Nanogui
set(NANOGUI_BUILD_EXAMPLE OFF)
set(NANOGUI_BUILD_PYTHON OFF)
set(NANOGUI_INSTALL OFF)
add_subdirectory(lib/nanogui)
add_definitions(${NANOGUI_EXTRA_DEFS})
# OpenCV
find_package(OpenCV REQUIRED)
include_directories(${OPENCV_INCLUDE_DIR})
# My Lib
include_directories(include)
add_library(${APP_LIB} STATIC
src/Vis.cpp
src/VisScreen.cpp
src/Keyframe.cpp
src/DataGen.cpp
src/MockCameraInput.cpp
)
add_executable(${APP_EXE} src/main.cpp)
target_link_libraries(${APP_LIB} nanogui ${NANOGUI_EXTRA_LIBS} opencv_imgcodecs)
target_link_libraries(${APP_EXE} ${APP_LIB})
# Absolutely needed for the parent not to forget nanogui, eigen, etc...
target_include_directories(${APP_LIB} PUBLIC lib/nanogui/include)
target_include_directories(${APP_LIB} PUBLIC ${NANOGUI_EXTRA_INCS})