diff --git a/CMakeLists.txt b/CMakeLists.txt index b6e77690f33b7f9e2f5e01b48bb1a66789f4f93e..776697e83e5bfc4d00db5ed02de961090596c577 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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( diff --git a/cmake_modules/wolfobjectslamConfig.cmake.in b/cmake_modules/wolfobjectslamConfig.cmake.in index 5c17be932367fb940e17a1842ab2d3f3b24a90c8..1c767ce042f461da4fe3a214c032d9ca54c4b16d 100644 --- a/cmake_modules/wolfobjectslamConfig.cmake.in +++ b/cmake_modules/wolfobjectslamConfig.cmake.in @@ -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") diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 2cb70d53b86994f5359fa8671f0c8bba36bfdeb0..c2246724e290642294b8f71d12075c24e4a345a3 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -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} ) diff --git a/demos/yaml/cosyslam_imu.yaml b/demos/yaml/cosyslam_imu.yaml index dd0ddd2518644fe1adb54e71fc4b8d44f170546c..a7e80b0f4a44958e90bc722e4e964650d363f675 100644 --- a/demos/yaml/cosyslam_imu.yaml +++ b/demos/yaml/cosyslam_imu.yaml @@ -1,5 +1,5 @@ # rosbag name -bag: "/demos/bag/tless_circular_cp.bag" +bag: "/demos/bag/shortIMU.bag" # Camera to IMU transformation unfix_extrinsic: false