mirror of https://github.com/CGAL/cgal
Try to fix link issues with qt6 resources (#7915)
This commit is contained in:
commit
2e4139cbb3
|
|
@ -57,12 +57,6 @@ function(create_single_source_cgal_program firstfile )
|
|||
set(NO_TESTING TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT NO_TESTING)
|
||||
cgal_add_test(${exe_name})
|
||||
else()
|
||||
cgal_add_test(${exe_name} NO_EXECUTION)
|
||||
endif()
|
||||
|
||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
||||
|
||||
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL CGAL::Data)
|
||||
|
|
@ -75,13 +69,10 @@ function(create_single_source_cgal_program firstfile )
|
|||
target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0064)
|
||||
# CMake 3.4 or later
|
||||
if(NOT NO_TESTING)
|
||||
cgal_add_test(${exe_name})
|
||||
else()
|
||||
cgal_add_test(${exe_name} NO_EXECUTION)
|
||||
endif()
|
||||
if(NOT NO_TESTING)
|
||||
cgal_add_test(${exe_name})
|
||||
else()
|
||||
cgal_add_test(${exe_name} NO_EXECUTION)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -117,16 +117,15 @@ function(cgal_add_compilation_test exe_name)
|
|||
add_test(NAME "check build system"
|
||||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$<CONFIG>")
|
||||
set_property(TEST "check build system"
|
||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
||||
APPEND PROPERTY LABELS "CGAL_build_system" "Installation")
|
||||
set_property(TEST "check build system"
|
||||
PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture")
|
||||
endif()
|
||||
if(TARGET CGAL_Qt6_moc_and_resources) # if CGAL_Qt6 was searched, and is header-only
|
||||
get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES)
|
||||
# message(STATUS "${exe_name} depends on ${linked_libraries}")
|
||||
string(FIND "${linked_libraries}" "CGAL::CGAL_Qt6" link_with_CGAL_Qt6)
|
||||
if(link_with_CGAL_Qt6 STRGREATER "-1" AND
|
||||
NOT TARGET "compilation_of__CGAL_Qt6_moc_and_resources")
|
||||
if( ("CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Basic_viewer" IN_LIST linked_libraries)
|
||||
AND NOT TARGET "compilation_of__CGAL_Qt6_moc_and_resources")
|
||||
# This custom target is useless. It is used only as a flag to
|
||||
# detect that the test has already been created.
|
||||
add_custom_target("compilation_of__CGAL_Qt6_moc_and_resources")
|
||||
|
|
@ -134,7 +133,7 @@ function(cgal_add_compilation_test exe_name)
|
|||
add_test(NAME "compilation of CGAL_Qt6_moc_and_resources"
|
||||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "CGAL_Qt6_moc_and_resources" --config "$<CONFIG>")
|
||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
||||
APPEND PROPERTY LABELS "CGAL_build_system" "Installation")
|
||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||
PROPERTY FIXTURES_SETUP "CGAL_Qt6_moc_and_resources_Fixture")
|
||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ function(CGAL_hook_fix_ctest_depending_on_Qt6)
|
|||
continue()
|
||||
endif()
|
||||
get_property(_target_links TARGET ${_target} PROPERTY LINK_LIBRARIES)
|
||||
if("CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Qt6" IN_LIST _target_links)
|
||||
if("CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Basic_viewer" IN_LIST _target_links)
|
||||
set_property(TEST "compilation of ${_target}" APPEND PROPERTY FIXTURES_REQUIRED CGAL_Qt6_moc_and_resources_Fixture)
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
|||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "demo_framework" --config "$<CONFIG>")
|
||||
|
||||
set_property(TEST "compilation of demo_framework"
|
||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
||||
APPEND PROPERTY LABELS "CGAL_build_system" "Installation" "${PROJECT_NAME}")
|
||||
set_property(TEST "compilation of demo_framework"
|
||||
APPEND PROPERTY FIXTURES_SETUP "demo_framework_SetupFixture")
|
||||
set_property(TEST "compilation of demo_framework"
|
||||
APPEND PROPERTY DEPENDS "compilation_of__CGAL_Qt6_moc_and_resources")
|
||||
APPEND PROPERTY DEPENDS "check build system" "compilation of CGAL_Qt6_moc_and_resources")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
|
@ -61,7 +61,7 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
|||
endif()
|
||||
# Link with CGAL
|
||||
target_link_libraries( ${plugin_name} PUBLIC CGAL::CGAL )
|
||||
if(TARGET Polyhedron_3)
|
||||
if(NOT CGAL_TEST_SUITE AND TARGET Polyhedron_3)
|
||||
add_dependencies( ${plugin_name} Polyhedron_3 )
|
||||
endif()
|
||||
if(NOT TARGET CGALlab_all_plugins)
|
||||
|
|
|
|||
Loading…
Reference in New Issue