mirror of https://github.com/CGAL/cgal
CGALcomponent libs are not own CMake projects anymore
This commit is contained in:
parent
3c291f7103
commit
10af9912d9
|
|
@ -1,22 +1,7 @@
|
||||||
project (CGAL_ImageIO)
|
message(STATUS "Configure libCGALImageIO")
|
||||||
|
|
||||||
# Minimal version of CMake:
|
find_package( OpenGL )
|
||||||
cmake_minimum_required(VERSION 2.6.2)
|
find_package( zlib )
|
||||||
|
|
||||||
# Tested version:
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
|
||||||
cmake_policy(VERSION 2.8.4)
|
|
||||||
else()
|
|
||||||
cmake_policy(VERSION 2.6)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( NOT CGAL_FOUND )
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS zlib OpenGL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
|
||||||
|
|
||||||
#option(WITH_VTK "Add VTK support to the CGAL ImageIO library." OFF)
|
#option(WITH_VTK "Add VTK support to the CGAL ImageIO library." OFF)
|
||||||
|
|
||||||
|
|
@ -108,6 +93,8 @@ if(OPENGL_FOUND)
|
||||||
install(TARGETS CGAL_ImageIO DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
install(TARGETS CGAL_ImageIO DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "libCGALImageIO is configured")
|
||||||
|
|
||||||
else(OPENGL_FOUND)
|
else(OPENGL_FOUND)
|
||||||
message( STATUS "CGAL_ImageIO needs OpenGL, cannot be configured.")
|
message( STATUS "CGAL_ImageIO needs OpenGL, cannot be configured.")
|
||||||
endif(OPENGL_FOUND)
|
endif(OPENGL_FOUND)
|
||||||
|
|
@ -115,3 +102,4 @@ endif(OPENGL_FOUND)
|
||||||
if(NOT ZLIB_FOUND)
|
if(NOT ZLIB_FOUND)
|
||||||
message( STATUS "NOTICE: CGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
|
message( STATUS "NOTICE: CGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.")
|
||||||
endif(NOT ZLIB_FOUND)
|
endif(NOT ZLIB_FOUND)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,21 @@
|
||||||
project (CGAL_Core)
|
message(STATUS "Configure libCGALCore")
|
||||||
|
|
||||||
# Minimal version of CMake:
|
use_lib( GMP "###")
|
||||||
cmake_minimum_required(VERSION 2.6.2)
|
use_lib( MPFR "###")
|
||||||
|
if (CGAL_USE_GMPXX)
|
||||||
# Tested version:
|
use_lib( GMPXX "###")
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
|
||||||
cmake_policy(VERSION 2.8.4)
|
|
||||||
else()
|
|
||||||
cmake_policy(VERSION 2.6)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( NOT CGAL_FOUND )
|
|
||||||
# need CGAL with GMP
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS GMP)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
|
||||||
|
|
||||||
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
include_directories (${CGAL_3RD_PARTY_INCLUDE_DIRS})
|
||||||
|
|
||||||
build_cgal_library(CGAL_Core CGALCore "")
|
|
||||||
|
|
||||||
add_dependencies( CGAL_Core CGAL )
|
|
||||||
|
|
||||||
add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
add_definitions(${CGAL_3RD_PARTY_DEFINITIONS})
|
||||||
|
|
||||||
|
build_cgal_library(CGAL_Core CGALCore "")
|
||||||
|
|
||||||
target_link_libraries( CGAL_Core ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_Core ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
add_dependencies( CGAL_Core CGAL )
|
||||||
|
|
||||||
set_target_properties(CGAL_Core PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
set_target_properties(CGAL_Core PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
|
||||||
set( CGAL_Core_BASENAME CGAL_Core )
|
set( CGAL_Core_BASENAME CGAL_Core )
|
||||||
|
|
@ -70,3 +57,5 @@ if ( CGAL_INSTALL_LIB_DIR )
|
||||||
install(TARGETS CGAL_Core DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
install(TARGETS CGAL_Core DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "libCGALCore is configured")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,4 @@
|
||||||
project (CGAL_Qt4)
|
message(STATUS "Configure libCGALQt4")
|
||||||
|
|
||||||
# Minimal version of CMake:
|
|
||||||
cmake_minimum_required(VERSION 2.6.2)
|
|
||||||
|
|
||||||
# Tested version:
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
|
||||||
cmake_policy(VERSION 2.8.4)
|
|
||||||
else()
|
|
||||||
cmake_policy(VERSION 2.6)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( NOT CGAL_FOUND )
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Qt4 GMP GMPXX MPFR)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
|
||||||
|
|
||||||
set( QT_USE_QTMAIN TRUE )
|
set( QT_USE_QTMAIN TRUE )
|
||||||
set( QT_USE_QTOPENGL TRUE )
|
set( QT_USE_QTOPENGL TRUE )
|
||||||
|
|
@ -78,15 +60,21 @@ if( QT4_FOUND )
|
||||||
|
|
||||||
# message(STATUS "Additional input files: ${additional_files}")
|
# message(STATUS "Additional input files: ${additional_files}")
|
||||||
|
|
||||||
|
use_lib( GMP "###")
|
||||||
|
use_lib( MPFR "###")
|
||||||
|
if (CGAL_USE_GMPXX)
|
||||||
|
use_lib( GMPXX "###")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt4_3RD_PARTY_INCLUDE_DIRS} )
|
||||||
|
|
||||||
build_cgal_library( CGAL_Qt4 CGALQt4 "${additional_files}")
|
build_cgal_library( CGAL_Qt4 CGALQt4 "${additional_files}")
|
||||||
|
|
||||||
if ( NOT CGAL_IS_CURRENT_SCRIPT_TOP_LEVEL )
|
|
||||||
add_dependencies( CGAL_Qt4 CGAL )
|
add_dependencies( CGAL_Qt4 CGAL )
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries( CGAL_Qt4 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt4_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_Qt4 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt4_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} )
|
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt4_3RD_PARTY_DEFINITIONS} )
|
||||||
|
|
||||||
if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
|
if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
|
||||||
add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE )
|
add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE )
|
||||||
|
|
@ -130,6 +118,8 @@ if( QT4_FOUND )
|
||||||
install(TARGETS CGAL_Qt4 DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
install(TARGETS CGAL_Qt4 DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "libCGALQt4 is configured")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message( STATUS "CGAL_Qt4 needs OpenGL, cannot be configured.")
|
message( STATUS "CGAL_Qt4 needs OpenGL, cannot be configured.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,6 @@
|
||||||
project (CGAL_Qt3)
|
message(STATUS "Configure libCGALQt3")
|
||||||
|
|
||||||
# Minimal version of CMake:
|
|
||||||
cmake_minimum_required(VERSION 2.6.2)
|
|
||||||
|
|
||||||
# Tested version:
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
|
|
||||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
|
|
||||||
cmake_policy(VERSION 2.8.4)
|
|
||||||
else()
|
|
||||||
cmake_policy(VERSION 2.6)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( NOT CGAL_FOUND )
|
|
||||||
find_package(CGAL REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
|
||||||
|
|
||||||
find_package(OpenGL QUIET )
|
find_package(OpenGL QUIET )
|
||||||
|
|
||||||
find_package(Qt3-patched QUIET )
|
find_package(Qt3-patched QUIET )
|
||||||
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
||||||
# that it can be used together with FindQt4: all its variables are prefixed
|
# that it can be used together with FindQt4: all its variables are prefixed
|
||||||
|
|
@ -29,7 +10,7 @@ if( QT3_FOUND )
|
||||||
|
|
||||||
if( OPENGL_FOUND )
|
if( OPENGL_FOUND )
|
||||||
|
|
||||||
get_dependency_version(OPENGL)
|
get_dependency_version(OPENGL OpenGL)
|
||||||
get_dependency_version(QT QT3)
|
get_dependency_version(QT QT3)
|
||||||
|
|
||||||
if(COMMAND add_config_flag)
|
if(COMMAND add_config_flag)
|
||||||
|
|
@ -37,7 +18,6 @@ if( QT3_FOUND )
|
||||||
add_config_flag( CGAL_HAS_QT3 )
|
add_config_flag( CGAL_HAS_QT3 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
|
|
||||||
message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
|
message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
|
||||||
message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" )
|
message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" )
|
||||||
message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
|
message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
|
||||||
|
|
@ -53,6 +33,12 @@ if( QT3_FOUND )
|
||||||
|
|
||||||
include(Qt3Macros-patched)
|
include(Qt3Macros-patched)
|
||||||
|
|
||||||
|
use_lib( GMP "###")
|
||||||
|
use_lib( MPFR "###")
|
||||||
|
if (CGAL_USE_GMPXX)
|
||||||
|
use_lib( GMPXX "###")
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
|
include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS} )
|
||||||
|
|
||||||
# Make sure QT3_AUTOMOC compiler can find CGALQt3 include files
|
# Make sure QT3_AUTOMOC compiler can find CGALQt3 include files
|
||||||
|
|
@ -129,6 +115,9 @@ if( QT3_FOUND )
|
||||||
install(TARGETS CGAL_Qt3 DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
install(TARGETS CGAL_Qt3 DESTINATION ${CGAL_INSTALL_LIB_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "libCGALQt3 is configured")
|
||||||
|
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message( STATUS "CGAL_Qt3 needs OpenGL, cannot be configured.")
|
message( STATUS "CGAL_Qt3 needs OpenGL, cannot be configured.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue