forked from autowarefoundation/autoware_universe
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathCMakeLists.txt
36 lines (25 loc) · 880 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
cmake_minimum_required(VERSION 3.14)
project(autoware_pyplot)
find_package(autoware_cmake REQUIRED)
find_package(
Python3
COMPONENTS Interpreter Development
REQUIRED)
find_package(pybind11 REQUIRED)
autoware_package()
ament_auto_add_library(${PROJECT_NAME} STATIC
DIRECTORY src
)
target_compile_options(${PROJECT_NAME} PUBLIC "-fPIC")
target_link_libraries(${PROJECT_NAME} ${Python3_LIBRARIES} pybind11::embed)
# NOTE(soblin): this is workaround for propagating the include of "Python.h" to user modules to avoid "'Python.h' not found"
ament_export_include_directories(${Python3_INCLUDE_DIRS})
if(BUILD_TESTING)
find_package(ament_cmake_ros REQUIRED)
file(GLOB_RECURSE test_files test/*.cpp)
ament_add_ros_isolated_gtest(test_${PROJECT_NAME} ${test_files})
target_link_libraries(test_${PROJECT_NAME}
${PROJECT_NAME}
)
endif()
ament_auto_package()