-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (49 loc) · 1.28 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
66
cmake_minimum_required(VERSION 3.8)
project(q_pen_drawer)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# set(CMAKE_AUTOMOC ON)
find_package(ament_cmake REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
set(q_pen_drawer_SRCS
src/main.cpp
src/mainwindow.cpp
src/canvasview.cpp
src/bezierline.cpp
)
set(q_pen_drawer_HDRS
include/q_pen_drawer/mainwindow.h
include/q_pen_drawer/canvasview.h
include/q_pen_drawer/bezierline.h
)
set(q_pen_drawer_UIS
resource/mainwindow.ui
)
qt5_wrap_cpp(q_pen_drawer_MOCS ${q_pen_drawer_HDRS})
qt5_wrap_ui(q_pen_drawer_UIS_H resource/mainwindow.ui)
add_executable(${PROJECT_NAME}
${q_pen_drawer_SRCS}
${q_pen_drawer_MOCS}
${q_pen_drawer_UIS}
)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
${EIGEN3_INCLUDE_DIRS}
)
ament_target_dependencies(${PROJECT_NAME} PUBLIC
Eigen3
)
target_link_libraries(${PROJECT_NAME}
Qt5::Widgets
)
install(
TARGETS ${PROJECT_NAME}
DESTINATION lib/${PROJECT_NAME}
)
ament_package()