Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable viz-unit tests also for Qt5 #52

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ add_subdirectory(tools)

# TEST VISUALIZATION
#
if( vizkit3d_FOUND AND OSGVIZ_PRIMITIVES_FOUND)
if( (vizkit3d_FOUND OR vizkit3d-qt5_FOUND) AND OSGVIZ_PRIMITIVES_FOUND)
add_subdirectory(viz)
endif()
97 changes: 58 additions & 39 deletions test/viz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,67 +1,86 @@
include_directories(BEFORE ${PROJECT_SOURCE_DIR}/viz)
rock_find_qt4(QtCore QtGui)
rock_find_qt4(OPTIONAL)
rock_find_qt5(OPTIONAL)

add_compile_options(-fPIC)

rock_executable(heightmap_to_mls
if (ROCK_QT_VERSION_4)
rock_executable(heightmap_to_mls
SOURCES
mlsFromImageHeightmap.cpp
HEADERS
DEPS_PKGCONFIG QtCore QtGui vizkit3d vizkit3d-viz
DEPS maps-viz maps)
DEPS maps-viz maps)

rock_testsuite(test_viz_elevationmap
macro(mapviz_test_qt4 name sourcefile)
rock_testsuite(${name}
${sourcefile}
DEPS maps-viz)
endmacro()
else()
macro(mapviz_test_qt4)
endmacro()
endif()

if (ROCK_QT_VERSION_5)
rock_executable(heightmap_to_mls-qt5
SOURCES
mlsFromImageHeightmap.cpp
DEPS maps-viz-qt5 maps)

macro(mapviz_test_qt5 name sourcefile)
rock_testsuite(${name}-qt5
${sourcefile}
DEPS maps-viz-qt5)
endmacro()
else()
macro(mapviz_test_qt5)
endmacro()
endif()

macro(mapviz_test name source)
mapviz_test_qt4(${name} ${source})
mapviz_test_qt5(${name} ${source})
endmacro()

mapviz_test(test_viz_elevationmap
test_viz_ElevationMap.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_mlsmap
mapviz_test(test_viz_mlsmap
test_viz_MLSMap.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_mlslidar
mapviz_test(test_viz_mlslidar
test_viz_MLSLIDAR.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_countourmap
mapviz_test(test_viz_countourmap
test_viz_ContourMap.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_gridmap
mapviz_test(test_viz_gridmap
test_viz_GridMap.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_executable(deserialize_test
mapviz_test(deserialize_test
DeserializeVizTest.cpp
DEPS_CMAKE Boost
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_tsdf_map
mapviz_test(test_viz_tsdf_map
test_viz_TSDFMap.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_occupancylidar
mapviz_test(test_viz_occupancylidar
test_viz_OccupancyLidar.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_coverage
mapviz_test(test_viz_coverage
test_viz_Coverage.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_traversabilitygrid
mapviz_test(test_viz_traversabilitygrid
test_viz_TraversabilityGrid.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)

rock_testsuite(test_viz_traversability_map3d
mapviz_test(test_viz_traversability_map3d
test_viz_TraversabilityMap3d.cpp
DEPS maps-viz
DEPS_PKGCONFIG vizkit3d vizkit3d-viz)
)