mirror of https://github.com/CGAL/cgal
fixed usages for Prefix
This commit is contained in:
parent
2466257f18
commit
72e82d7e9a
|
|
@ -9,14 +9,11 @@ if ( COMMAND cmake_policy )
|
|||
endif()
|
||||
|
||||
if ( NOT CGAL_FOUND )
|
||||
find_package(CGAL REQUIRED)
|
||||
find_package(CGAL REQUIRED zlib OpenGL)
|
||||
endif()
|
||||
|
||||
include(${CGAL_USE_FILE})
|
||||
|
||||
find_package(ZLIB)
|
||||
find_package(OpenGL)
|
||||
|
||||
#option(WITH_VTK "Add VTK support to the CGAL ImageIO library." OFF)
|
||||
|
||||
if(WITH_VTK)
|
||||
|
|
@ -34,8 +31,6 @@ if(OPENGL_FOUND)
|
|||
|
||||
if(ZLIB_FOUND)
|
||||
get_dependency_version(ZLIB)
|
||||
message( STATUS "ZLib include: ${ZLIB_INCLUDE_DIR}" )
|
||||
message( STATUS "ZLib libraries: ${ZLIB_LIBRARY}" )
|
||||
cache_set(CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
|
||||
cache_set(CGAL_ImageIO_3RD_PARTY_LIBRARIES ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ${ZLIB_LIBRARY} )
|
||||
cache_set(CGAL_ImageIO_3RD_PARTY_DEFINITIONS "-DCGAL_USE_ZLIB")
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ endmacro()
|
|||
# External libs Qt3 and Qt34are configured when Qt3 or Qt4 as lib of cgal are required
|
||||
# Coin is used in KDS, but no FindCoin or FindCOIN exists
|
||||
# There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs
|
||||
# For some weird reason zlib does not work in spelling ZLIB
|
||||
# For some weird reason zlib does not work in spelling ZLIB (TODO EBEB? unify?)
|
||||
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIRARIES 0 GMP GMPXX MPFR LEDA MPFI RS OpenNL TAUCS BLAS LAPACK QGLViewer zlib ESTBL NTL OpenGL)
|
||||
hide_variable(CGAL_SUPPORTING_3RD_PARTY_LIRARIES)
|
||||
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
|
||||
|
||||
if ( ${lib}_FOUND )
|
||||
if ( ${vlib}_FOUND )
|
||||
|
||||
if ( NOT ${lib}_SETUP ) # avoid double usage
|
||||
if ( NOT ${vlib}_SETUP ) # avoid double usage
|
||||
|
||||
string( REGEX REPLACE "###" "" filename ${usefile})
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
include( ${filename} )
|
||||
message (STATUS "Configured ${lib} from use-file: ${filename}")
|
||||
|
||||
# use-file has to set ${lib}_SETUP to TRUE
|
||||
# use-file has to set ${vlib}_SETUP to TRUE
|
||||
|
||||
else()
|
||||
|
||||
|
|
@ -227,13 +227,13 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
message (STATUS "Configured ${lib} in standard way")
|
||||
|
||||
set( ${lib}_SETUP TRUE )
|
||||
set( ${vlib}_SETUP TRUE )
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (NOT ${lib}_SETUP )
|
||||
if (NOT ${vlib}_SETUP )
|
||||
|
||||
message( WARNING "${lib} has not been shown to be set up" )
|
||||
|
||||
|
|
@ -291,12 +291,14 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
|||
|
||||
set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} )
|
||||
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( CGAL_EXT_LIB_${lib}_PREFIX \"${CGAL_EXT_LIB_${lib}_PREFIX}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( ${vlib}_FOUND \"${${vlib}_FOUND}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n\n")
|
||||
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "set( CGAL_EXT_LIB_${lib}_PREFIX \"${CGAL_EXT_LIB_${lib}_PREFIX}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "set( ${vlib}_FOUND \"${${vlib}_FOUND}\")\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n")
|
||||
file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n")
|
||||
|
|
|
|||
|
|
@ -44,17 +44,20 @@ if(NOT USE_CGAL_FILE_INCLUDED)
|
|||
|
||||
else()
|
||||
|
||||
if ( ${CGAL_COMPONENT}_FOUND)
|
||||
set( vlib "${CGAL_EXT_LIB_${CGAL_COMPONENT}_PREFIX}" )
|
||||
|
||||
message( STATUS "External library ${CGAL_COMPONENT} is preconfigured")
|
||||
use_lib( ${CGAL_COMPONENT} "###${${CGAL_COMPONENT}_USE_FILE}")
|
||||
if ( ${vlib}_FOUND)
|
||||
|
||||
message( STATUS "External library ${CGAL_COMPONENT} has been preconfigured")
|
||||
use_lib( ${CGAL_COMPONENT} "###${${vlib}_USE_FILE}")
|
||||
|
||||
else()
|
||||
|
||||
message( STATUS "External library ${CGAL_COMPONENT} is not preconfigured")
|
||||
message( STATUS "External library ${CGAL_COMPONENT} has not been preconfigured")
|
||||
find_package( ${CGAL_COMPONENT} )
|
||||
if (${CGAL_COMPONENT}_FOUND)
|
||||
use_lib( ${CGAL_COMPONENT} "###${${CGAL_COMPONENT}_USE_FILE}")
|
||||
message( STATUS "External library ${vlib} after find")
|
||||
if (${vlib}_FOUND)
|
||||
use_lib( ${CGAL_COMPONENT} "###${${vlib}_USE_FILE}")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue