mirror of https://github.com/CGAL/cgal
remove mentions of Qt3
This commit is contained in:
parent
8e62e05519
commit
eb4f860f3b
|
|
@ -753,7 +753,6 @@ QP_solver/documentation/UpdateZ.log
|
||||||
QP_solver/documentation/UpdateZ.pdf
|
QP_solver/documentation/UpdateZ.pdf
|
||||||
QP_solver/documentation/UpdateZ.synctex.gz
|
QP_solver/documentation/UpdateZ.synctex.gz
|
||||||
Qt_widget/.env
|
Qt_widget/.env
|
||||||
Qt_widget/src/CGAL_Qt3/*.moc
|
|
||||||
Qt_widget/test/Qt_widget/test_qt_version
|
Qt_widget/test/Qt_widget/test_qt_version
|
||||||
Random_numbers/*.aux
|
Random_numbers/*.aux
|
||||||
Random_numbers/*.bbl
|
Random_numbers/*.bbl
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,6 @@ if ( RUNNING_CGAL_AUTO_TEST )
|
||||||
CGAL_MAINTENANCE_PACKAGE_DIR
|
CGAL_MAINTENANCE_PACKAGE_DIR
|
||||||
CGAL_PDB_BINARY_DIR
|
CGAL_PDB_BINARY_DIR
|
||||||
CGAL_PDB_SOURCE_DIR
|
CGAL_PDB_SOURCE_DIR
|
||||||
CGAL_Qt3_SOURCE_DIR
|
|
||||||
CGAL_BINARY_DIR
|
CGAL_BINARY_DIR
|
||||||
CGAL_SOURCE_DIR)
|
CGAL_SOURCE_DIR)
|
||||||
# message("List of cache variables:")
|
# message("List of cache variables:")
|
||||||
|
|
@ -524,7 +523,7 @@ message("== Detect external libraries ==")
|
||||||
|
|
||||||
# this is the place to tell which external libs are supporting
|
# this is the place to tell which external libs are supporting
|
||||||
# Remarks:
|
# Remarks:
|
||||||
# External libs Qt3 and Qt34are configured when Qt3 or Qt5 as lib of cgal are required
|
# External libs configured when Qt5 lib of cgal are required
|
||||||
# Coin is used in KDS, but no FindCoin or FindCOIN exists
|
# 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
|
# There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs
|
||||||
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
|
list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE)
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,6 @@ CGAL packages, some are only needed for demos.
|
||||||
* Visualization
|
* Visualization
|
||||||
Required for most demos
|
Required for most demos
|
||||||
|
|
||||||
- Qt3 (>= 3.3)
|
|
||||||
ftp://ftp.qt.nokia.com/qt/source/
|
|
||||||
|
|
||||||
- Qt5 (>= 5.3)
|
- Qt5 (>= 5.3)
|
||||||
http://qt-project.org/
|
http://qt-project.org/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ file in the current directory containing a
|
||||||
function is compiled and linked as a separate executable.
|
function is compiled and linked as a separate executable.
|
||||||
.TP
|
.TP
|
||||||
.B demo
|
.B demo
|
||||||
Create a cmake script for a single application including Qt3 support. All
|
Create a cmake script for a single application. All
|
||||||
.I C
|
.I C
|
||||||
and
|
and
|
||||||
.IR cpp
|
.IR cpp
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,11 @@ if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS)
|
||||||
CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
|
CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
|
CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
|
CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_Qt3_LIBRARY CGAL::CGAL_Qt3 LOCATION)
|
|
||||||
CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION)
|
CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION)
|
||||||
else()
|
else()
|
||||||
set(CGAL_LIBRARY "")
|
set(CGAL_LIBRARY "")
|
||||||
set(CGAL_Core_LIBRARY "")
|
set(CGAL_Core_LIBRARY "")
|
||||||
set(CGAL_ImageIO_LIBRARY "")
|
set(CGAL_ImageIO_LIBRARY "")
|
||||||
set(CGAL_Qt3_LIBRARY "")
|
|
||||||
set(CGAL_Qt5_LIBRARY "")
|
set(CGAL_Qt5_LIBRARY "")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|
@ -56,7 +54,6 @@ else()
|
||||||
CGAL_alias_library(CGAL)
|
CGAL_alias_library(CGAL)
|
||||||
CGAL_alias_library(CGAL_Core)
|
CGAL_alias_library(CGAL_Core)
|
||||||
CGAL_alias_library(CGAL_ImageIO)
|
CGAL_alias_library(CGAL_ImageIO)
|
||||||
CGAL_alias_library(CGAL_Qt3)
|
|
||||||
CGAL_alias_library(CGAL_Qt5)
|
CGAL_alias_library(CGAL_Qt5)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -90,7 +87,6 @@ set(CGAL_LIBRARIES_DIR "@CGAL_LIBRARIES_DIR@" )
|
||||||
set(WITH_CGAL "ON" )
|
set(WITH_CGAL "ON" )
|
||||||
set(WITH_CGAL_Core "@WITH_CGAL_Core@" )
|
set(WITH_CGAL_Core "@WITH_CGAL_Core@" )
|
||||||
set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
|
set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
|
||||||
set(WITH_CGAL_Qt3 "@WITH_CGAL_Qt3@" )
|
|
||||||
set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" )
|
set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" )
|
||||||
|
|
||||||
set(CGAL_3RD_PARTY_INCLUDE_DIRS "@CGAL_3RD_PARTY_INCLUDE_DIRS@" )
|
set(CGAL_3RD_PARTY_INCLUDE_DIRS "@CGAL_3RD_PARTY_INCLUDE_DIRS@" )
|
||||||
|
|
@ -109,11 +105,6 @@ set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIR
|
||||||
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
|
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
|
||||||
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
|
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
|
||||||
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_DEFINITIONS "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_LIBRARIES "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" )
|
|
||||||
|
|
||||||
set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" )
|
set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" )
|
||||||
set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" )
|
set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" )
|
||||||
set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" )
|
set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" )
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ set(CGAL_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_LIB_DIR@" )
|
||||||
set(WITH_CGAL "ON" )
|
set(WITH_CGAL "ON" )
|
||||||
set(WITH_CGAL_Core "@WITH_CGAL_Core@" )
|
set(WITH_CGAL_Core "@WITH_CGAL_Core@" )
|
||||||
set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
|
set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" )
|
||||||
set(WITH_CGAL_Qt3 "@WITH_CGAL_Qt3@" )
|
|
||||||
set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" )
|
set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" )
|
||||||
|
|
||||||
macro(CGAL_get_property_optional VAR TARGET PROPERTY)
|
macro(CGAL_get_property_optional VAR TARGET PROPERTY)
|
||||||
|
|
@ -56,13 +55,11 @@ if(NOT MSVC)
|
||||||
CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
|
CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
|
CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
|
CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION)
|
||||||
CGAL_get_property_optional(CGAL_Qt3_LIBRARY CGAL::CGAL_Qt3 LOCATION)
|
|
||||||
CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION)
|
CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION)
|
||||||
else()
|
else()
|
||||||
set(CGAL_LIBRARY "")
|
set(CGAL_LIBRARY "")
|
||||||
set(CGAL_Core_LIBRARY "")
|
set(CGAL_Core_LIBRARY "")
|
||||||
set(CGAL_ImageIO_LIBRARY "")
|
set(CGAL_ImageIO_LIBRARY "")
|
||||||
set(CGAL_Qt3_LIBRARY "")
|
|
||||||
set(CGAL_Qt5_LIBRARY "")
|
set(CGAL_Qt5_LIBRARY "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -82,11 +79,6 @@ set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIR
|
||||||
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
|
set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" )
|
||||||
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
|
set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" )
|
||||||
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_DEFINITIONS "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" )
|
|
||||||
set(CGAL_Qt3_3RD_PARTY_LIBRARIES "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" )
|
|
||||||
|
|
||||||
set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" )
|
set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" )
|
||||||
set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" )
|
set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" )
|
||||||
set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" )
|
set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" )
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
||||||
message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}")
|
message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}")
|
||||||
|
|
||||||
# UseLIB-file has to set ${vlib}_SETUP to TRUE
|
# UseLIB-file has to set ${vlib}_SETUP to TRUE
|
||||||
# TODO EBEB what about Qt5, Qt3, zlib?
|
# TODO EBEB what about Qt5, zlib?
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
|
|
@ -286,11 +286,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
||||||
find_package( ZLIB QUIET )
|
find_package( ZLIB QUIET )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${component} STREQUAL "Qt3")
|
|
||||||
find_package( OpenGL QUIET )
|
|
||||||
find_package( Qt3-patched QUIET )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (${component} STREQUAL "Qt5")
|
if (${component} STREQUAL "Qt5")
|
||||||
find_package( OpenGL QUIET )
|
find_package( OpenGL QUIET )
|
||||||
find_package( Qt5 QUIET COMPONENTS OpenGL Svg )
|
find_package( Qt5 QUIET COMPONENTS OpenGL Svg )
|
||||||
|
|
@ -337,10 +332,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
|
||||||
find_package( ZLIB )
|
find_package( ZLIB )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${component} STREQUAL "Qt3")
|
|
||||||
find_package( OpenGL )
|
|
||||||
find_package( Qt3-patched )
|
|
||||||
endif()
|
|
||||||
if (${component} STREQUAL "Qt5")
|
if (${component} STREQUAL "Qt5")
|
||||||
set(CGAL_${component}_FOUND TRUE)
|
set(CGAL_${component}_FOUND TRUE)
|
||||||
find_package( OpenGL )
|
find_package( OpenGL )
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES})
|
||||||
use_lib( ${vlib} ${${vlib}_USE_FILE})
|
use_lib( ${vlib} ${${vlib}_USE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO EBEB what about Qt3, Qt5, zlib etc?
|
# TODO EBEB what about Qt5, zlib etc?
|
||||||
set ( CGAL_USE_${vlib} TRUE )
|
set ( CGAL_USE_${vlib} TRUE )
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
// Copyright (c) 2007 GeometryFactory (France). All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Fernando Cacciola (fernando.cacciola@geometryfactry.com)
|
|
||||||
|
|
||||||
#ifndef CGAL_AUTO_LINK_CGALQT_H
|
|
||||||
#define CGAL_AUTO_LINK_CGALQT_H
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
|
||||||
|
|
||||||
#ifndef CGAL_NO_AUTOLINK_CGALQT
|
|
||||||
|
|
||||||
#define CGAL_LIB_NAME CGAL_Qt3
|
|
||||||
#include <CGAL/auto_link/auto_link.h>
|
|
||||||
|
|
||||||
#endif // CGAL_NO_AUTOLINK_CGALQT
|
|
||||||
|
|
||||||
#endif // CGAL_AUTO_LINK_CGALQT_H
|
|
||||||
|
|
@ -69,11 +69,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function( configure_component DIR COMPONENT )
|
function( configure_component DIR COMPONENT )
|
||||||
if(${COMPONENT} STREQUAL "CGAL_Qt3")
|
set(enabled_by_default ON)
|
||||||
set(enabled_by_default OFF)
|
|
||||||
else()
|
|
||||||
set(enabled_by_default ON)
|
|
||||||
endif()
|
|
||||||
option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ${enabled_by_default})
|
option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ${enabled_by_default})
|
||||||
if ( WITH_${COMPONENT})
|
if ( WITH_${COMPONENT})
|
||||||
add_subdirectory( ${DIR} ${COMPONENT} )
|
add_subdirectory( ${DIR} ${COMPONENT} )
|
||||||
|
|
@ -178,7 +174,6 @@ endmacro()
|
||||||
CGAL_add_if_target(CGAL)
|
CGAL_add_if_target(CGAL)
|
||||||
CGAL_add_if_target(CGAL_Core)
|
CGAL_add_if_target(CGAL_Core)
|
||||||
CGAL_add_if_target(CGAL_ImageIO)
|
CGAL_add_if_target(CGAL_ImageIO)
|
||||||
CGAL_add_if_target(CGAL_Qt3)
|
|
||||||
CGAL_add_if_target(CGAL_Qt5)
|
CGAL_add_if_target(CGAL_Qt5)
|
||||||
|
|
||||||
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
|
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,6 @@ if ( CGAL_FOUND )
|
||||||
create_link_to_program(CGAL_ImageIO)
|
create_link_to_program(CGAL_ImageIO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ( WITH_CGAL_Qt3 )
|
|
||||||
create_link_to_program(CGAL_Qt3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( WITH_CGAL_Qt4 )
|
if ( WITH_CGAL_Qt4 )
|
||||||
find_package(Qt4 QUIET)
|
find_package(Qt4 QUIET)
|
||||||
if( QT4_FOUND )
|
if( QT4_FOUND )
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
|
||||||
|
|
||||||
#include <CGAL/IO/pixmaps/alpha_shape.xpm>
|
|
||||||
#include <CGAL/auto_link/CGALQt3.h>
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
volatile const char * xpm = alpha_shape_xpm[0] ;
|
|
||||||
|
|
||||||
return (xpm != 0) ? 0 : 1 ;
|
|
||||||
}
|
|
||||||
|
|
@ -8,8 +8,6 @@ if(POLICY CMP0043)
|
||||||
cmake_policy(SET CMP0043 OLD)
|
cmake_policy(SET CMP0043 OLD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(Qt3)
|
|
||||||
|
|
||||||
find_package(CGAL COMPONENTS Core )
|
find_package(CGAL COMPONENTS Core )
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
This directory contains non-graphical demos of the 2D Mesh Generator
|
This directory contains non-graphical demos of the 2D Mesh Generator
|
||||||
package. An old Qt3-based demos lies in the qt3/ sub-directory. The
|
package.
|
||||||
Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that
|
The Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that
|
||||||
demonstrates the 2D Mesh Generator package. See in the directory
|
demonstrates the 2D Mesh Generator package. See in the directory
|
||||||
demo/Triangulation_2/ of the CGAL tarball.
|
demo/Triangulation_2/ of the CGAL tarball.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_OpenGL.h
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_OpenGL.moc
|
|
||||||
)
|
|
||||||
|
|
||||||
set(CGAL_Qt3_MOC_FILES ${CGAL_Qt3_MOC_FILES} Qt_widget_OpenGL.moc)
|
|
||||||
|
|
@ -1,252 +0,0 @@
|
||||||
// Copyright (c) 1999 Max-Planck-Institute Saarbruecken (Germany).
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
// published by the Free Software Foundation; either version 3 of the License,
|
|
||||||
// or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// Licensees holding a valid commercial license may use this file in
|
|
||||||
// accordance with the commercial license agreement provided with the software.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Michael Seel <seel@mpi-sb.mpg.de>
|
|
||||||
// Peter Hachenberger <hachenberger@mpi-sb.mpg.de>
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <CGAL/IO/Qt_widget_OpenGL.h>
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
namespace CGAL {
|
|
||||||
|
|
||||||
Qt_widget_OpenGL::Qt_widget_OpenGL(int width, int height, double scale) :
|
|
||||||
window_width(width),
|
|
||||||
window_height(height),
|
|
||||||
motion_mode(ROTATE),
|
|
||||||
dx(0),
|
|
||||||
dy(0),
|
|
||||||
dz(0),
|
|
||||||
s(scale),
|
|
||||||
init_s(scale),
|
|
||||||
rotation(CGAL::IDENTITY){}
|
|
||||||
|
|
||||||
CGAL::OGL::OGL_base_object::Affine_3
|
|
||||||
Qt_widget_OpenGL::virtual_sphere_transformation( double old_x, double old_y,
|
|
||||||
double new_x, double new_y) {
|
|
||||||
|
|
||||||
if ( old_x == new_x && old_y == new_y)// zero rotation.
|
|
||||||
return Affine_3( CGAL::IDENTITY);
|
|
||||||
// Determine the projected vectors on the `sphere'.
|
|
||||||
double dd = old_x * old_x + old_y * old_y;
|
|
||||||
Double_vector v_old( old_x, old_y,
|
|
||||||
((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd)));
|
|
||||||
dd = new_x * new_x + new_y * new_y;
|
|
||||||
Double_vector v_new( new_x, new_y,
|
|
||||||
((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd)));
|
|
||||||
Double_vector axis = cross_product( v_old, v_new);
|
|
||||||
double angle = 0.0;
|
|
||||||
double norm = std::sqrt( (v_old*v_old)*(v_new*v_new));
|
|
||||||
if ( norm != 0) {
|
|
||||||
double x = v_old*v_new/ norm;
|
|
||||||
if ( x <= -1)
|
|
||||||
angle = CGAL_PI;
|
|
||||||
if ( x < 1)
|
|
||||||
angle = std::acos(x);
|
|
||||||
}
|
|
||||||
double len = std::sqrt( double(axis * axis));
|
|
||||||
double s = std::sin( angle / 2.0) / len;
|
|
||||||
double q1 = axis.x() * s; // quaternion
|
|
||||||
double q2 = axis.y() * s;
|
|
||||||
double q3 = axis.z() * s;
|
|
||||||
double q0 = std::cos( angle / 2.0);
|
|
||||||
double a = q1 * q2;
|
|
||||||
double b = q0 * q3;
|
|
||||||
double c = q1 * q3;
|
|
||||||
double d = q0 * q2;
|
|
||||||
double e = q2 * q3;
|
|
||||||
double f = q0 * q1;
|
|
||||||
double qq0 = q0 * q0;
|
|
||||||
double qq1 = q1 * q1;
|
|
||||||
double qq2 = q2 * q2;
|
|
||||||
double qq3 = q3 * q3;
|
|
||||||
return Affine_3( qq0 + qq1 - qq2 - qq3, 2 * (a-b), 2 * (c+d),
|
|
||||||
2 * (a+b), qq0 - qq1 + qq2 - qq3, 2 * (e-f),
|
|
||||||
2 * (c-d), 2 * (e+f), qq0 - qq1 - qq2 + qq3);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::mouseMoveEvent(QMouseEvent* event) {
|
|
||||||
int x = event->x();
|
|
||||||
int y = event->y();
|
|
||||||
switch ( interaction) {
|
|
||||||
case SCALE:
|
|
||||||
s *= std::exp( (x - mouse_x + mouse_y -y) * factor_s );
|
|
||||||
break;
|
|
||||||
case ROTATE: {
|
|
||||||
double old_x = 1.2 * (mouse_x - window_width/2) / window_radius;
|
|
||||||
double old_y = - 1.2 * (mouse_y - window_height/2) / window_radius;
|
|
||||||
double new_x = 1.2 * (x - window_width/2) / window_radius;
|
|
||||||
double new_y = - 1.2 * (y - window_height/2) / window_radius;
|
|
||||||
rotation = virtual_sphere_transformation( old_x, old_y, new_x, new_y)
|
|
||||||
* rotation;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TRANSLATE:
|
|
||||||
dx += (x - mouse_x) * 2.0 / window_radius;
|
|
||||||
dy -= (y - mouse_y) * 2.0 / window_radius;
|
|
||||||
break;
|
|
||||||
case TRANS_Z:
|
|
||||||
dz += (x - mouse_x + mouse_y -y) * 2.0 / window_radius;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
mouse_x = x;
|
|
||||||
mouse_y = y;
|
|
||||||
|
|
||||||
updateGL();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::mousePressEvent(QMouseEvent* event) {
|
|
||||||
mouse_x = event->x();
|
|
||||||
mouse_y = event->y();
|
|
||||||
interaction = 0;
|
|
||||||
if (event->stateAfter() & QMouseEvent::LeftButton) {
|
|
||||||
if (event->stateAfter() & QMouseEvent::ShiftButton)
|
|
||||||
interaction = SCALE;
|
|
||||||
else
|
|
||||||
interaction = motion_mode;
|
|
||||||
}
|
|
||||||
if(event->stateAfter() & QMouseEvent::MidButton) {
|
|
||||||
if (event->stateAfter() & QMouseEvent::ShiftButton)
|
|
||||||
interaction = TRANS_Z;
|
|
||||||
else
|
|
||||||
interaction = TRANSLATE;
|
|
||||||
}
|
|
||||||
if(event->stateAfter() & QMouseEvent::RightButton)
|
|
||||||
main->exec(QPoint(event->globalX(),event->globalY()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::mouseReleaseEvent(QMouseEvent* event) {
|
|
||||||
mousePressEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::paintGL() {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslated(dx,dy,dz);
|
|
||||||
// glTranslated(0,0,1);
|
|
||||||
GLdouble M[16] = { rotation.m(0,0), rotation.m(1,0), rotation.m(2,0), 0.0,
|
|
||||||
rotation.m(0,1), rotation.m(1,1), rotation.m(2,1), 0.0,
|
|
||||||
rotation.m(0,2), rotation.m(1,2), rotation.m(2,2), 0.0,
|
|
||||||
rotation.m(0,3), rotation.m(1,3), rotation.m(2,3), 1.0};
|
|
||||||
glMultMatrixd( M);
|
|
||||||
glScaled(s,s,s);
|
|
||||||
object_->draw();
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::initializeGL() {
|
|
||||||
GLfloat mat_diffuse[4] = { 0.7f, 0.7f, 0.7f, 1.0f };
|
|
||||||
GLfloat mat_specular[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
|
||||||
GLfloat mat_shininess[] = { 100.0f };
|
|
||||||
GLfloat ambient_light[] = { 0.2f, 0.2f, 0.2f, 1.0f };
|
|
||||||
|
|
||||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient_light);
|
|
||||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse );
|
|
||||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular );
|
|
||||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess );
|
|
||||||
#ifdef SCREENSHOTS
|
|
||||||
GLfloat mat_emission[] = { 0.1, 0.1, 0.2, 0.0 };
|
|
||||||
glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission);
|
|
||||||
//for screenshots enable this section
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GLfloat light0[4] = { 4.0, 4.0, 10.0, 1.0 };
|
|
||||||
glLightfv (GL_LIGHT0, GL_POSITION, light0);
|
|
||||||
glEnable (GL_LIGHT0);
|
|
||||||
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
glEnable(GL_AUTO_NORMAL);
|
|
||||||
glEnable(GL_NORMALIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::resizeGL(int width, int height) {
|
|
||||||
window_width = width;
|
|
||||||
window_height = height;
|
|
||||||
window_radius = (std::min)( width, height) / 2;
|
|
||||||
|
|
||||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
|
|
||||||
if (width>height)
|
|
||||||
{
|
|
||||||
long double w = (long double) width / (long double) height;
|
|
||||||
glOrtho( -2*w, 2*w, -w, w, -4.0, 4.0 );
|
|
||||||
factor_d = 2.0 / (height/2.0);
|
|
||||||
// halbe Fensterhoehe soll 2 LE entsprechen
|
|
||||||
factor_w = 90.0 / (height/2.0);
|
|
||||||
// halbe Fensterhoehe soll 90 Grad entsprechen
|
|
||||||
factor_s = std::log(4.0) / (height/2.0);
|
|
||||||
// halbe Fensterhoehe soll Faktor 4 entsprechen
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
long double h = (long double) height / (long double) width;
|
|
||||||
glOrtho( -2.0, 2.0, -2*h, 2*h, -4.0, 4.0 );
|
|
||||||
factor_d = 2.0 / (width/2.0);
|
|
||||||
// halbe Fensterbreite soll 2 LE entsprechen
|
|
||||||
factor_w = 90.0 / (width/2.0);
|
|
||||||
// halbe Fensterbreite soll 90 Grad entsprechen
|
|
||||||
factor_s = std::log(4.0) / (height/2.0);
|
|
||||||
// halbe Fensterhoehe soll Faktor 4 entsprechen
|
|
||||||
}
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::slotControlMenu(int index) {
|
|
||||||
if(index == RESET_CONTROL) {
|
|
||||||
dx = dy = dz = 0.0;
|
|
||||||
s = init_s;
|
|
||||||
rotation = Affine_3(CGAL::IDENTITY);
|
|
||||||
motion_mode = ROTATE;
|
|
||||||
object_->init();
|
|
||||||
updateGL();
|
|
||||||
} else
|
|
||||||
motion_mode = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::slotRenderMenu(int index) {
|
|
||||||
object_->set_style(index);
|
|
||||||
updateGL();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::slotOptionsMenu(int index) {
|
|
||||||
object_->toggle(index);
|
|
||||||
updateGL();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::slotFullscreen() {
|
|
||||||
if(fullscreen) {
|
|
||||||
showNormal();
|
|
||||||
} else {
|
|
||||||
showMaximized();
|
|
||||||
}
|
|
||||||
fullscreen = !fullscreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Qt_widget_OpenGL::slotPerspective() {
|
|
||||||
perspective = !perspective;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace CGAL
|
|
||||||
#include "Qt_widget_OpenGL.moc"
|
|
||||||
|
|
@ -30,7 +30,6 @@ message(STATUS "Create CMakeLists.txt")
|
||||||
set(PROJECT CGAL) #`basename $PWD` # TODO set value based on dir/source dir
|
set(PROJECT CGAL) #`basename $PWD` # TODO set value based on dir/source dir
|
||||||
set(SINGLE_SOURCE "Polygon_2")
|
set(SINGLE_SOURCE "Polygon_2")
|
||||||
list(INSERT CGAL_COMPONENTS 0 Qt4 CoRe gmP MPFR Rs rs3 MPFI) # TODO default value
|
list(INSERT CGAL_COMPONENTS 0 Qt4 CoRe gmP MPFR Rs rs3 MPFI) # TODO default value
|
||||||
set(WITH_QT3 FALSE)
|
|
||||||
set(WITH_QT4 FALSE)
|
set(WITH_QT4 FALSE)
|
||||||
set(WITH_ALL_PRECONFIGURED_LIBS FALSE)
|
set(WITH_ALL_PRECONFIGURED_LIBS FALSE)
|
||||||
list(INSERT BOOST_COMPONENTS 0 thread) # TODO default value
|
list(INSERT BOOST_COMPONENTS 0 thread) # TODO default value
|
||||||
|
|
@ -96,13 +95,11 @@ foreach( component ${CGAL_COMPONENTS})
|
||||||
#string(REGEX REPLACE "()" "" rewrote_component ${component})
|
#string(REGEX REPLACE "()" "" rewrote_component ${component})
|
||||||
#set(component ${rewrote_component})
|
#set(component ${rewrote_component})
|
||||||
|
|
||||||
# CGAL: Core, Qt3, Qt4, PDB, ImageIO
|
# CGAL: Core, Qt4, PDB, ImageIO
|
||||||
string(REGEX REPLACE "([c|C][o|O][r|R][e|E])" "Core" rewrote_component ${component})
|
string(REGEX REPLACE "([c|C][o|O][r|R][e|E])" "Core" rewrote_component ${component})
|
||||||
set(component ${rewrote_component})
|
set(component ${rewrote_component})
|
||||||
string(REGEX REPLACE "([i|I][m|M][a|A][g|G][e|E][i|I][o|O])" "ImageIO" rewrote_component ${component})
|
string(REGEX REPLACE "([i|I][m|M][a|A][g|G][e|E][i|I][o|O])" "ImageIO" rewrote_component ${component})
|
||||||
set(component ${rewrote_component})
|
set(component ${rewrote_component})
|
||||||
string(REGEX REPLACE "([q|Q][t|T]3)" "Qt3" rewrote_component ${component})
|
|
||||||
set(component ${rewrote_component})
|
|
||||||
string(REGEX REPLACE "([q|Q][t|T]4)" "Qt4" rewrote_component ${component})
|
string(REGEX REPLACE "([q|Q][t|T]4)" "Qt4" rewrote_component ${component})
|
||||||
set(component ${rewrote_component})
|
set(component ${rewrote_component})
|
||||||
|
|
||||||
|
|
@ -146,10 +143,7 @@ foreach( component ${CGAL_COMPONENTS})
|
||||||
|
|
||||||
list(APPEND CGAL_REWROTE_COMPONENTS ${component})
|
list(APPEND CGAL_REWROTE_COMPONENTS ${component})
|
||||||
|
|
||||||
# detect qt3, qt4
|
# detect qt4
|
||||||
if ( ${component} STREQUAL "Qt3" )
|
|
||||||
set(WITH_QT3 TRUE)
|
|
||||||
endif()
|
|
||||||
if ( ${component} STREQUAL "Qt4" )
|
if ( ${component} STREQUAL "Qt4" )
|
||||||
set(WITH_QT4 TRUE)
|
set(WITH_QT4 TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -228,31 +222,6 @@ if ( EXISTS ../include )
|
||||||
include_directories( BEFORE ../include )\n\n")
|
include_directories( BEFORE ../include )\n\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (WITH_QT3)
|
|
||||||
file(APPEND CMakeLists.txt
|
|
||||||
"# Qt3
|
|
||||||
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
|
||||||
# that it can be used together with FindQt4: all its variables are prefixed
|
|
||||||
# by \"QT3_\" instead of \"QT_\".
|
|
||||||
find_package(Qt3-patched QUIET )
|
|
||||||
|
|
||||||
if ( NOT QT3_FOUND )
|
|
||||||
|
|
||||||
message(STATUS \"This project requires the Qt3 library, and will not be compiled.\")
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( CGAL_Qt3_FOUND )
|
|
||||||
|
|
||||||
include( Qt3Macros-patched )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WITH_QT4)
|
if (WITH_QT4)
|
||||||
file(APPEND CMakeLists.txt
|
file(APPEND CMakeLists.txt
|
||||||
"# Qt4
|
"# Qt4
|
||||||
|
|
@ -309,39 +278,6 @@ else()
|
||||||
file(APPEND CMakeLists.txt "include( CGAL_CreateSingleSourceCGALProgram )\n\n")
|
file(APPEND CMakeLists.txt "include( CGAL_CreateSingleSourceCGALProgram )\n\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (WITH_QT3)
|
|
||||||
|
|
||||||
file(APPEND CMakeLists.txt
|
|
||||||
"if ( CGAL_Qt3_FOUND AND QT3_FOUND )
|
|
||||||
|
|
||||||
")
|
|
||||||
|
|
||||||
# TODO all globs in ${SOURCE_DIR}
|
|
||||||
# TODO check if globs are non-empty
|
|
||||||
file(GLOB SOURCE_FILES *.C *.cpp) # TODO sort?
|
|
||||||
foreach( file ${SOURCE_FILES} )
|
|
||||||
file(STRINGS ${file} filecontent)
|
|
||||||
string(REGEX MATCH "(^main|[^a-zA-Z0-9_]main) *[(]" result ${filecontent})
|
|
||||||
if (result)
|
|
||||||
file(APPEND CMakeLists.txt " qt3_automoc( ${file} )\n")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
file(APPEND CMakeLists.txt
|
|
||||||
"# Make sure the compiler can find generated .moc files
|
|
||||||
include_directories( BEFORE \${CMAKE_CURRENT_BINARY_DIR} )
|
|
||||||
|
|
||||||
include_directories( \${QT3_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
link_libraries( \${QT3_LIBRARIES} )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
")
|
|
||||||
|
|
||||||
endif(WITH_QT3)
|
|
||||||
|
|
||||||
if (WITH_QT4)
|
if (WITH_QT4)
|
||||||
|
|
||||||
file(APPEND CMakeLists.txt
|
file(APPEND CMakeLists.txt
|
||||||
|
|
@ -401,24 +337,6 @@ else()
|
||||||
|
|
||||||
file(GLOB ALL_SOURCES *.C *.cpp) # TODO sort sources?
|
file(GLOB ALL_SOURCES *.C *.cpp) # TODO sort sources?
|
||||||
|
|
||||||
if (WITH_QT3)
|
|
||||||
|
|
||||||
file(APPEND CMakeLists.txt
|
|
||||||
"if ( CGAL_Qt3_FOUND AND QT3_FOUND )
|
|
||||||
|
|
||||||
qt3_automoc( \${ALL_SOURCES} )
|
|
||||||
|
|
||||||
# Make sure the compiler can find generated .moc files
|
|
||||||
include_directories( BEFORE \${CMAKE_CURRENT_BINARY_DIR} )
|
|
||||||
|
|
||||||
include_directories( \${QT3_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
")
|
|
||||||
|
|
||||||
endif(WITH_QT3)
|
|
||||||
|
|
||||||
if(WITH_QT4)
|
if(WITH_QT4)
|
||||||
|
|
||||||
file(APPEND CMakeLists.txt
|
file(APPEND CMakeLists.txt
|
||||||
|
|
@ -490,9 +408,6 @@ add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${SINGLE_SOURCE} )
|
||||||
|
|
||||||
set(LIBS "")
|
set(LIBS "")
|
||||||
|
|
||||||
if (WITH_QT3)
|
|
||||||
set(LIBS "\${QT3_LIBRARIES}")
|
|
||||||
endif(WITH_QT3)
|
|
||||||
if (WITH_QT4)
|
if (WITH_QT4)
|
||||||
set(LIBS "\${QT_LIBRARIES}")
|
set(LIBS "\${QT_LIBRARIES}")
|
||||||
endif(WITH_QT4)
|
endif(WITH_QT4)
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
#NTL
|
#NTL
|
||||||
|
|
||||||
#Core (implies GMP+GMPXX)
|
#Core (implies GMP+GMPXX)
|
||||||
#Qt3 (implies QT3)
|
|
||||||
#Qt4 (implies QT4)
|
#Qt4 (implies QT4)
|
||||||
#ImageIO
|
#ImageIO
|
||||||
|
|
||||||
|
|
@ -53,7 +52,6 @@
|
||||||
|
|
||||||
create_cmake_script_with_options()
|
create_cmake_script_with_options()
|
||||||
{
|
{
|
||||||
qt3='n'
|
|
||||||
qt4='n'
|
qt4='n'
|
||||||
|
|
||||||
# parse options file
|
# parse options file
|
||||||
|
|
@ -125,9 +123,8 @@ fi
|
||||||
if [ ! -z "$CGAL_COMPONENTS" ]; then
|
if [ ! -z "$CGAL_COMPONENTS" ]; then
|
||||||
# ensure capitalization
|
# ensure capitalization
|
||||||
|
|
||||||
# CGAL: Core, Qt3, Qt4, PDB, ImageIO
|
# CGAL: Core, Qt4, PDB, ImageIO
|
||||||
CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core}
|
CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core}
|
||||||
CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]3/Qt3}
|
|
||||||
CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4}
|
CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4}
|
||||||
CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO}
|
CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO}
|
||||||
|
|
||||||
|
|
@ -166,9 +163,6 @@ fi
|
||||||
COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
|
COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'`
|
||||||
|
|
||||||
# for qtmoc
|
# for qtmoc
|
||||||
if [ "$COMPONENT" = "qt3" ]; then
|
|
||||||
qt3='y'
|
|
||||||
fi
|
|
||||||
if [ "$COMPONENT" = "qt4" ]; then
|
if [ "$COMPONENT" = "qt4" ]; then
|
||||||
qt4='y'
|
qt4='y'
|
||||||
fi
|
fi
|
||||||
|
|
@ -266,34 +260,7 @@ EOF
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Qt3 or Qt4
|
# Qt4
|
||||||
if [ "$qt3" = "y" ]; then
|
|
||||||
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
||||||
cat << 'EOF'
|
|
||||||
|
|
||||||
# Qt3
|
|
||||||
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
|
||||||
# that it can be used together with FindQt4: all its variables are prefixed
|
|
||||||
# by "QT3_" instead of "QT_".
|
|
||||||
find_package(Qt3-patched QUIET )
|
|
||||||
|
|
||||||
if ( NOT QT3_FOUND )
|
|
||||||
|
|
||||||
message(STATUS "This project requires the Qt3 library, and will not be compiled.")
|
|
||||||
return()
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( CGAL_Qt3_FOUND )
|
|
||||||
|
|
||||||
include( Qt3Macros-patched )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
EOF
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
fi # qt3
|
|
||||||
|
|
||||||
if [ "$qt4" = "y" ]; then
|
if [ "$qt4" = "y" ]; then
|
||||||
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
@ -369,47 +336,6 @@ EOF
|
||||||
# add a new line
|
# add a new line
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Qt3
|
|
||||||
if [ "$qt3" = "y" ]; then
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
||||||
cat << 'EOF'
|
|
||||||
if ( CGAL_Qt3_FOUND AND QT3_FOUND )
|
|
||||||
|
|
||||||
EOF
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do
|
|
||||||
# Create an executable for each cpp that contains a function "main()"
|
|
||||||
BASE=`basename $file .cc`
|
|
||||||
BASE=`basename $BASE .cp`
|
|
||||||
BASE=`basename $BASE .cxx`
|
|
||||||
BASE=`basename $BASE .cpp`
|
|
||||||
BASE=`basename $BASE .CPP`
|
|
||||||
BASE=`basename $BASE .c++`
|
|
||||||
BASE=`basename $BASE .C`
|
|
||||||
egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "qt3_automoc( ${file} )"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
||||||
cat << 'EOF'
|
|
||||||
|
|
||||||
# Make sure the compiler can find generated .moc files
|
|
||||||
include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
|
|
||||||
|
|
||||||
include_directories( ${QT3_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
list(APPEND CGAL_3RD_PARTY_LIBRARIES ${QT3_LIBRARIES} )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
EOF
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
fi # qt3
|
|
||||||
|
|
||||||
# Qt4
|
# Qt4
|
||||||
if [ "$qt4" = "y" ]; then
|
if [ "$qt4" = "y" ]; then
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
@ -486,31 +412,6 @@ EOF
|
||||||
all="$all $file"
|
all="$all $file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Qt3
|
|
||||||
if [ "$qt3" = "y" ]; then
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
||||||
cat << 'EOF'
|
|
||||||
|
|
||||||
if ( CGAL_Qt3_FOUND AND QT3_FOUND )
|
|
||||||
|
|
||||||
EOF
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
echo "qt3_automoc( ${all} )"
|
|
||||||
|
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
||||||
cat << 'EOF'
|
|
||||||
|
|
||||||
# Make sure the compiler can find generated .moc files
|
|
||||||
include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} )
|
|
||||||
|
|
||||||
include_directories( ${QT3_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
endif()
|
|
||||||
EOF
|
|
||||||
#-----------------------------------------------------------------------
|
|
||||||
fi # qt3
|
|
||||||
|
|
||||||
# Qt4
|
# Qt4
|
||||||
if [ "$qt4" = "y" ]; then
|
if [ "$qt4" = "y" ]; then
|
||||||
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
|
|
@ -586,9 +487,6 @@ EOF
|
||||||
echo
|
echo
|
||||||
echo "# Link the executable to CGAL and third-party libraries"
|
echo "# Link the executable to CGAL and third-party libraries"
|
||||||
LIBS=""
|
LIBS=""
|
||||||
if [ "$qt3" = "y" ]; then
|
|
||||||
LIBS="\${QT3_LIBRARIES}"
|
|
||||||
fi
|
|
||||||
if [ "$qt4" = "y" ]; then
|
if [ "$qt4" = "y" ]; then
|
||||||
LIBS="\${QT_LIBRARIES}"
|
LIBS="\${QT_LIBRARIES}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -611,7 +509,7 @@ usage()
|
||||||
echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2
|
echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2
|
||||||
echo >&2
|
echo >&2
|
||||||
echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2
|
echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2
|
||||||
echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt3','Qt4' ('benchmark', 'symbolic')." >&2
|
echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt4' ('benchmark', 'symbolic')." >&2
|
||||||
echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2
|
echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2
|
||||||
echo " -p use all of CGAL's preconfigured libraries" >&2
|
echo " -p use all of CGAL's preconfigured libraries" >&2
|
||||||
echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
|
echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2
|
||||||
|
|
|
||||||
|
|
@ -48,75 +48,6 @@ cmake_minimum_required(VERSION 2.8.10)
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "${TYPE}" = "demo" ] ; then
|
|
||||||
target_name="${PROJECT}_${TYPE}"
|
|
||||||
|
|
||||||
for file in `ls "$SOURCE_DIR"*.cc "$SOURCE_DIR"*.cp "$SOURCE_DIR"*.cxx "$SOURCE_DIR"*.cpp "$SOURCE_DIR"*.CPP "$SOURCE_DIR"*.c++ "$SOURCE_DIR"*.C 2>/dev/null | sort` ; do
|
|
||||||
all="$all $file"
|
|
||||||
done
|
|
||||||
if [ -z "${all}" ]; then return; fi
|
|
||||||
cat <<'EOF'
|
|
||||||
find_package(CGAL QUIET COMPONENTS Core Qt3 )
|
|
||||||
|
|
||||||
if ( CGAL_FOUND )
|
|
||||||
|
|
||||||
include( ${CGAL_USE_FILE} )
|
|
||||||
|
|
||||||
find_package(Qt3-patched QUIET )
|
|
||||||
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
|
||||||
# that it can be used together with FindQt4: all its variables are prefixed
|
|
||||||
# by "QT3_" instead of "QT_".
|
|
||||||
|
|
||||||
if(CGAL_Qt3_FOUND AND QT3_FOUND)
|
|
||||||
|
|
||||||
include( Qt3Macros-patched )
|
|
||||||
EOF
|
|
||||||
echo " qt3_automoc( ${all} )"
|
|
||||||
cat<<'EOF'
|
|
||||||
|
|
||||||
# Make sure the compiler can find generated .moc files
|
|
||||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
|
|
||||||
include_directories( ${QT3_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -d "${SOURCE_DIR}../../include" ] ; then
|
|
||||||
echo " include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
if [ -d "${SOURCE_DIR}../include" ] ; then
|
|
||||||
echo " include_directories (BEFORE \"${SOURCE_DIR}../include\")"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
if [ -d "${SOURCE_DIR}include" ] ; then
|
|
||||||
echo " include_directories (BEFORE \"${SOURCE_DIR}include\")"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
echo "Adding a target ${target_name}..." >&3
|
|
||||||
cat <<EOF
|
|
||||||
add_executable (${target_name} ${all})
|
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )
|
|
||||||
|
|
||||||
|
|
||||||
# Link the executable to CGAL and third-party libraries
|
|
||||||
target_link_libraries(${target_name} \${QT3_LIBRARIES} \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES} )
|
|
||||||
else()
|
|
||||||
|
|
||||||
message(STATUS "NOTICE: This demo requires Qt3 and the CGAL Qt3 library, and will not be compiled.")
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else()
|
|
||||||
|
|
||||||
message(STATUS "NOTICE: This demo requires the CGAL library, and will not be compiled.")
|
|
||||||
|
|
||||||
endif()
|
|
||||||
EOF
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
find_package(CGAL QUIET COMPONENTS Core )
|
find_package(CGAL QUIET COMPONENTS Core )
|
||||||
|
|
||||||
|
|
@ -165,8 +96,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -174,11 +103,11 @@ EOF
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "Usage: cgal_create_cmake_script [TYPE] [--source_dir <source directory>]"
|
echo "Usage: cgal_create_cmake_script [--source_dir <source directory>]"
|
||||||
echo
|
echo
|
||||||
echo " Create a CMakeLists.txt file in the current working directory."
|
echo " Create a CMakeLists.txt file in the current working directory."
|
||||||
echo
|
echo
|
||||||
echo " TYPE must be any of example, demo or test. The default is example."
|
echo " TYPE must be any of example or test. The default is example."
|
||||||
echo
|
echo
|
||||||
echo " If the option --source_dir is specified with a directory, the "
|
echo " If the option --source_dir is specified with a directory, the "
|
||||||
echo " CMakeLists.txt uses source files from that directory, otherwise "
|
echo " CMakeLists.txt uses source files from that directory, otherwise "
|
||||||
|
|
|
||||||
|
|
@ -280,8 +280,6 @@ parse_flags_and_third_party_choices
|
||||||
parse_lib_building_results "libCGAL" "CGAL"
|
parse_lib_building_results "libCGAL" "CGAL"
|
||||||
parse_lib_building_results "libCGALCore" "CGAL_Core"
|
parse_lib_building_results "libCGALCore" "CGAL_Core"
|
||||||
parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO"
|
parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO"
|
||||||
parse_lib_building_results "libCGALQt" "CGAL_Qt3"
|
|
||||||
parse_lib_building_results "libCGALQt4" "CGAL_Qt4"
|
|
||||||
parse_lib_building_results "libCGALQt5" "CGAL_Qt5"
|
parse_lib_building_results "libCGALQt5" "CGAL_Qt5"
|
||||||
|
|
||||||
for DIR in $TEST_DIRECTORIES ; do
|
for DIR in $TEST_DIRECTORIES ; do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue