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

Fix SFCGAL with CGAL 5 #219

Merged
merged 1 commit into from
Apr 27, 2020
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 .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)

#----------------------------------------------------------------------------
# build options
Expand Down Expand Up @@ -54,6 +55,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