Fix CGAL_Qt5

In non-header-only, the resources and MOC files are added directly to
the CGAL_Qt5 library.
This commit is contained in:
Andreas Fabri 2017-11-22 09:59:52 +00:00
parent 1a76bd66d9
commit 021b340509
1 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,12 @@ message( STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'" )
include(Use_CGAL_Qt5_headers)
collect_cgal_library( CGAL_Qt5 "")
if(NOT CGAL_HEADER_ONLY)
collect_cgal_library( CGAL_Qt5 "${CGAL_Qt5_MOC_FILES};${CGAL_Qt5_RESOURCE_FILES}")
else()
collect_cgal_library( CGAL_Qt5 "")
target_link_libraries( CGAL_Qt5 INTERFACE CGAL_Qt5_extras)
endif()
if(CGAL_HEADER_ONLY)
set(keyword "INTERFACE")
@ -24,11 +29,6 @@ endif()
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)
set( CGAL_HAS_QT5 TRUE )
add_config_flag( CGAL_HAS_QT5 )