Skip to content

Commit

Permalink
Merge pull request #1745 from DGtal-team/cgal6.0
Browse files Browse the repository at this point in the history
Fixing CGAL 6.0 breaking change.
  • Loading branch information
dcoeurjo authored Oct 2, 2024
2 parents f74ed72 + 16bdcf9 commit 90153d1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# DGtal 1.5beta

## Bug fixes

- *General*
- Fix cmake CGAL 6.0 Breaking change. (David Coeurjolly, [#1745](https://github.com/DGtal-team/DGtal/pull/1745))

- *Geometry*
- Bug fix in ArithmeticalDSSComputerOnSurfels (Tristan Roussillon, [#1742](https://github.com/DGtal-team/DGtal/pull/1742))


# DGtal 1.4.1

Expand Down
29 changes: 12 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Download base image
ARG UBUNTU_VERSION=20.04
ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION} as base
# LABEL about the custom image
LABEL maintainer="msalazar@centrogeo.edu.mx"
LABEL maintainer="david.coeurjolly@cnrs.fr"
LABEL version="0.0.1"
LABEL description="This Docker is for the Dgtal library installation."
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -29,12 +29,9 @@ RUN apt -y install mesa-common-dev libglm-dev mesa-utils
### Install cmake
RUN apt -y install cmake
###Install boost
RUN apt -y install libboost-all-dev
###Install clang-9
RUN apt -y install clang-9

RUN apt -y install libcgal*
RUN apt -y install libboost-dev

### Install optional deps
RUN apt -y install libmagick++-dev

RUN apt -y install graphicsmagick*
Expand All @@ -43,33 +40,31 @@ RUN apt -y install doxygen

RUN apt -y install libcgal-dev

RUN apt -y install libinsighttoolkit4-dev

RUN apt -y install libqglviewer-dev-qt5
#RUN apt-get -y install libinsighttoolkit4-dev

RUN apt -y install libgmp-dev
#RUN apt -y install libqglviewer-dev-qt5

RUN apt -y install libeigen3-dev
#RUN apt -y install libgmp-dev

RUN apt -y install libfftw3-dev
#RUN apt -y install libfftw3-dev

#### User to install
RUN groupadd -g 1000 digital
RUN useradd -d /home/digital -s /bin/bash -m digital -u 1000 -g 1000
RUN usermod -aG sudo digital
####

RUN apt -y install mesa-common-dev libglm-dev mesa-utils
#RUN apt -y install mesa-common-dev libglm-dev mesa-utils

### Directory to store the git
RUN mkdir /home/digital/git/
RUN mkdir /home/digital/git/DGtal


#### clone git and install
RUN git clone https://github.com/DGtal-team/DGtal.git /home/digital/git/DGtal
#RUN git clone https://github.com/DGtal-team/DGtal.git /home/digital/git/DGtal

RUN mkdir /home/digital/git/DGtal/build
RUN cd /home/digital/git/DGtal/build && cmake .. -DWITH_GMP=true -DWITH_EIGEN=true -DWITH_FFTW3=true -DWITH_CGAL=true -DWITH_ITK=true -DWITH_OPENMP=true -DWITH_CAIRO=true -DWITH_QGLVIEWER=true -DWITH_MAGICK=true && make install
#RUN mkdir /home/digital/git/DGtal/build
#RUN cd /home/digital/git/DGtal/build && cmake .. -DWITH_GMP=true -DWITH_EIGEN=true -DWITH_FFTW3=true -DWITH_CGAL=true -DWITH_ITK=true -DWITH_OPENMP=true -DWITH_CAIRO=true -DWITH_QGLVIEWER=true -DWITH_MAGICK=true && make install


20 changes: 15 additions & 5 deletions cmake/CheckDGtalOptionalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,25 @@ if(WITH_CGAL)

find_package(CGAL COMPONENTS Core)
if(CGAL_FOUND)
include( ${CGAL_USE_FILE} )
set(CGAL_FOUND_DGTAL 1)
target_compile_definitions(DGtal PUBLIC -DCGAL_EIGEN3_ENABLED)
target_compile_definitions(DGtal PUBLIC -DWITH_CGAL)
target_link_libraries(DGtal PUBLIC ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
## Making sure that CGAL got the Eigen3 flag
target_compile_definitions(DGtal PUBLIC -DWITH_Eigen3 -DWITH_LAPACK)
message(STATUS "CGAL found.")
message(STATUS "CGAL found, version ${CGAL_VERSION}")
if (CGAL_VERSION VERSION_LESS "5.0")
message(FATAL_ERROR "CGAL version 5.0 or higher is required.")
else()
if (CGAL_VERSION VERSION_LESS "6.0")
message(STATUS "CGAL using ${CGAL_USE_FILE}")
include( ${CGAL_USE_FILE} )
target_link_libraries(DGtal PUBLIC ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
set(DGtalLibDependencies ${DGtalLibDependencies} ${CGAL_LIBRARIES} ${CGAL_3D_PARTY-LIBRARIES})
## Making sure that CGAL got the Eigen3 flag
else()
target_link_libraries(DGtal PUBLIC CGAL::CGAL)
set(DGtalLibDependencies ${DGtalLibDependencies} CGAL::CGAL)
endif()
endif()
endif()
endif()

Expand Down

0 comments on commit 90153d1

Please sign in to comment.