Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #219 from lbartoletti/cgal5
Browse files Browse the repository at this point in the history
Fix SFCGAL with CGAL 5
  • Loading branch information
lbartoletti authored Apr 27, 2020
2 parents d63c82b + 6caae06 commit 7f4a074
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ compiler:
- clang

env:
- CGAL_VERSION=4.13
- CGAL_VERSION=5.0.2

before_install:
- ./travis/${TRAVIS_OS_NAME}/before_install.sh $CGAL_VERSION
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required( VERSION 2.8 )
project( SFCGAL )

set( CMAKE_DEBUG_POSTFIX "d" )
set(CMAKE_CXX_STANDARD 14)

#
# Cmake policies
Expand Down Expand Up @@ -55,6 +56,10 @@ endif()
find_package( CGAL COMPONENTS Core REQUIRED )
message( STATUS "CGAL ${CGAL_VERSION} found" )

if( "${CGAL_VERSION}" VERSION_GREATER_EQUAL "5.0.0")
add_definitions( "-DCGAL_USE_GMPXX=1" )
endif()

include_directories( ${CMAKE_BINARY_DIR}/include )

# For CGAL versions < 4.3, we add a local directory that contains some tweaked include files from unreleased versions
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ set_target_properties( SFCGAL PROPERTIES VERSION ${SFCGAL_VERSION}

target_link_libraries( SFCGAL CGAL::CGAL CGAL::CGAL_Core)

if( "${CGAL_VERSION}" VERSION_GREATER_EQUAL "5.0.0")
target_link_libraries( SFCGAL gmpxx )
endif()

target_link_libraries( SFCGAL ${Boost_LIBRARIES} )

if ( ${Use_precompiled_headers} )
Expand Down
1 change: 0 additions & 1 deletion src/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define _SFCGAL_CONFIG_H_

#define CGAL_DO_NOT_USE_BOOST_MP 1
#define CGAL_DO_NOT_USE_GMPXX 1

#include <SFCGAL/export.h>

Expand Down

0 comments on commit 7f4a074

Please sign in to comment.