Skip to content

Commit

Permalink
fix cmakelist for github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sugikazu75 committed Sep 23, 2024
1 parent 0c90850 commit d1857b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
18 changes: 8 additions & 10 deletions robots/dragon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ project(dragon)

add_compile_options(-std=c++17)

set(CMAKE_BUILD_TYPE Release)

find_package(catkin REQUIRED COMPONENTS
aerial_robot_control
aerial_robot_model
Expand All @@ -16,11 +14,6 @@ find_package(catkin REQUIRED COMPONENTS
)

find_package(Eigen3 REQUIRED)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")

find_package(NLopt REQUIRED)
find_package(pinocchio REQUIRED)
find_package(crocoddyl REQUIRED)
Expand All @@ -37,6 +30,11 @@ catkin_package(
###########
set(CMAKE_CXX_STANDARD 17)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG")

include_directories(
include
test
Expand Down Expand Up @@ -67,8 +65,8 @@ add_dependencies(dragon_aerial_robot_controllib aerial_robot_msgs_generate_messa
add_library(dragon_navigation src/dragon_navigation.cpp)
target_link_libraries(dragon_navigation ${catkin_LIBRARIES})

add_executable(hoge src/control/test.cpp)
target_link_libraries(hoge
add_executable(pinocchio_test src/control/test.cpp)
target_link_libraries(pinocchio_test
${catkin_LIBRARIES}
${Eigen3_LIBRARIES}
pinocchio::pinocchio
Expand All @@ -84,7 +82,7 @@ target_link_libraries(dragon_jacobian_test dragon_numerical_jacobians ${catkin_L
install(DIRECTORY include/${PROJECT_NAME}/ test/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(TARGETS dragon_jacobian_test
install(TARGETS dragon_jacobian_test pinocchio_test
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

Expand Down
7 changes: 6 additions & 1 deletion robots/mini_quadrotor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.0.2)
project(mini_quadrotor)

add_compile_options(-std=c++17)
set(CMAKE_BUILD_TYPE Release)

find_package(catkin REQUIRED COMPONENTS
mujoco_ros_control
roscpp
)

find_package(Eigen3 REQUIRED)
find_package(pinocchio REQUIRED)
find_package(crocoddyl REQUIRED)
Expand All @@ -21,6 +21,7 @@ catkin_package(
## Build ##
###########
set(CMAKE_CXX_STANDARD 17)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
Expand Down Expand Up @@ -51,6 +52,10 @@ install(DIRECTORY bin
USE_SOURCE_PERMISSIONS
)

install(TARGETS crocoddyl_test
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# mujoco_model_convert(
# ${PROJECT_SOURCE_DIR}
# ${PROJECT_SOURCE_DIR}/config/mujoco_model.yaml)
Expand Down

0 comments on commit d1857b9

Please sign in to comment.