z1_controller/CMakeLists.txt

23 lines
634 B
CMake
Raw Permalink Normal View History

2022-07-20 11:11:38 +08:00
cmake_minimum_required(VERSION 3.0)
2022-09-13 19:53:15 +08:00
project(z1_controller LANGUAGES CXX)
set(PACKAGE_NAME z1_controller)
2023-05-25 21:01:46 +08:00
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -std=c++14 -pthread")
2022-07-20 11:11:38 +08:00
find_package(Boost REQUIRED)
2023-05-25 21:01:46 +08:00
find_package(Eigen3 REQUIRED)
2022-07-20 11:11:38 +08:00
include_directories(
${Boost_INCLUDE_DIRS}
2023-05-25 21:01:46 +08:00
${Eigen3_INCLUDE_DIRS}
include
2022-07-20 11:11:38 +08:00
)
link_directories(lib)
2022-09-13 19:53:15 +08:00
# ----------------------add executable----------------------
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
2022-07-20 11:11:38 +08:00
add_executable(z1_ctrl main.cpp)
2023-05-25 21:01:46 +08:00
target_link_libraries(z1_ctrl libZ1_${CMAKE_HOST_SYSTEM_PROCESSOR}.so)
2023-07-11 21:47:21 +08:00
find_package(catkin)
if(${catkin_FOUND})
2023-05-25 21:01:46 +08:00
add_subdirectory(sim)
endif()