mirror of https://github.com/CGAL/cgal
- Fix soname and soversion of libraries (they were exchanged).
- Make get_dependency_version found the print_${LIB}_version.cpp, even
if the lib is compiled separately.
- Rename FindQt3.cmake to FindQt3-patched.cmake and Qt3Macros to
Qt3Macros-patched.
- Make CGAL-Qt3 compilable separately.
- Fix all commited CMakeLists.txt:
- use Qt3-patched and Qt3Macros-patched, and s/QT_/QT3_/
- add a comment about FindQt3-patched,
- wrap target creation with if(CGAL_FOUND AND QT3_FOUND)/else/endif
- Modified cgal_create_cmake_script
This commit is contained in:
parent
7c16f62874
commit
b52c7a09e9
|
|
@ -1660,13 +1660,13 @@ Installation/cmake/modules/FindMPFR.cmake -text
|
||||||
Installation/cmake/modules/FindOpenGL.cmake -text
|
Installation/cmake/modules/FindOpenGL.cmake -text
|
||||||
Installation/cmake/modules/FindPackageHandleStandardArgs.cmake -text
|
Installation/cmake/modules/FindPackageHandleStandardArgs.cmake -text
|
||||||
Installation/cmake/modules/FindQGLViewer.cmake -text
|
Installation/cmake/modules/FindQGLViewer.cmake -text
|
||||||
Installation/cmake/modules/FindQt3.cmake -text
|
Installation/cmake/modules/FindQt3-patched.cmake -text
|
||||||
Installation/cmake/modules/FindTAUCS.cmake -text
|
Installation/cmake/modules/FindTAUCS.cmake -text
|
||||||
Installation/cmake/modules/GeneratorSpecificSettings.cmake -text
|
Installation/cmake/modules/GeneratorSpecificSettings.cmake -text
|
||||||
Installation/cmake/modules/MacroFindOptionalCGALDependency.cmake -text
|
Installation/cmake/modules/MacroFindOptionalCGALDependency.cmake -text
|
||||||
Installation/cmake/modules/MacroOptionalFindPackage.cmake -text
|
Installation/cmake/modules/MacroOptionalFindPackage.cmake -text
|
||||||
Installation/cmake/modules/OptionalAddSubdirectory.cmake -text
|
Installation/cmake/modules/OptionalAddSubdirectory.cmake -text
|
||||||
Installation/cmake/modules/Qt3Macros.cmake -text
|
Installation/cmake/modules/Qt3Macros-patched.cmake -text
|
||||||
Installation/cmake/modules/UseCGAL.cmake -text
|
Installation/cmake/modules/UseCGAL.cmake -text
|
||||||
Installation/config/support/S05-BOOST -text
|
Installation/config/support/S05-BOOST -text
|
||||||
Installation/config/support/S06a-BOOST_PROGRAM_OPTIONS -text
|
Installation/config/support/S06a-BOOST_PROGRAM_OPTIONS -text
|
||||||
|
|
|
||||||
|
|
@ -9,21 +9,32 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
find_package(CGAL REQUIRED Qt3 )
|
find_package(CGAL REQUIRED Qt3 )
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
find_package(Qt3 REQUIRED)
|
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_".
|
||||||
|
|
||||||
# use the Qt MOC preprocessor on classes that derives from QObject
|
if ( CGAL_FOUND AND QT3_FOUND )
|
||||||
include( Qt3Macros )
|
|
||||||
qt3_generate_moc( Qt_widget_move_point.h Qt_widget_move_point.moc )
|
# use the Qt MOC preprocessor on classes that derives from QObject
|
||||||
qt3_generate_moc( Qt_widget_toolbar.h Qt_widget_toolbar.moc )
|
include( Qt3Macros-patched )
|
||||||
qt3_generate_moc( Qt_widget_toolbar_layers.h Qt_widget_toolbar_layers.moc )
|
qt3_generate_moc( Qt_widget_move_point.h Qt_widget_move_point.moc )
|
||||||
qt3_generate_moc( alpha_shapes_2.cpp alpha_shapes_2.moc )
|
qt3_generate_moc( Qt_widget_toolbar.h Qt_widget_toolbar.moc )
|
||||||
|
qt3_generate_moc( Qt_widget_toolbar_layers.h Qt_widget_toolbar_layers.moc )
|
||||||
|
qt3_generate_moc( alpha_shapes_2.cpp alpha_shapes_2.moc )
|
||||||
|
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( alpha_shapes_2
|
add_executable ( alpha_shapes_2
|
||||||
alpha_shapes_2.cpp alpha_shapes_2.moc
|
alpha_shapes_2.cpp alpha_shapes_2.moc
|
||||||
Qt_widget_move_point.cpp Qt_widget_move_point.moc
|
Qt_widget_move_point.cpp Qt_widget_move_point.moc
|
||||||
Qt_widget_toolbar.cpp Qt_widget_toolbar.moc
|
Qt_widget_toolbar.cpp Qt_widget_toolbar.moc
|
||||||
Qt_widget_toolbar_layers.cpp Qt_widget_toolbar_layers.moc )
|
Qt_widget_toolbar_layers.cpp Qt_widget_toolbar_layers.moc )
|
||||||
|
|
||||||
target_link_libraries( alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
|
target_link_libraries( alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,33 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
find_package(CGAL REQUIRED Qt3 )
|
find_package(CGAL REQUIRED Qt3 )
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
find_package(Qt3 REQUIRED)
|
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_".
|
||||||
|
|
||||||
include_directories (BEFORE ./include)
|
if ( CGAL_FOUND AND QT3_FOUND )
|
||||||
|
|
||||||
# use the Qt MOC preprocessor on classes that derives from QObject
|
include_directories (BEFORE ./include)
|
||||||
include( Qt3Macros )
|
|
||||||
qt3_generate_moc( apollonius_graph_2.cpp apollonius_graph_2.moc )
|
# use the Qt MOC preprocessor on classes that derives from QObject
|
||||||
qt3_generate_moc( qt_file_toolbar.h qt_file_toolbar.moc )
|
include( Qt3Macros-patched )
|
||||||
qt3_generate_moc( qt_layers_toolbar.h qt_layers_toolbar.moc )
|
qt3_generate_moc( apollonius_graph_2.cpp apollonius_graph_2.moc )
|
||||||
qt3_generate_moc( edit_vertex_layer.h edit_vertex_layer.moc )
|
qt3_generate_moc( qt_file_toolbar.h qt_file_toolbar.moc )
|
||||||
|
qt3_generate_moc( qt_layers_toolbar.h qt_layers_toolbar.moc )
|
||||||
|
qt3_generate_moc( edit_vertex_layer.h edit_vertex_layer.moc )
|
||||||
|
|
||||||
|
|
||||||
|
# The executable itself.
|
||||||
|
add_executable ( apollonius_graph_2
|
||||||
|
apollonius_graph_2.cpp apollonius_graph_2.moc
|
||||||
|
qt_file_toolbar.moc qt_layers_toolbar.moc edit_vertex_layer.moc )
|
||||||
|
|
||||||
|
|
||||||
|
target_link_libraries( apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
# The executable itself.
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
add_executable ( apollonius_graph_2
|
|
||||||
apollonius_graph_2.cpp apollonius_graph_2.moc
|
|
||||||
qt_file_toolbar.moc qt_layers_toolbar.moc edit_vertex_layer.moc )
|
|
||||||
|
|
||||||
|
endif()
|
||||||
target_link_libraries( apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,32 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
find_package(CGAL REQUIRED Qt3 )
|
find_package(CGAL REQUIRED Qt3 )
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
find_package(Qt3 REQUIRED)
|
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_".
|
||||||
|
|
||||||
# use the Qt MOC preprocessor on classes that derives from QObject
|
if ( CGAL_FOUND AND QT3_FOUND )
|
||||||
include( Qt3Macros )
|
|
||||||
qt3_generate_moc( arrangement_2.h arrangement_2.moc )
|
# use the Qt MOC preprocessor on classes that derives from QObject
|
||||||
qt3_generate_moc( forms.h forms.moc )
|
include( Qt3Macros-patched )
|
||||||
|
qt3_generate_moc( arrangement_2.h arrangement_2.moc )
|
||||||
|
qt3_generate_moc( forms.h forms.moc )
|
||||||
|
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( arrangement_2
|
add_executable ( arrangement_2
|
||||||
arrangement_2.cpp arrangement_2.moc
|
arrangement_2.cpp arrangement_2.moc
|
||||||
forms.cpp forms.moc
|
forms.cpp forms.moc
|
||||||
demo_tab.cpp
|
demo_tab.cpp
|
||||||
MyWindow_files.cpp
|
MyWindow_files.cpp
|
||||||
MyWindow_operations.cpp
|
MyWindow_operations.cpp
|
||||||
at_layer.cpp
|
at_layer.cpp
|
||||||
)
|
)
|
||||||
|
target_link_libraries( arrangement_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES})
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,30 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
find_package(CGAL REQUIRED Qt3 )
|
find_package(CGAL REQUIRED Qt3 )
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
find_package(Qt3 REQUIRED)
|
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_".
|
||||||
|
|
||||||
# use the Qt MOC preprocessor on classes that derives from QObject
|
if ( CGAL_FOUND AND QT3_FOUND )
|
||||||
include( Qt3Macros )
|
|
||||||
qt3_generate_moc( boolean_operations_2_toolbar.h boolean_operations_2_toolbar.moc )
|
# use the Qt MOC preprocessor on classes that derives from QObject
|
||||||
qt3_generate_moc( boolean_operations_2.h boolean_operations_2.moc )
|
include( Qt3Macros-patched )
|
||||||
|
qt3_generate_moc( boolean_operations_2_toolbar.h boolean_operations_2_toolbar.moc )
|
||||||
|
qt3_generate_moc( boolean_operations_2.h boolean_operations_2.moc )
|
||||||
|
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( boolean_operations_2
|
add_executable ( boolean_operations_2
|
||||||
boolean_operations_2.cpp boolean_operations_2.moc
|
boolean_operations_2.cpp boolean_operations_2.moc
|
||||||
boolean_operations_2_toolbar.cpp boolean_operations_2_toolbar.moc
|
boolean_operations_2_toolbar.cpp boolean_operations_2_toolbar.moc
|
||||||
Qt_widget_locate_layer.cpp
|
Qt_widget_locate_layer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( boolean_operations_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( boolean_operations_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ if(ZLIB_FOUND AND OPENGL_FOUND)
|
||||||
|
|
||||||
add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
|
add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} )
|
||||||
|
|
||||||
set_target_properties(CGAL_ImageIO PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
set_target_properties(CGAL_ImageIO PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
|
||||||
target_link_libraries( CGAL_ImageIO ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_ImageIO ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ if( GMP_FOUND AND MPFR_FOUND )
|
||||||
|
|
||||||
target_link_libraries( CGAL_CORE ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_CORE ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
set_target_properties(CGAL_CORE PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
set_target_properties(CGAL_CORE PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
|
||||||
# ${CGAL_CORE_BASENAME} comes defined from FindCGAL_CORE.cmake
|
# ${CGAL_CORE_BASENAME} comes defined from FindCGAL_CORE.cmake
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,8 @@
|
||||||
# src/CGALQt4/CMakeLists.txt
|
# src/CGALQt4/CMakeLists.txt
|
||||||
#
|
#
|
||||||
# The following variables must be set from the parent script:
|
# The following variables can be set from the parent script:
|
||||||
# The first two cannot be empty
|
|
||||||
#
|
#
|
||||||
# CGAL_BINARY_DIR
|
# CGAL_SONAME_VERSION
|
||||||
# CGAL_LIB_INSTALL_DIR
|
|
||||||
#
|
|
||||||
# CGAL_INCLUDE_DIRS
|
|
||||||
# GMP_INCLUDE_DIRS
|
|
||||||
# CGAL_DEFINITIONS
|
|
||||||
# CGAL_3RD_PARTY_INCLUDE_DIRS
|
|
||||||
# CGAL_3RD_PARTY_LIBRARIES
|
|
||||||
# CGAL_3RD_PARTY_DEFINITIONS
|
|
||||||
# CGAL_LIB_SHARED_LINKER_FLAGS
|
|
||||||
# CGAL_VERSION
|
|
||||||
# CGAL_MAJOR_VERSION
|
|
||||||
# CGAL_MINOR_VERSION
|
|
||||||
# CGAL_SOVERSION
|
# CGAL_SOVERSION
|
||||||
|
|
||||||
project (CGALQt4)
|
project (CGALQt4)
|
||||||
|
|
@ -38,7 +25,7 @@ if( QT4_FOUND )
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
get_dependency_version(OPENGL OpenGL)
|
get_dependency_version(OPENGL OpenGL)
|
||||||
get_dependency_version(QT4 Qt4)
|
get_dependency_version(QT4)
|
||||||
|
|
||||||
if(COMMAND add_config_flag)
|
if(COMMAND add_config_flag)
|
||||||
set( CGAL_HAS_QT4 TRUE )
|
set( CGAL_HAS_QT4 TRUE )
|
||||||
|
|
@ -86,7 +73,7 @@ if( QT4_FOUND )
|
||||||
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} )
|
add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} )
|
||||||
|
|
||||||
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
|
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
|
||||||
set_target_properties(CGAL_Qt4 PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
set_target_properties(CGAL_Qt4 PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT AUTO_LINK_ENABLED )
|
if (NOT AUTO_LINK_ENABLED )
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ if( NOT CGAL_COMMON_FILE_INCLUDED )
|
||||||
try_run( ${LIB}_RUN_RES
|
try_run( ${LIB}_RUN_RES
|
||||||
${LIB}_COMPILE_RES
|
${LIB}_COMPILE_RES
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/config/support/print_${LIB}_version.cpp
|
${CGAL_SOURCE_DIR}/config/support/print_${LIB}_version.cpp
|
||||||
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_DEPENDENCY_INCLUDE_DIR};${${PKG}_INCLUDE_DIR}"
|
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_DEPENDENCY_INCLUDE_DIR};${${PKG}_INCLUDE_DIR}"
|
||||||
"-DLINK_LIBRARIES:STRING=${${PKG}_DEPENDENCY_LIBRARIES};${${PKG}_LIBRARIES}"
|
"-DLINK_LIBRARIES:STRING=${${PKG}_DEPENDENCY_LIBRARIES};${${PKG}_LIBRARIES}"
|
||||||
"-DLINK_DIRECTORIES:STRING=${${PKG}_DEPENDENCY_LIBRARY_DIR};${${PKG}_LIBRARY_DIR}"
|
"-DLINK_DIRECTORIES:STRING=${${PKG}_DEPENDENCY_LIBRARY_DIR};${${PKG}_LIBRARY_DIR}"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ macro(create_single_source_cgal_qt3_program first )
|
||||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
include_directories( ${QT_INCLUDE_DIR} )
|
include_directories( ${QT3_INCLUDE_DIR} )
|
||||||
|
|
||||||
add_executable (${exe_name} ${all})
|
add_executable (${exe_name} ${all})
|
||||||
|
|
||||||
|
|
@ -23,9 +23,9 @@ macro(create_single_source_cgal_qt3_program first )
|
||||||
|
|
||||||
# Link the executable to CGAL and third-party libraries
|
# Link the executable to CGAL and third-party libraries
|
||||||
if ( AUTO_LINK_ENABLED )
|
if ( AUTO_LINK_ENABLED )
|
||||||
target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} )
|
target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} ${QT3_LIBRARIES} )
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES})
|
target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif(EXISTS ${first})
|
endif(EXISTS ${first})
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ target_link_libraries(CGAL ${CGAL_3RD_PARTY_LIBRARIES})
|
||||||
|
|
||||||
set( CGAL_BASENAME CGAL )
|
set( CGAL_BASENAME CGAL )
|
||||||
|
|
||||||
set_target_properties(CGAL PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
set_target_properties(CGAL PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
|
||||||
if (NOT AUTO_LINK_ENABLED )
|
if (NOT AUTO_LINK_ENABLED )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Created by the script cgal_create_cmake_script (and then adapted manually).
|
||||||
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
|
|
||||||
|
project( Mesh_2_demo )
|
||||||
|
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
|
||||||
|
|
||||||
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
|
|
||||||
|
find_package(CGAL REQUIRED CORE Qt3 )
|
||||||
|
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_FOUND AND QT3_FOUND )
|
||||||
|
|
||||||
|
include( Qt3Macros-patched )
|
||||||
|
QT3_AUTOMOC( conform.cpp icons.cpp mesh.cpp mesh_demo.cpp Qt_widget_styled_layer.cpp Qt_widget_style_editor.cpp Show_points.cpp Show_segments_base.cpp )
|
||||||
|
|
||||||
|
# Make sure the compiler can find generated .moc files
|
||||||
|
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
include_directories( ${QT3_INCLUDE_DIR} )
|
||||||
|
|
||||||
|
add_executable (Mesh_2_demo icons.cpp mesh_demo.cpp Qt_widget_styled_layer.cpp Qt_widget_style_editor.cpp Show_points.cpp Show_segments_base.cpp)
|
||||||
|
|
||||||
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Mesh_2_demo )
|
||||||
|
|
||||||
|
# Link the main executable to CGAL and third-party libraries
|
||||||
|
target_link_libraries(Mesh_2_demo ${QT3_LIBRARIES} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
# conform target
|
||||||
|
add_executable (conform conform.cpp)
|
||||||
|
target_link_libraries(conform ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
# mesh target
|
||||||
|
add_executable (mesh mesh.cpp)
|
||||||
|
target_link_libraries(mesh ${QT3_LIBRARIES} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
# Created by the script cgal_create_cmake_script
|
|
||||||
# This is the CMake script for compiling a CGAL application.
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
|
|
||||||
project (Nef_3_Demo)
|
project (Nef_3_Demo)
|
||||||
|
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
|
||||||
|
|
||||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
|
|
||||||
find_package(CGAL)
|
find_package(CGAL REQUIRED Qt3)
|
||||||
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
find_package(Qt3)
|
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_FOUND AND QT_FOUND )
|
if ( CGAL_FOUND AND QT3_FOUND )
|
||||||
|
|
||||||
include(${CGAL_USE_FILE})
|
include(Qt3Macros-patched)
|
||||||
include(Qt3Macros)
|
|
||||||
include(CreateSingleSourceCGALQt3Program)
|
include(CreateSingleSourceCGALQt3Program)
|
||||||
|
|
||||||
include_directories (BEFORE include)
|
include_directories (BEFORE include)
|
||||||
|
|
@ -27,6 +30,6 @@ if ( CGAL_FOUND AND QT_FOUND )
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message( STATUS "This demo requires CGAL and Qt3" )
|
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ include_directories( ${CGAL_3RD_PARTY_INCLUDE_DIRS} )
|
||||||
|
|
||||||
add_library(CGAL_PDB "all_files.cpp")
|
add_library(CGAL_PDB "all_files.cpp")
|
||||||
|
|
||||||
set_target_properties(CGAL_PDB PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
set_target_properties(CGAL_PDB PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
|
||||||
target_link_libraries( CGAL_PDB ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_PDB ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# src/CGALQt/CMakeLists.txt
|
# src/CGALQt/CMakeLists.txt
|
||||||
#
|
#
|
||||||
# The following variables must be set from the parent script:
|
# The following variables can be set from the parent script:
|
||||||
# The first two cannot be empty
|
# The first two cannot be empty
|
||||||
#
|
#
|
||||||
# CGAL_BINARY_DIR
|
# CGAL_BINARY_DIR
|
||||||
|
|
@ -16,18 +16,31 @@
|
||||||
# CGAL_MAJOR_VERSION
|
# CGAL_MAJOR_VERSION
|
||||||
# CGAL_MINOR_VERSION
|
# CGAL_MINOR_VERSION
|
||||||
|
|
||||||
assert(CGAL_BINARY_DIR)
|
project (CGALQt3)
|
||||||
|
|
||||||
|
find_package(CGAL REQUIRED)
|
||||||
|
include(${CGAL_USE_FILE})
|
||||||
|
|
||||||
find_package(OpenGL QUIET )
|
find_package(OpenGL QUIET )
|
||||||
find_package(Qt3 QUIET )
|
|
||||||
|
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( QT3_FOUND )
|
if( QT3_FOUND )
|
||||||
|
|
||||||
if( OPENGL_FOUND )
|
if( OPENGL_FOUND )
|
||||||
|
|
||||||
get_dependency_version(OPENGL OpenGL)
|
get_dependency_version(OPENGL OpenGL)
|
||||||
get_dependency_version(QT)
|
get_dependency_version(QT3)
|
||||||
|
|
||||||
|
if(COMMAND add_config_flag)
|
||||||
|
set( CGAL_HAS_QT3 TRUE )
|
||||||
|
add_config_flag( CGAL_HAS_QT3 )
|
||||||
|
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}" )
|
||||||
|
|
@ -41,7 +54,7 @@ if( QT3_FOUND )
|
||||||
cache_set(CGAL_Qt3_3RD_PARTY_LIBRARIES ${QT3_LIBRARIES} ${OPENGL_LIBRARIES} )
|
cache_set(CGAL_Qt3_3RD_PARTY_LIBRARIES ${QT3_LIBRARIES} ${OPENGL_LIBRARIES} )
|
||||||
cache_set(CGAL_Qt3_3RD_PARTY_DEFINITIONS ${QT3_DEFINITIONS} ${OPENGL_DEFINITIONS} )
|
cache_set(CGAL_Qt3_3RD_PARTY_DEFINITIONS ${QT3_DEFINITIONS} ${OPENGL_DEFINITIONS} )
|
||||||
|
|
||||||
include(Qt3Macros)
|
include(Qt3Macros-patched)
|
||||||
|
|
||||||
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} )
|
||||||
|
|
||||||
|
|
@ -91,7 +104,9 @@ if( QT3_FOUND )
|
||||||
|
|
||||||
add_dependencies( CGAL_Qt3 CGAL )
|
add_dependencies( CGAL_Qt3 CGAL )
|
||||||
|
|
||||||
set_target_properties(CGAL_Qt3 PROPERTIES VERSION "${CGAL_SONAME_VERSION}" SOVERSION "${CGAL_SOVERSION}")
|
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
|
||||||
|
set_target_properties(CGAL_Qt3 PROPERTIES VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries( CGAL_Qt3 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt3_3RD_PARTY_LIBRARIES} )
|
target_link_libraries( CGAL_Qt3 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt3_3RD_PARTY_LIBRARIES} )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,71 +35,73 @@
|
||||||
create_cmake_script()
|
create_cmake_script()
|
||||||
{
|
{
|
||||||
# print makefile header
|
# print makefile header
|
||||||
echo '# Created by the script cgal_create_cmake_script'
|
cat <<EOF
|
||||||
echo '# This is the CMake script for compiling a CGAL application.'
|
# Created by the script cgal_create_cmake_script
|
||||||
echo
|
# This is the CMake script for compiling a CGAL application.
|
||||||
|
|
||||||
echo "project( ${PROJECT}_${TYPE} ) "
|
|
||||||
echo
|
project( ${PROJECT}_${TYPE} )
|
||||||
echo 'CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)'
|
EOF
|
||||||
echo
|
cat <<'EOF'
|
||||||
echo 'set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)'
|
|
||||||
echo
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
|
||||||
|
|
||||||
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
if [ "${TYPE}" = "demo" ] ; then
|
if [ "${TYPE}" = "demo" ] ; then
|
||||||
|
|
||||||
echo 'find_package(Qt3 REQUIRED)'
|
|
||||||
echo
|
|
||||||
echo 'find_package(CGAL REQUIRED CORE Qt3 )'
|
|
||||||
echo
|
|
||||||
echo 'include( ${CGAL_USE_FILE} )'
|
|
||||||
echo 'include( Qt3Macros )'
|
|
||||||
echo
|
|
||||||
|
|
||||||
target_name="${PROJECT}_${TYPE}"
|
target_name="${PROJECT}_${TYPE}"
|
||||||
|
|
||||||
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
|
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
|
||||||
all="$all $file"
|
all="$all $file"
|
||||||
done
|
done
|
||||||
|
cat <<'EOF'
|
||||||
|
find_package(CGAL REQUIRED CORE Qt3 )
|
||||||
|
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_".
|
||||||
|
|
||||||
|
include( Qt3Macros )
|
||||||
|
EOF
|
||||||
echo "QT3_AUTOMOC( ${all} )"
|
echo "QT3_AUTOMOC( ${all} )"
|
||||||
echo
|
cat<<'EOF'
|
||||||
|
|
||||||
echo '# Make sure the compiler can find generated .moc files'
|
# Make sure the compiler can find generated .moc files
|
||||||
echo 'include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})'
|
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
echo 'include_directories( ${QT_INCLUDE_DIR} )'
|
include_directories( ${QT3_INCLUDE_DIR} )
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
if [ -d include ] ; then
|
if [ -d include ] ; then
|
||||||
echo 'include_directories (BEFORE include)'
|
echo 'include_directories (BEFORE include)'
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
echo
|
cat <<EOF
|
||||||
|
add_executable (${target_name} ${all})
|
||||||
echo "add_executable (${target_name} ${all})"
|
|
||||||
echo
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )
|
||||||
echo "add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${target_name} )"
|
|
||||||
echo
|
|
||||||
|
# Link the executable to CGAL and third-party libraries
|
||||||
echo '# Link the executable to CGAL and third-party libraries'
|
target_link_libraries(${target_name} \${QT3_LIBRARIES} \${CGAL_LIBRARIES} \${CGAL_3RD_PARTY_LIBRARIES} )
|
||||||
echo 'if ( AUTO_LINK_ENABLED )'
|
EOF
|
||||||
echo " target_link_libraries(${target_name}"' ${QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )'
|
|
||||||
echo 'else()'
|
|
||||||
echo " target_link_libraries(${target_name}" ' ${QT_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_LIBRARIES} )'
|
|
||||||
echo 'endif()'
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
cat <<'EOF'
|
||||||
echo 'find_package(CGAL REQUIRED CORE )'
|
find_package(CGAL REQUIRED CORE )
|
||||||
echo
|
include( ${CGAL_USE_FILE} )
|
||||||
echo
|
|
||||||
echo 'include( ${CGAL_USE_FILE} )'
|
include( CreateSingleSourceCGALProgram )
|
||||||
echo 'include( CreateSingleSourceCGALProgram )'
|
|
||||||
echo
|
EOF
|
||||||
|
|
||||||
if [ -d include ] ; then
|
if [ -d include ] ; then
|
||||||
echo 'include_directories (BEFORE include)'
|
echo 'include_directories (BEFORE include)'
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
|
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
|
||||||
|
|
@ -123,7 +125,7 @@ usage()
|
||||||
echo "Usage: cgal_create_cmake_script [TYPE]"
|
echo "Usage: cgal_create_cmake_script [TYPE]"
|
||||||
echo
|
echo
|
||||||
echo " TYPE must be any of example, demo or test."
|
echo " TYPE must be any of example, demo or test."
|
||||||
echo " Defaukt is example."
|
echo " Default is example."
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue