Skip to content

Commit e9a95f2

Browse files
authored
Merge pull request #51 from JustusBraun/main
Reduce DEB dependencies to what is needed
2 parents 0a6775c + f4add85 commit e9a95f2

File tree

9 files changed

+27
-34
lines changed

9 files changed

+27
-34
lines changed

CMakeLists.txt

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ include_directories(${GDAL_INCLUDE_DIR})
138138
#------------------------------------------------------------------------------
139139
# Searching for OpenCV
140140
#------------------------------------------------------------------------------
141-
find_package( OpenCV 3 QUIET )
141+
set(OPEN_CV_COMPONENTS "core;imgproc;imgcodecs;features2d;calib3d")
142+
find_package( OpenCV 3 QUIET COMPONENTS ${OPEN_CV_COMPONENTS} )
142143
if (NOT OpenCV_FOUND)
143-
find_package( OpenCV 4)
144+
find_package( OpenCV 4 COMPONENTS ${OPEN_CV_COMPONENTS})
144145
if(OpenCV_FOUND)
145146
message(STATUS "Found OpenCV 4")
146147
endif()
@@ -378,24 +379,6 @@ if(WITH_PCL)
378379
endif(PCL_FOUND)
379380
endif(WITH_PCL)
380381

381-
#------------------------------------------------------------------------------
382-
# Searching CGAL
383-
#------------------------------------------------------------------------------
384-
set(CGAL_DATA_DIR ".")
385-
find_package(CGAL)
386-
if(CGAL_FOUND)
387-
388-
if(DEFINED CGAL_USE_FILE)
389-
# CGAL_USE_FILE overrides theses flags...
390-
set(_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
391-
set(CMAKE_CXX_FLAGS)
392-
include(${CGAL_USE_FILE})
393-
set(CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
394-
endif()
395-
396-
message(STATUS "Found CGAL")
397-
endif(CGAL_FOUND)
398-
399382
#------------------------------------------------------------------------------
400383
# Searching for OpenMP
401384
#------------------------------------------------------------------------------

CMakeModules/lvr2-packaging.cmake

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,32 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "jubraun@uos.de")
4242
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
4343

4444
set(_LVR2_DEPS
45-
libboost-all-dev
45+
libboost-program-options-dev
46+
libboost-filesystem-dev
47+
libboost-thread-dev
48+
libboost-serialization-dev
49+
libboost-timer-dev
50+
libboost-iostreams-dev
51+
libboost-date-time-dev
4652
libflann-dev
4753
libgsl-dev
4854
libeigen3-dev
4955
libopenmpi-dev
56+
libopencv-core-dev
57+
libopencv-imgproc-dev
58+
libopencv-imgcodecs-dev
59+
libopencv-features2d-dev
60+
libopencv-calib3d-dev
5061
openmpi-bin
5162
ocl-icd-opencl-dev
52-
freeglut3-dev
5363
libhdf5-dev
5464
liblz4-dev
55-
libopencv-dev
5665
libyaml-cpp-dev
57-
libcgal-dev
58-
libgdal-dev
5966
)
6067

6168
# Convert list → comma-separated string
6269
string(REPLACE ";" ", " _LVR2_DEPS_STR "${_LVR2_DEPS}")
6370

6471
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${_LVR2_DEPS_STR}")
6572

66-
include(CPack)
73+
include(CPack)

include/lvr2/algorithm/RaycastingTexturizer.tcc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// opencv includes
99
#include <opencv2/imgproc.hpp>
1010
#include <opencv2/core/core.hpp>
11-
#include <opencv2/highgui/highgui.hpp>
1211

1312
// std includes
1413
#include <fstream>

include/lvr2/algorithm/Texturizer.tcc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "lvr2/util/Logging.hpp"
3737
#include "lvr2/algorithm/ColorAlgorithms.hpp"
3838

39-
#include <opencv2/highgui.hpp>
4039
#include <opencv2/imgproc.hpp>
4140

4241

include/lvr2/io/modelio/GeoTIFFIO.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@
2727
#ifndef GEOTIFFIO_HPP
2828
#define GEOTIFFIO_HPP
2929

30-
#include <gdal_priv.h>
3130
#include <opencv2/opencv.hpp>
3231
#include <string>
3332

33+
// Forward declaration to remove <gdal_priv.h> include
34+
extern "C"
35+
{
36+
struct GDALDataset;
37+
struct GDALDriver;
38+
}
39+
3440
namespace lvr2
3541
{
3642
/**

src/liblvr2/io/modelio/GeoTIFFIO.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include "lvr2/io/modelio/GeoTIFFIO.hpp"
88
#include "lvr2/util/Timestamp.hpp"
99

10+
#include <gdal_priv.h>
11+
1012
namespace lvr2
1113
{
1214

src/tools/lvr2_ascii_viewer/include/ascii_viewer/AsciiRenderer.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "CursesHelper.hpp"
1313

14-
#include <embree3/rtcore.h>
14+
#include <embree4/rtcore.h>
1515
#include <memory>
1616

1717
namespace lvr2 {
@@ -74,7 +74,6 @@ class AsciiRenderer {
7474

7575
RTCDevice m_device;
7676
RTCScene m_scene;
77-
RTCIntersectContext m_context;
7877

7978
// Camera
8079
Eigen::Affine3d m_camera;

src/tools/lvr2_ascii_viewer/src/ascii_viewer/AsciiRenderer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ void AsciiRenderer::initEmbree(MeshBufferPtr mesh)
9191
{
9292
m_device = initializeDevice();
9393
m_scene = initializeScene(m_device, mesh);
94-
rtcInitIntersectContext(&m_context);
9594
}
9695

9796
RTCDevice AsciiRenderer::initializeDevice()
@@ -238,7 +237,7 @@ void AsciiRenderer::raycast()
238237
rayhit.ray.dir_z = dir.coeff(2);
239238

240239

241-
rtcIntersect1(m_scene, &m_context, &rayhit);
240+
rtcIntersect1(m_scene, &rayhit);
242241

243242
if(rayhit.hit.geomID != RTC_INVALID_GEOMETRY_ID)
244243
{

src/tools/lvr2_hdf5_builder/HDF5Tool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#include <boost/filesystem.hpp>
5858

5959
#include <opencv2/core/core.hpp>
60-
#include <opencv2/highgui/highgui.hpp>
6160

6261
using namespace lvr2;
6362
using boost::filesystem::path;

0 commit comments

Comments
 (0)