diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-01-22 04:28:07 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-01-27 02:00:20 +0100 |
commit | 166e5a03d63e0b522876bfc072f26f213d5a3a62 (patch) | |
tree | 73b9ec9ab09e4a3fcf5c2c0b0ce6568b0b3e0b9b /bundle/CMakeLists.txt | |
parent | 0c2e2094ee96ebe8764dd977bd0b5eb254579dcc (diff) | |
download | PrismLauncher-166e5a03d63e0b522876bfc072f26f213d5a3a62.tar.gz PrismLauncher-166e5a03d63e0b522876bfc072f26f213d5a3a62.tar.bz2 PrismLauncher-166e5a03d63e0b522876bfc072f26f213d5a3a62.zip |
NOISSUE rearrange build system
* Added install commands to the libraries instead of force installing files
* Most of the application cmake stuff moved to top level
* RPATH should now be set/cleared correctly
* Contains a fix for GH-1780
Diffstat (limited to 'bundle/CMakeLists.txt')
-rw-r--r-- | bundle/CMakeLists.txt | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/bundle/CMakeLists.txt b/bundle/CMakeLists.txt new file mode 100644 index 00000000..80760f77 --- /dev/null +++ b/bundle/CMakeLists.txt @@ -0,0 +1,68 @@ +#### 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) |