mirror of https://github.com/CGAL/cgal
New way to use the CGAL_Qt5 extra files
This commit is contained in:
parent
6af02862de
commit
2daba815b3
|
|
@ -26,9 +26,9 @@ add_definitions(-DQT_NO_KEYWORDS)
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable( Constrained_Delaunay_triangulation_2
|
add_executable( Constrained_Delaunay_triangulation_2
|
||||||
Constrained_Delaunay_triangulation_2.cpp ${CGAL_Qt5_extras})
|
Constrained_Delaunay_triangulation_2.cpp)
|
||||||
target_link_libraries( Constrained_Delaunay_triangulation_2
|
target_link_libraries( Constrained_Delaunay_triangulation_2
|
||||||
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets)
|
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Qt5_extras Qt5::Widgets)
|
||||||
target_include_directories( Constrained_Delaunay_triangulation_2
|
target_include_directories( Constrained_Delaunay_triangulation_2
|
||||||
PRIVATE ./include)
|
PRIVATE ./include)
|
||||||
|
|
||||||
|
|
@ -40,9 +40,9 @@ add_to_cached_list(CGAL_EXECUTABLE_TARGETS Constrained_Delaunay_triangulation_2)
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( Delaunay_triangulation_2
|
add_executable ( Delaunay_triangulation_2
|
||||||
Delaunay_triangulation_2.cpp ${CGAL_Qt5_extras})
|
Delaunay_triangulation_2.cpp)
|
||||||
target_link_libraries( Delaunay_triangulation_2
|
target_link_libraries( Delaunay_triangulation_2
|
||||||
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets)
|
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Qt5_extras Qt5::Widgets)
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
|
||||||
|
|
||||||
|
|
@ -52,8 +52,8 @@ add_to_cached_list( CGAL_EXECUTABLE_TARGETS Delaunay_triangulation_2 )
|
||||||
|
|
||||||
# The executable itself.
|
# The executable itself.
|
||||||
add_executable ( Regular_triangulation_2
|
add_executable ( Regular_triangulation_2
|
||||||
Regular_triangulation_2.cpp ${CGAL_Qt5_extras})
|
Regular_triangulation_2.cpp)
|
||||||
target_link_libraries(Regular_triangulation_2
|
target_link_libraries(Regular_triangulation_2
|
||||||
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 Qt5::Widgets)
|
PRIVATE CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Qt5_extras Qt5::Widgets)
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS Regular_triangulation_2 )
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@ message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" )
|
||||||
|
|
||||||
include(Use_CGAL_Qt5_headers)
|
include(Use_CGAL_Qt5_headers)
|
||||||
|
|
||||||
list(APPEND additional_files ${CGAL_Qt5_MOC_FILES} ${CGAL_Qt5_RESOURCE_FILES})
|
collect_cgal_library( CGAL_Qt5 "")
|
||||||
|
|
||||||
collect_cgal_library( CGAL_Qt5 "${additional_files}")
|
|
||||||
|
|
||||||
if(CGAL_HEADER_ONLY)
|
if(CGAL_HEADER_ONLY)
|
||||||
set(keyword "INTERFACE")
|
set(keyword "INTERFACE")
|
||||||
|
|
@ -21,6 +19,11 @@ endif()
|
||||||
|
|
||||||
CGAL_setup_CGAL_Qt5_dependencies( CGAL_Qt5 ${keyword})
|
CGAL_setup_CGAL_Qt5_dependencies( CGAL_Qt5 ${keyword})
|
||||||
|
|
||||||
|
if(NOT CGAL_HEADER_ONLY)
|
||||||
|
target_link_libraries( CGAL_Qt5 PRIVATE CGAL_Qt5_extras)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(COMMAND add_config_flag)
|
if(COMMAND add_config_flag)
|
||||||
set( CGAL_HAS_QT5 TRUE )
|
set( CGAL_HAS_QT5 TRUE )
|
||||||
add_config_flag( CGAL_HAS_QT5 )
|
add_config_flag( CGAL_HAS_QT5 )
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
if(Use_CGAL_Qt5_headers_included)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(Use_CGAL_Qt5_headers_included TRUE)
|
||||||
|
|
||||||
qt5_wrap_cpp(CGAL_Qt5_MOC_FILES
|
qt5_wrap_cpp(CGAL_Qt5_MOC_FILES
|
||||||
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
|
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h
|
||||||
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h
|
${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h
|
||||||
|
|
@ -13,3 +18,14 @@ qt5_add_resources (CGAL_Qt5_RESOURCE_FILES
|
||||||
|
|
||||||
set(CGAL_Qt5_extras)
|
set(CGAL_Qt5_extras)
|
||||||
list(APPEND CGAL_Qt5_extras ${CGAL_Qt5_MOC_FILES} ${CGAL_Qt5_RESOURCE_FILES})
|
list(APPEND CGAL_Qt5_extras ${CGAL_Qt5_MOC_FILES} ${CGAL_Qt5_RESOURCE_FILES})
|
||||||
|
|
||||||
|
if(NOT TARGET CGAL_Qt5_extras)
|
||||||
|
add_library(CGAL_Qt5_extras STATIC ${CGAL_Qt5_extras})
|
||||||
|
set_target_properties(CGAL_Qt5_extras PROPERTIES
|
||||||
|
POSITION_INDEPENDENT_CODE TRUE
|
||||||
|
EXCLUDE_FROM_ALL TRUE)
|
||||||
|
target_link_libraries(CGAL_Qt5_extras Qt5::Widgets Qt5::OpenGL Qt5::Svg)
|
||||||
|
|
||||||
|
add_library(CGAL::CGAL_Qt5_extras ALIAS CGAL_Qt5_extras)
|
||||||
|
add_library(CGAL::Qt5_extras ALIAS CGAL_Qt5_extras)
|
||||||
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue