mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
Qt install (not working)
This commit is contained in:
@@ -75,6 +75,17 @@ option(BUILD_IFCVIEWER "Build IfcViewer, a high-performance IFC viewer" OFF) # R
|
|||||||
option(BUILD_IFCVIEWER_TESTS "Build unit tests for IfcViewer (fetches Catch2 v3)" OFF)
|
option(BUILD_IFCVIEWER_TESTS "Build unit tests for IfcViewer (fetches Catch2 v3)" OFF)
|
||||||
option(BUILD_PACKAGE "" OFF)
|
option(BUILD_PACKAGE "" OFF)
|
||||||
|
|
||||||
|
option(
|
||||||
|
IFCOPENSHELL_DEPLOY_QT_RUNTIME
|
||||||
|
"Deploy Qt runtime dependencies for installed Qt applications."
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
option(
|
||||||
|
IFCOPENSHELL_DEPLOY_QT_TRANSLATIONS
|
||||||
|
"Deploy Qt translation catalogs with installed Qt applications."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
|
||||||
option(WITH_OPENCASCADE "Enable geometry interpretation using Open CASCADE" ON)
|
option(WITH_OPENCASCADE "Enable geometry interpretation using Open CASCADE" ON)
|
||||||
option(WITH_CGAL "Enable geometry interpretation using CGAL" ON)
|
option(WITH_CGAL "Enable geometry interpretation using CGAL" ON)
|
||||||
option(WITH_MANIFOLD "Enable geometry interpretation using Manifold" OFF)
|
option(WITH_MANIFOLD "Enable geometry interpretation using Manifold" OFF)
|
||||||
|
|||||||
@@ -69,6 +69,47 @@ function(ifcopenshell_wasm_plugin_link_options TARGET REGISTRATION_SYMBOL)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(ifcopenshell_deploy_qt_runtime TARGET)
|
||||||
|
if(NOT IFCOPENSHELL_DEPLOY_QT_RUNTIME)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT TARGET ${TARGET})
|
||||||
|
message(FATAL_ERROR "Cannot deploy Qt runtime for unknown target '${TARGET}'.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_target_property(target_type ${TARGET} TYPE)
|
||||||
|
if(NOT target_type STREQUAL "EXECUTABLE")
|
||||||
|
message(FATAL_ERROR "Qt runtime deployment target '${TARGET}' is not an executable.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(deploy_args
|
||||||
|
TARGET ${TARGET}
|
||||||
|
OUTPUT_SCRIPT deploy_script
|
||||||
|
NO_UNSUPPORTED_PLATFORM_ERROR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT IFCOPENSHELL_DEPLOY_QT_TRANSLATIONS)
|
||||||
|
list(APPEND deploy_args NO_TRANSLATIONS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND deploy_args ${ARGN})
|
||||||
|
|
||||||
|
if(COMMAND qt_generate_deploy_app_script)
|
||||||
|
qt_generate_deploy_app_script(${deploy_args})
|
||||||
|
elseif(COMMAND qt6_generate_deploy_app_script)
|
||||||
|
qt6_generate_deploy_app_script(${deploy_args})
|
||||||
|
else()
|
||||||
|
message(WARNING
|
||||||
|
"Qt runtime deployment requested for '${TARGET}', but this Qt version "
|
||||||
|
"does not provide qt_generate_deploy_app_script()."
|
||||||
|
)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(SCRIPT ${deploy_script})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# Get a list of all OPTION flags from the CMakeLists.txt and store in an output LIST
|
# Get a list of all OPTION flags from the CMakeLists.txt and store in an output LIST
|
||||||
function(get_all_option_flags output_list)
|
function(get_all_option_flags output_list)
|
||||||
# Read the contents of the CMakeLists.txt
|
# Read the contents of the CMakeLists.txt
|
||||||
|
|||||||
@@ -34,3 +34,4 @@ set_target_properties(IfcViewerFull PROPERTIES
|
|||||||
target_link_libraries(IfcViewerFull PRIVATE IfcViewer)
|
target_link_libraries(IfcViewerFull PRIVATE IfcViewer)
|
||||||
|
|
||||||
install(TARGETS IfcViewerFull EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
install(TARGETS IfcViewerFull EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
||||||
|
ifcopenshell_deploy_qt_runtime(IfcViewerFull)
|
||||||
|
|||||||
@@ -34,3 +34,4 @@ set_target_properties(IfcViewerMinimal PROPERTIES
|
|||||||
target_link_libraries(IfcViewerMinimal PRIVATE IfcViewer)
|
target_link_libraries(IfcViewerMinimal PRIVATE IfcViewer)
|
||||||
|
|
||||||
install(TARGETS IfcViewerMinimal EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
install(TARGETS IfcViewerMinimal EXPORT ${IFCOPENSHELL_EXPORT_TARGETS})
|
||||||
|
ifcopenshell_deploy_qt_runtime(IfcViewerMinimal)
|
||||||
|
|||||||
@@ -101,3 +101,4 @@ get_target_property(targetIncludeDirs ${targetName} INCLUDE_DIRECTORIES)
|
|||||||
message(STATUS "target_include_directories: ${targetIncludeDirs}")
|
message(STATUS "target_include_directories: ${targetIncludeDirs}")
|
||||||
|
|
||||||
install(TARGETS ${targetName})
|
install(TARGETS ${targetName})
|
||||||
|
ifcopenshell_deploy_qt_runtime(${targetName})
|
||||||
|
|||||||
Reference in New Issue
Block a user