summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-10-01 03:31:20 -0500
committerAndrew <forkk@forkk.net>2013-10-01 03:31:20 -0500
commit22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043 (patch)
tree126e738cefee995645b016187009ca38ab90157a /CMakeLists.txt
parent751c532175780a8a2c3a6e069f93ad51599e988f (diff)
parentdb3c26f53e12bc396d3d35d9ee2fe62e9ca112ad (diff)
downloadMultiMC-22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043.tar
MultiMC-22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043.tar.gz
MultiMC-22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043.tar.lz
MultiMC-22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043.tar.xz
MultiMC-22bdf67bf74b35f6ee4f68d66a9f0ee9f970c043.zip
Merge branch 'master' into develop
This pulls in some changes I made to the CMakeLists file earlier.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt59
1 files changed, 34 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5e5e1fa..e51bbfe8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -377,9 +377,9 @@ ENDIF()
######## Plugin and library folders ########
-SET(PLUGIN_DEST_DIR bin)
-SET(QTCONF_DEST_DIR bin)
-SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC")
+SET(PLUGIN_DEST_DIR plugins)
+SET(QTCONF_DEST_DIR .)
+SET(APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC")
IF(WIN32)
SET(PLUGIN_DEST_DIR .)
@@ -387,10 +387,14 @@ IF(WIN32)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.exe")
ENDIF()
+IF(UNIX)
IF(APPLE)
SET(PLUGIN_DEST_DIR MultiMC.app/Contents/MacOS)
SET(QTCONF_DEST_DIR MultiMC.app/Contents/Resources)
SET(APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.app")
+ELSE()
+ SET(APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC")
+ENDIF()
ENDIF()
SET(QT_PLUGINS_DIR ${Qt5_DIR}/plugins)
@@ -414,6 +418,7 @@ ENDIF(APPLE)
IF(WIN32)
INSTALL(TARGETS MultiMC
BUNDLE DESTINATION . COMPONENT Runtime
+ LIBRARY DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION . COMPONENT Runtime
)
ENDIF()
@@ -426,7 +431,7 @@ INSTALL(TARGETS MultiMC
ELSE()
INSTALL(TARGETS MultiMC
BUNDLE DESTINATION . COMPONENT Runtime
- RUNTIME DESTINATION . COMPONENT Runtime
+ RUNTIME DESTINATION bin COMPONENT Runtime
)
ENDIF()
ENDIF()
@@ -434,27 +439,31 @@ ENDIF()
#### Plugins ####
-# # Image formats
-# INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime)
-#
-# # Platform plugins
-# INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/platforms" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime)
-#
-# # qtconf
-# INSTALL(CODE "
-# FILE(WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
-# " COMPONENT Runtime)
-#
-#
-# # Dirs to look for dependencies.
-# SET(DIRS "${QT_LIBRARY_DIRS}")
-#
-# INSTALL(CODE "
-# file(GLOB_RECURSE QTPLUGINS
-# \"\${CMAKE_INSTALL_PREFIX}/${PLUGIN_DEST_DIR}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-# include(BundleUtilities)
-# fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
-# " COMPONENT Runtime)
+OPTION(MultiMC_INSTALL_SHARED_LIBS "if set, Qt's shared libraries will be copied to the installation directory on install")
+
+IF (MultiMC_INSTALL_SHARED_LIBS)
+ # Image formats
+ INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime)
+
+ # Platform plugins
+ INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/platforms" DESTINATION ${PLUGIN_DEST_DIR} COMPONENT Runtime)
+
+ # qtconf
+ INSTALL(CODE "
+ FILE(WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
+ " COMPONENT Runtime)
+
+
+ # Dirs to look for dependencies.
+ SET(DIRS "${QT_LIBRARY_DIRS}")
+
+ INSTALL(CODE "
+ file(GLOB_RECURSE QTPLUGINS
+ \"\${CMAKE_INSTALL_PREFIX}/${PLUGIN_DEST_DIR}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+ include(BundleUtilities)
+ fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
+ " COMPONENT Runtime)
+ENDIF()
######## Package ########