Refactoring RTABMapConfig.cmake with targets (#904)

* Config: Using cmake targets

* fixed RTABMAP_DEPRECATED build error

* fixed melodic build

* cleanup

* Fixed qhull exported library error

* Update svg depend private

* removed g2o from public interface

* Fixed Windows with external project

* removed some required dep

* Fixed nsis error (also fixed unspecified components)

* updated workflow rules
This commit is contained in:
matlabbe
2023-02-12 16:18:01 -08:00
committed by GitHub
parent 437ed09335
commit 89e3e10d89
191 changed files with 1150 additions and 2199 deletions
+3 -47
View File
@@ -1,54 +1,10 @@
SET(SRC_FILES
main.cpp
)
SET(INCLUDE_DIRS
${PROJECT_BINARY_DIR}/corelib/include
${PROJECT_SOURCE_DIR}/corelib/include
${PROJECT_SOURCE_DIR}/utilite/include
${PROJECT_SOURCE_DIR}/guilib/include
${CMAKE_CURRENT_SOURCE_DIR}
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
IF(QT4_FOUND)
INCLUDE(${QT_USE_FILE})
ENDIF(QT4_FOUND)
SET(LIBRARIES
${OpenCV_LIBRARIES}
${PCL_LIBRARIES}
${QT_LIBRARIES}
)
add_definitions(${PCL_DEFINITIONS})
# Hack as CameraRealsense2.h needs realsense2 include dir
IF(realsense2_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${realsense2_INCLUDE_DIRS}
)
ENDIF(realsense2_FOUND)
# Hack as CameraK4A.h needs k4a include dir
IF(k4a_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${k4a_INCLUDE_DIRS}
)
ENDIF(k4a_FOUND)
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
IF(MINGW)
ADD_EXECUTABLE(dataRecorder WIN32 ${SRC_FILES})
ADD_EXECUTABLE(dataRecorder WIN32 main.cpp)
ELSE()
ADD_EXECUTABLE(dataRecorder ${SRC_FILES})
ADD_EXECUTABLE(dataRecorder main.cpp)
ENDIF()
TARGET_LINK_LIBRARIES(dataRecorder rtabmap_core rtabmap_gui rtabmap_utilite ${LIBRARIES})
TARGET_LINK_LIBRARIES(dataRecorder rtabmap_gui)
SET_TARGET_PROPERTIES( dataRecorder
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-dataRecorder)