-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (58 loc) · 2 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
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.11)
project(segmentFromAcc)
# Maybe stop from CMAKEing in the wrong place
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Source and build directories cannot be the same. Go use the /build directory.")
endif()
# Require C++17 standard in DGtal
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_C_COMPILER "/usr/bin/clang")
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0")
SET(AS_COMMAND_SRC
${PROJECT_SOURCE_DIR}/src/NormalAccumulator.cpp
)
SET(AS_TOOLS_SRC
${PROJECT_SOURCE_DIR}/src/AccumulationAlgorithms.h
${PROJECT_SOURCE_DIR}/src/AccumulationAlgorithms.ipp
${PROJECT_SOURCE_DIR}/src/AccumulationSpace.h
${PROJECT_SOURCE_DIR}/src/AccumulationSpace.ipp
${PROJECT_SOURCE_DIR}/src/PolyscopeEnvironment.h
${PROJECT_SOURCE_DIR}/src/PolyscopeEnvironment.ipp
)
# Include DGtal
SET (DGtal_DIR "/home/adam/DGtal/build")
find_package(DGtal REQUIRED) #local version installed in machine
#include_directories(${DGTAL_INCLUDE_DIRS})
#link_libraries(${DGTAL_LIBRARY_DIRS})
# Include Qt5
find_package(Qt5 REQUIRED COMPONENTS Core Widgets OpenGL)
# Include QGLViewer
SET (QGLVIEWER_INCLUDE_DIRS "/usr/include/QGLViewer")
SET (QGLVIEWER_LIBRARIES "/usr/local/lib/libQGLViewer-qt5.so")
#find_package(QGLViewer REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
# Create an executable
add_subdirectory(tools)
add_subdirectory(deps)
add_executable(segmentFromAcc ${AS_SOURCE_FILE} main.cpp)
# Include settings
#include("${PROJECT_BINARY_DIR}/deps/DGtal/DGtalConfig.cmake")
target_include_directories(segmentFromAcc
PRIVATE
${PROJECT_SOURCE_DIR}/src
${DGTAL_INCLUDE_DIRS}
${QT5_INCLUDE_DIRS}
${QGLVIEWER_INCLUDE_DIRS}
)
# Link settings
target_link_libraries(segmentFromAcc
PRIVATE
${DGTAL_LIBRARIES}
Qt5::Core Qt5::Widgets Qt5::OpenGL
${QGLVIEWER_LIBRARIES}
polyscope
)