69 lines
1.7 KiB
CMake
69 lines
1.7 KiB
CMake
|
#### The MultiMC bundle mess! ####
|
||
|
|
||
|
# Add qt.conf - this makes Qt stop looking for things outside the bundle
|
||
|
install(
|
||
|
CODE "file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${RESOURCES_DEST_DIR}/qt.conf\" \" \")"
|
||
|
COMPONENT Runtime
|
||
|
)
|
||
|
# Bundle plugins
|
||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||
|
# Image formats
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "tga|tiff|mng|webp" EXCLUDE
|
||
|
)
|
||
|
# Icon engines
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/iconengines"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "fontawesome" EXCLUDE
|
||
|
)
|
||
|
# Platform plugins
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/platforms"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "minimal|linuxfb|offscreen" EXCLUDE
|
||
|
)
|
||
|
else()
|
||
|
# Image formats
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "tga|tiff|mng|webp" EXCLUDE
|
||
|
REGEX "d\\." EXCLUDE
|
||
|
REGEX "_debug\\." EXCLUDE
|
||
|
REGEX "\\.dSYM" EXCLUDE
|
||
|
)
|
||
|
# Icon engines
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/iconengines"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "fontawesome" EXCLUDE
|
||
|
REGEX "d\\." EXCLUDE
|
||
|
REGEX "_debug\\." EXCLUDE
|
||
|
REGEX "\\.dSYM" EXCLUDE
|
||
|
)
|
||
|
# Platform plugins
|
||
|
install(
|
||
|
DIRECTORY "${QT_PLUGINS_DIR}/platforms"
|
||
|
DESTINATION ${PLUGIN_DEST_DIR}
|
||
|
COMPONENT Runtime
|
||
|
REGEX "minimal|linuxfb|offscreen" EXCLUDE
|
||
|
REGEX "d\\." EXCLUDE
|
||
|
REGEX "_debug\\." EXCLUDE
|
||
|
REGEX "\\.dSYM" EXCLUDE
|
||
|
)
|
||
|
endif()
|
||
|
configure_file(
|
||
|
"${CMAKE_CURRENT_SOURCE_DIR}/install_prereqs.cmake.in"
|
||
|
"${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake"
|
||
|
@ONLY
|
||
|
)
|
||
|
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake" COMPONENT Runtime)
|