fix Core dependancies

This commit is contained in:
Sébastien Loriot 2017-02-13 16:21:02 +01:00
parent af64852edb
commit 1fc9b0976a
6 changed files with 24 additions and 7 deletions

View File

@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 2.8.10)
find_package(CGAL QUIET COMPONENTS Core) find_package(CGAL QUIET COMPONENTS Core)
if ( CGAL_FOUND ) if ( CGAL_FOUND AND CGAL_Core_FOUND)
include( ${CGAL_USE_FILE} ) include( ${CGAL_USE_FILE} )
@ -29,7 +29,7 @@ if ( CGAL_FOUND )
else() else()
message(STATUS "This program requires the CGAL library, and will not be compiled.") message(STATUS "This program requires the CGAL and CGAL_Core libraries, and will not be compiled.")
endif() endif()

View File

@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 2.8.10)
find_package(CGAL QUIET COMPONENTS Core) find_package(CGAL QUIET COMPONENTS Core)
if ( CGAL_FOUND ) if ( CGAL_FOUND AND CGAL_Core_FOUND)
include( ${CGAL_USE_FILE} ) include( ${CGAL_USE_FILE} )
@ -26,7 +26,7 @@ if ( CGAL_FOUND )
else() else()
message(STATUS "This program requires the CGAL library, and will not be compiled.") message(STATUS "This program requires the CGAL and CGAL_Core libraries, and will not be compiled.")
endif() endif()

View File

@ -1,20 +1,25 @@
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#if defined(CGAL_USE_CORE) || defined(CGAL_USE_LEDA)
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h> #include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h> #include <CGAL/Exact_predicates_exact_constructions_kernel_with_kth_root.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h> #include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
#endif
#include <CGAL/use.h> #include <CGAL/use.h>
int main(){ int main(){
typedef CGAL::Exact_predicates_exact_constructions_kernel EPEK; typedef CGAL::Exact_predicates_exact_constructions_kernel EPEK;
CGAL_USE_TYPE(EPEK);
#if defined(CGAL_USE_CORE) || defined(CGAL_USE_LEDA)
typedef CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt EPEKS; typedef CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt EPEKS;
typedef CGAL::Exact_predicates_exact_constructions_kernel_with_kth_root EPEKK; typedef CGAL::Exact_predicates_exact_constructions_kernel_with_kth_root EPEKK;
typedef CGAL::Exact_predicates_exact_constructions_kernel_with_root_of EPEKR; typedef CGAL::Exact_predicates_exact_constructions_kernel_with_root_of EPEKR;
CGAL_USE_TYPE(EPEK);
CGAL_USE_TYPE(EPEKS); CGAL_USE_TYPE(EPEKS);
CGAL_USE_TYPE(EPEKK); CGAL_USE_TYPE(EPEKK);
CGAL_USE_TYPE(EPEKR); CGAL_USE_TYPE(EPEKR);
#endif
return 0; return 0;
} }

View File

@ -170,6 +170,7 @@ std::ostream& operator<<(std::ostream& os, typename Surface_mesh_shortest_path_t
return os << b[0] << " " << b[1] << " " << b[2]; return os << b[0] << " " << b[1] << " " << b[2];
} }
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
#ifndef DOXYGEN_RUNNING // needed due to a bug in doxygen #ifndef DOXYGEN_RUNNING // needed due to a bug in doxygen
/*! /*!
\ingroup PkgSurfaceMeshShortestPathTraitsClasses \ingroup PkgSurfaceMeshShortestPathTraitsClasses
@ -217,6 +218,7 @@ public:
Construct_triangle_3_along_segment_2_flattening construct_triangle_3_along_segment_2_flattening_object() const { return m_robust_flatten_triangle_3_along_segment_2; } Construct_triangle_3_along_segment_2_flattening construct_triangle_3_along_segment_2_flattening_object() const { return m_robust_flatten_triangle_3_along_segment_2; }
}; };
#endif #endif
#endif
} // namespace CGAL } // namespace CGAL

View File

@ -25,7 +25,9 @@
#include <CGAL/Surface_mesh_shortest_path/internal/misc_functions.h> #include <CGAL/Surface_mesh_shortest_path/internal/misc_functions.h>
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h> #include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
#endif
#include <CGAL/Cartesian_converter.h> #include <CGAL/Cartesian_converter.h>
#ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_FUNCTION_OBJECTS_H #ifndef CGAL_SURFACE_MESH_SHORTEST_PATH_INTERNAL_FUNCTION_OBJECTS_H
@ -251,6 +253,7 @@ public:
} }
}; };
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
template<class K> template<class K>
class Robust_project_triangle_3_to_triangle_2 class Robust_project_triangle_3_to_triangle_2
{ {
@ -280,6 +283,7 @@ public:
return back_from_exact(ept3t2(to_exact(t3))); return back_from_exact(ept3t2(to_exact(t3)));
} }
}; };
#endif
template<class K> template<class K>
class Construct_triangle_3_along_segment_2_flattening class Construct_triangle_3_along_segment_2_flattening
@ -373,6 +377,7 @@ public:
} }
}; };
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
template<class K> template<class K>
class Robust_flatten_triangle_3_along_segment_2 class Robust_flatten_triangle_3_along_segment_2
{ {
@ -404,6 +409,7 @@ public:
return back_from_exact(eft3as2(to_exact(t3), edgeIndex, to_exact(segment))); return back_from_exact(eft3as2(to_exact(t3), edgeIndex, to_exact(segment)));
} }
}; };
#endif
template <class K> template <class K>
class Compare_relative_intersection_along_segment_2 class Compare_relative_intersection_along_segment_2

View File

@ -36,7 +36,11 @@ if ( CGAL_FOUND )
endif() endif()
add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" ) add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" )
list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
if(CGAL_Core_FOUND)
create_single_source_cgal_program( "TestMesh.cpp" ) create_single_source_cgal_program( "TestMesh.cpp" )
else()
message(STATUS "NOTICE: Example TestMesh.cpp requires CGAL_Core library and will not be compiled.")
endif()
else() else()
message(STATUS "NOTICE: Example TestMesh.cpp requires boost program_option and will not be compiled.") message(STATUS "NOTICE: Example TestMesh.cpp requires boost program_option and will not be compiled.")
endif() endif()