From 76cfe2ae9bfa02b70a0980c3d15a11ff156551f1 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Thu, 19 Jan 2012 15:25:53 +0000 Subject: [PATCH] let NTL work without preconfig --- Installation/cmake/modules/FindNTL.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Installation/cmake/modules/FindNTL.cmake b/Installation/cmake/modules/FindNTL.cmake index 32c89b87102..a655761e150 100644 --- a/Installation/cmake/modules/FindNTL.cmake +++ b/Installation/cmake/modules/FindNTL.cmake @@ -3,15 +3,17 @@ find_package( GMP REQUIRED ) -if( NOT WITH_GMP OR NOT GMP_FOUND ) +if( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) message( FATAL_ERROR "NTL requires GMP" ) set( NTL_FOUND FALSE ) -else( NOT WITH_GMP OR NOT GMP_FOUND ) +else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) include( CGAL_VersionUtils ) + get_dependency_version( GMP ) + IS_VERSION_LESS("${GMP_VERSION}" "3.1.1" _IS_GMP_VERSION_TOO_LOW) if( _IS_GMP_VERSION_TOO_LOW ) @@ -21,7 +23,7 @@ else( NOT WITH_GMP OR NOT GMP_FOUND ) else( _IS_GMP_VERSION_TOO_LOW ) find_path(NTL_INCLUDE_DIR - NAMES NTL/ZZX.h + NAMES NTL/ZZ.h PATHS ENV NTL_INC_DIR DOC "The directory containing the NTL include files" NO_DEFAULT_PATH @@ -96,7 +98,7 @@ else( NOT WITH_GMP OR NOT GMP_FOUND ) endif( _IS_GMP_VERSION_TOO_LOW ) -endif( NOT WITH_GMP OR NOT GMP_FOUND ) +endif( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) if ( NTL_FOUND ) # if ( NOT NTL_FIND_QUIETLY )