Permalink
Browse files

clean CMake

  • Loading branch information...
1 parent 1e17370 commit f8ce9515f29f2e4463bbd9069c49cafe1f18f78e @vrabaud vrabaud committed Jan 7, 2013
Showing with 12 additions and 8 deletions.
  1. +6 −1 CMakeLists.txt
  2. +2 −0 cmake/depends.cmake.in
  3. +4 −7 src/rgbd/CMakeLists.txt
View
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.8)
project(opencv_candidate)
find_package(catkin REQUIRED)
+find_package(libg2o)
+find_package(OpenCV)
find_library(DEPTH_SENSE_LIBRARIES DepthSense /opt/DepthSenseSDK/lib)
if (${DEPTH_SENSE_LIBRARIES} STREQUAL DEPTH_SENSE_LIBRARIES-NOTFOUND)
@@ -11,7 +13,8 @@ else()
endif()
if (${catkin_VERSION} VERSION_GREATER "0.5.28")
-catkin_package(DEPENDS OpenCV libg2o
+catkin_package(CFG_EXTRAS depends.cmake
+ DEPENDS OpenCV libg2o
INCLUDE_DIRS include
LIBRARIES opencv_candidate
${OPENCV_CREATIVE}
@@ -20,12 +23,14 @@ catkin_package(DEPENDS OpenCV libg2o
else()
catkin_stack()
catkin_project(opencv_candidate
+ CFG_EXTRAS depends.cmake
DEPENDS OpenCV libg2o
INCLUDE_DIRS include
LIBRARIES opencv_candidate
${OPENCV_CREATIVE}
opencv_rgbd
)
+list(APPEND catkin_LIBRARIES ${libg2o_LIBRARIES})
endif()
add_definitions(-Wno-strict-aliasing -Wall -Werror)
View
@@ -0,0 +1,2 @@
+list(APPEND catkin_LIBRARIES cholmod cxsparse)
+list(APPEND opencv_candidate_LIBRARIES cholmod cxsparse)
View
@@ -54,11 +54,9 @@ include_directories(SYSTEM ${PCL_INCLUDE_DIRS}
# Find Eigen3
FIND_PACKAGE(Eigen)
-#FIND_PACKAGE(Cholmod)
-#FIND_PACKAGE(CSparse)
find_package(libg2o)
-include_directories(SYSTEM ${g2o_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${CHOLMOD_INCLUDE_DIR} ${CSPARSE_INCLUDE_DIR})
+include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS})
add_executable(model_capture samples/reconst3d/reconst3d.hpp
samples/reconst3d/reconst3d_init.cpp
@@ -79,14 +77,13 @@ add_executable(model_capture samples/reconst3d/reconst3d.hpp
samples/model_capture.cpp
)
-target_link_libraries(model_capture ${OpenCV_LIBRARIES}
+target_link_libraries(model_capture ${catkin_LIBRARIES}
+ ${OpenCV_LIBRARIES}
opencv_rgbd
- ${PCL_LIBRARIES}
${libg2o_LIBRARIES}
+ ${PCL_LIBRARIES}
cholmod
cxsparse
- ${CHOLMOD_LIBRARIES}
- ${CSPARSE_LIBRARY}
)
set_target_properties(model_capture PROPERTIES COMPILE_FLAGS "-fopenmp" LINK_FLAGS "-fopenmp")

0 comments on commit f8ce951

Please sign in to comment.