Skip to content
Snippets Groups Projects
Commit 6fb5a002 authored by Mederic Fourmy's avatar Mederic Fourmy
Browse files

Fixed a few bugs in cmake refactoring

parent 2cf661e7
No related branches found
No related tags found
1 merge request!1Resolve "Adapt to core cmake refactor"
......@@ -15,6 +15,8 @@ set(PLUGIN_NAME wolf${PROJECT_NAME})
MESSAGE("Starting ${PROJECT_NAME} CMakeLists ...")
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(INCLUDE_INSTALL_DIR include/iri-algorithms/wolf)
set(LIB_INSTALL_DIR lib/)
......@@ -95,6 +97,7 @@ ENDIF(BUILD_DEMOS OR BUILD_TESTS)
#find dependencies.
# ============EXAMPLE==================
FIND_PACKAGE(wolfcore REQUIRED)
FIND_PACKAGE(Eigen3 3.3 REQUIRED)
# Define the directory where will be the configured config.h
SET(WOLF_CONFIG_DIR ${PROJECT_BINARY_DIR}/conf/${PROJECT_NAME}/internal)
......@@ -206,11 +209,13 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
#Link the created libraries
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} wolfcore)
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} Eigen3::Eigen)
#Build tests
#===============EXAMPLE=========================
#===============Build tests=========================
IF(BUILD_TESTS)
MESSAGE("Building tests.")
add_subdirectory(test)
......@@ -230,7 +235,6 @@ INSTALL(TARGETS ${PLUGIN_NAME} EXPORT ${PLUGIN_NAME}Targets
)
install(EXPORT ${PLUGIN_NAME}Targets DESTINATION lib/${PLUGIN_NAME}/cmake)
# Configure the package installation
include(CMakePackageConfigHelpers)
configure_package_config_file(
......
......@@ -3,11 +3,9 @@ set(@PLUGIN_NAME@_VERSION 0.0.1)
@PACKAGE_INIT@
set_and_check(@PLUGIN_NAME@_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set(@PLUGIN_NAME@_INCLUDE_DIRS @PLUGIN_NAME@_INCLUDE_DIR)
set_and_check(@PLUGIN_NAME@_LIB_INSTALL_DIR "@PACKAGE_LIB_INSTALL_DIR@")
set(@PLUGIN_NAME@_LIB_INSTALL_DIRS @PLUGIN_NAME@_LIB_INSTALL_DIR)
# forwards the correct parameters given to FIND_DEPENDENCIES
include(CMakeFindDependencyMacro)
FIND_DEPENDENCY(Eigen3 3.3 REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/@PLUGIN_NAME@Targets.cmake")
......
......@@ -12,8 +12,8 @@ FIND_PACKAGE(catkin REQUIRED COMPONENTS
std_msgs
geometry_msgs
tf
wolf_ros_objectslam
wolf_ros_node
wolf_ros_objectslam
)
FIND_PACKAGE(wolfimu REQUIRED)
......@@ -21,28 +21,26 @@ INCLUDE_DIRECTORIES(
${rosbag_INCLUDE_DIRS}
${wolf_ros_objectslam_INCLUDE_DIRS}
${std_msgs_INCLUDE_DIRS}
${wolfimu_INCLUDE_DIRS}
)
ADD_EXECUTABLE(demo_toy_pbe demo_toy_pbe.cpp)
TARGET_LINK_LIBRARIES(demo_toy_pbe
${wolfcore_LIBRARIES}
wolfcore
${PLUGIN_NAME}
${catkin_LIBRARIES}
)
ADD_EXECUTABLE(cosyslam cosyslam.cpp)
TARGET_LINK_LIBRARIES(cosyslam
${wolfcore_LIBRARIES}
wolfcore
${PLUGIN_NAME}
${catkin_LIBRARIES}
)
ADD_EXECUTABLE(cosyslam_imu cosyslam_imu.cpp)
TARGET_LINK_LIBRARIES(cosyslam_imu
${wolfcore_LIBRARIES}
wolfcore
wolfimu
${PLUGIN_NAME}
${catkin_LIBRARIES}
${wolfimu_LIBRARIES}
)
# rosbag name
bag: "/demos/bag/tless_circular_cp.bag"
bag: "/demos/bag/shortIMU.bag"
# Camera to IMU transformation
unfix_extrinsic: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment