Skip to content

Commit

Permalink
Buildsystem fixes. Deactivated a few broken unittests.
Browse files Browse the repository at this point in the history
  • Loading branch information
wxmerkt committed Apr 1, 2021
1 parent 4cbd21f commit 4f3038f
Show file tree
Hide file tree
Showing 46 changed files with 634 additions and 262 deletions.
29 changes: 24 additions & 5 deletions Schweizer-Messer/numpy_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(numpy_eigen)
set(CMAKE_CXX_STANDARD 14)

find_package(catkin REQUIRED COMPONENTS python_module)
include_directories(${catkin_INCLUDE_DIRS})
find_package(Boost REQUIRED COMPONENTS system)
find_package(Eigen3 REQUIRED)

Expand All @@ -15,9 +14,10 @@ include_directories(include ${EIGEN3_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
include_directories("${PROJECT_SOURCE_DIR}/include/numpy_eigen")

catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME}
DEPENDS
DEPENDS Boost
CFG_EXTRAS numpy_eigen-extras.cmake
)
add_definitions(-D__STRICT_ANSI__)

Expand Down Expand Up @@ -51,8 +51,27 @@ add_python_export_library(${PROJECT_NAME}_test
## Testing ##
#############
if(CATKIN_ENABLE_TESTING)

## Add nosetest based cpp test target.
catkin_add_nosetests(test/numpy_eigen_tests.py)

endif()

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

##################
## Installation ##
##################

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
1 change: 1 addition & 0 deletions Schweizer-Messer/sm_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ catkin_package(
INCLUDE_DIRS include ${EIGEN3_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS sm_common sm_random
CFG_EXTRAS sm_eigen-extras.cmake
)

include_directories(include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
Expand Down
2 changes: 2 additions & 0 deletions Schweizer-Messer/sm_eigen/cmake/sm_eigen-extras.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
17 changes: 16 additions & 1 deletion Schweizer-Messer/sm_matrix_archive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ find_package(Boost REQUIRED COMPONENTS system filesystem)
find_package(Eigen3 REQUIRED)

catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS sm_common
)
Expand All @@ -28,6 +28,21 @@ add_library(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES} ${Boost_LIBRARIES} pthread)

##################
## Installation ##
##################

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)

#############
## Testing ##
#############
Expand Down
7 changes: 4 additions & 3 deletions Schweizer-Messer/sm_opencv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ project(sm_opencv)
set(CMAKE_CXX_STANDARD 14)

find_package(catkin REQUIRED COMPONENTS sm_common)
include_directories(${catkin_INCLUDE_DIRS})
find_package(Boost REQUIRED COMPONENTS system)

catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
CATKIN_DEPENDS sm_common
DEPENDS
DEPENDS Boost
)
add_definitions(-D__STRICT_ANSI__)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)
28 changes: 15 additions & 13 deletions Schweizer-Messer/sm_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,23 @@ project(sm_python)

set(CMAKE_CXX_STANDARD 14)

#catkin_python_setup()

find_package(catkin REQUIRED COMPONENTS sm_common numpy_eigen sm_kinematics
sm_timing sm_logging sm_matrix_archive
sm_property_tree python_module)
include_directories(${catkin_INCLUDE_DIRS})
sm_timing sm_logging sm_matrix_archive
sm_property_tree python_module numpy_eigen
)
find_package(Eigen3 REQUIRED)

include_directories(include ${EIGEN3_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

catkin_python_setup()

catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
CATKIN_DEPENDS sm_common numpy_eigen sm_kinematics sm_timing sm_logging
sm_matrix_archive sm_property_tree python_module
DEPENDS
sm_matrix_archive sm_property_tree python_module
)
add_definitions(-D__STRICT_ANSI__)

include_directories(include)
include_directories(include ${EIGEN3_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

# Set up the python exports.
SET(PY_PROJECT_NAME sm_python)
Expand Down Expand Up @@ -54,5 +50,11 @@ add_python_export_library(${PY_PROJECT_NAME} ${PY_PACKAGE_DIR}
src/exportNsecTime.cpp
src/random.cpp
)
target_link_libraries(${PY_PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

target_link_libraries(${PY_PROJECT_NAME} ${Boost_LIBRARIES})
##################
## Installation ##
##################
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)
58 changes: 40 additions & 18 deletions aslam_cv/aslam_cameras/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
cmake_minimum_required(VERSION 3.0.2)
project(aslam_cameras)

find_package(catkin_simple REQUIRED)
ADD_DEFINITIONS(-DASLAM_USE_ROS)

catkin_simple()
find_package(catkin REQUIRED COMPONENTS
sm_common
sm_eigen
sm_boost
sm_kinematics
sm_logging
aslam_time
sm_opencv
sm_property_tree
opencv2_catkin
sm_random
)
find_package(Boost REQUIRED COMPONENTS system serialization filesystem)
find_package(Eigen3 REQUIRED)

ADD_DEFINITIONS(-DASLAM_USE_ROS )
catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include
DEPENDS Boost
)

find_package(Boost REQUIRED COMPONENTS system serialization filesystem)
include_directories(include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})

#common commands for building c++ executables and libraries
cs_add_library(${PROJECT_NAME}
add_library(${PROJECT_NAME}
src/CameraGeometryBase.cpp
src/GlobalShutter.cpp
src/RollingShutter.cpp
Expand All @@ -32,17 +48,14 @@ cs_add_library(${PROJECT_NAME}
src/BackProjection.cpp
src/Landmark.cpp
src/Image.cpp
)

target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
target_compile_options(${PROJECT_NAME} PUBLIC "-Wno-deprecated-copy") # TODO: Fix...

if(CATKIN_ENABLE_TESTING)

# Avoid clash with tr1::tuple: https://code.google.com/p/googletest/source/browse/trunk/README?r=589#257
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=0)


catkin_add_gtest(${PROJECT_NAME}_tests
test/test_main.cpp
test/PinholeCameraGeometry.cpp
Expand All @@ -56,14 +69,23 @@ if(CATKIN_ENABLE_TESTING)
test/testFrame.cpp
test/GridCalibration.cpp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test
)


)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -lpthread")

target_link_libraries(${PROJECT_NAME}_tests ${PROJECT_NAME} ${Boost_LIBRARIES})

target_link_libraries(${PROJECT_NAME}_tests ${PROJECT_NAME})
endif()

cs_install()
cs_export()
##################
## Installation ##
##################

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)
1 change: 0 additions & 1 deletion aslam_cv/aslam_cameras/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
email="[email protected]">Paul Furgale</maintainer>
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin_simple</buildtool_depend>

<build_depend>sm_common</build_depend>
<build_depend>sm_eigen</build_depend>
Expand Down
48 changes: 36 additions & 12 deletions aslam_cv/aslam_cameras_april/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
cmake_minimum_required(VERSION 3.0.2)
project(aslam_cameras_april)

find_package(catkin_simple REQUIRED)
catkin_simple()

ADD_DEFINITIONS(-DASLAM_USE_ROS)

find_package(catkin REQUIRED COMPONENTS
sm_python
aslam_cameras
ethz_apriltag2
numpy_eigen
sm_common
sm_logging
sm_boost
sm_eigen
python_module
)
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED COMPONENTS serialization system)
find_package(Eigen3 REQUIRED)

ADD_DEFINITIONS(-DASLAM_USE_ROS )
include_directories(${EIGEN3_INCLUDE_DIRS})
catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include
DEPENDS OpenCV Boost
)

include_directories(include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})

cs_add_library(${PROJECT_NAME}
add_library(${PROJECT_NAME}
src/GridCalibrationTargetAprilgrid.cpp
)

find_package(Boost REQUIRED COMPONENTS serialization system)

)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} ${Boost_LIBRARIES})

add_python_export_library(${PROJECT_NAME}_python python/aslam_cameras_april
src/module.cpp
)
target_link_libraries(${PROJECT_NAME}_python ${PROJECT_NAME})

cs_install()
cs_export()
##################
## Installation ##
##################

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)
2 changes: 1 addition & 1 deletion aslam_cv/aslam_cameras_april/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<author>Paul Furgale</author>
<license>New BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>catkin_simple</buildtool_depend>

<build_depend>sm_python</build_depend>
<build_depend>aslam_cameras</build_depend>
Expand All @@ -17,4 +16,5 @@
<build_depend>sm_logging</build_depend>
<build_depend>sm_boost</build_depend>
<build_depend>sm_eigen</build_depend>
<build_depend>python_module</build_depend>
</package>
Loading

0 comments on commit 4f3038f

Please sign in to comment.