Rewrite dependencies for QtComponents desktop on install
This commit is contained in:
parent
4ef7de7ac5
commit
91cf55816c
1 changed files with 35 additions and 0 deletions
35
telldus-gui/3rdparty/qt-components-desktop.cmake
vendored
35
telldus-gui/3rdparty/qt-components-desktop.cmake
vendored
|
@ -52,6 +52,41 @@ IF (WIN32)
|
||||||
SET_TARGET_PROPERTIES(styleplugin PROPERTIES
|
SET_TARGET_PROPERTIES(styleplugin PROPERTIES
|
||||||
PREFIX "Plugins/declarative/QtDesktop/plugin/"
|
PREFIX "Plugins/declarative/QtDesktop/plugin/"
|
||||||
)
|
)
|
||||||
|
ELSEIF(APPLE)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET styleplugin POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${QT_COMPONENTS_OUTPUT_DIR}/plugin/
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libstyleplugin.dylib
|
||||||
|
${QT_COMPONENTS_OUTPUT_DIR}/plugin/
|
||||||
|
COMMENT "Copy plugin to destination bundle"
|
||||||
|
)
|
||||||
|
INSTALL(CODE "
|
||||||
|
GET_FILENAME_COMPONENT(DESTDIR \"\$ENV{DESTDIR}\" ABSOLUTE)
|
||||||
|
SET(app \"\${DESTDIR}/Applications/TelldusCenter.app\")
|
||||||
|
GET_BUNDLE_AND_EXECUTABLE(\"\${app}\" bundle exe valid)
|
||||||
|
GET_FILENAME_COMPONENT(exedir \"\${exe}\" PATH)
|
||||||
|
SET(plugin \"\${bundle}/Contents/Plugins/declarative/QtDesktop/plugin/libstyleplugin${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
||||||
|
|
||||||
|
GET_ITEM_KEY(\"\${plugin}\" pkey)
|
||||||
|
SET(prereqs \"\")
|
||||||
|
GET_PREREQUISITES(\${plugin} prereqs 1 0 \"\${exe}\" \"\${bundle}/Contents/Frameworks/\")
|
||||||
|
FOREACH(pr \${prereqs})
|
||||||
|
GET_ITEM_KEY(\"\${pr}\" rkey)
|
||||||
|
|
||||||
|
#Check to see if this is ourself
|
||||||
|
IF (NOT \${pkey} STREQUAL \${rkey})
|
||||||
|
SET(kv \"\")
|
||||||
|
SET_BUNDLE_KEY_VALUES(kv \"\${pr}\" \"\${pr}\" \"\${exedir}\" \"\${bundle}/Contents/Frameworks/\" 1)
|
||||||
|
IF (NOT EXISTS \"\${\${kv}_RESOLVED_EMBEDDED_ITEM}\")
|
||||||
|
COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(\"\${\${kv}_RESOLVED_ITEM}\" \"\${\${kv}_RESOLVED_EMBEDDED_ITEM}\")
|
||||||
|
ENDIF ()
|
||||||
|
EXECUTE_PROCESS(COMMAND install_name_tool
|
||||||
|
-change \"\${pr}\" \"\${\${rkey}_EMBEDDED_ITEM}\" \"\${plugin}\"
|
||||||
|
)
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
ENDFOREACH()
|
||||||
|
")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET_TARGET_PROPERTIES(styleplugin PROPERTIES
|
SET_TARGET_PROPERTIES(styleplugin PROPERTIES
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${QT_COMPONENTS_OUTPUT_DIR}/plugin
|
LIBRARY_OUTPUT_DIRECTORY ${QT_COMPONENTS_OUTPUT_DIR}/plugin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue