2015-02-09 00:51:14 +00:00
project ( MultiMC-Application )
######## Set URLs ########
set ( MultiMC_NEWS_RSS_URL "http://multimc.org/rss.xml" CACHE STRING "URL to fetch MultiMC's news RSS feed from." )
######## Set version numbers ########
set ( MultiMC_VERSION_MAJOR 0 )
set ( MultiMC_VERSION_MINOR 4 )
2015-06-01 23:07:26 +00:00
set ( MultiMC_VERSION_HOTFIX 8 )
2015-02-09 00:51:14 +00:00
# Build number
set ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
# Version type
set ( MultiMC_VERSION_TYPE "Custom" CACHE STRING "MultiMC's version type. This should be one of 'Custom', 'Release', 'ReleaseCandidate', or 'Development', depending on what type of version this is." )
# Build platform.
set ( MultiMC_BUILD_PLATFORM "" CACHE STRING "A short string identifying the platform that this build was built for. Only used by the notification system and to display in the about dialog." )
# Version channel
set ( MultiMC_VERSION_CHANNEL "" CACHE STRING "The current build's channel. Included in the version string." )
# Channel list URL
set ( MultiMC_CHANLIST_URL "" CACHE STRING "URL for the channel list." )
# Updater enabled?
set ( MultiMC_UPDATER false CACHE BOOL "Whether or not the update system is enabled. If this is enabled, you must also set MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL in order for it to work properly." )
# Notification URL
set ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2015-02-09 20:00:45 +00:00
#### Check the current Git commit
include ( GitFunctions )
git_run ( COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT )
message ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
2015-02-09 00:51:14 +00:00
set ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}" )
if ( MultiMC_VERSION_HOTFIX GREATER 0 )
set ( MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}" )
endif ( )
# Build a version string to display in the configure logs.
if ( MultiMC_VERSION_TYPE STREQUAL "Custom" )
message ( STATUS "Version Type: Custom" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
elseif ( MultiMC_VERSION_TYPE STREQUAL "Release" )
message ( STATUS "Version Type: Stable Release" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
elseif ( MultiMC_VERSION_TYPE STREQUAL "Development" )
message ( STATUS "Version Type: Development" )
set ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-dev${MultiMC_VERSION_BUILD}" )
else ( )
message ( ERROR "Invalid build type." )
endif ( )
message ( STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}" )
2015-02-09 20:00:45 +00:00
#### Custom target to just print the version.
add_custom_target ( version echo "Version: ${MultiMC_VERSION_STRING}" )
2015-02-09 00:51:14 +00:00
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
if ( MultiMC_UPDATER )
if ( MultiMC_VERSION_CHANNEL STREQUAL "" )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_VERSION_CHANNEL is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
if ( MultiMC_CHANLIST_URL STREQUAL "" )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_CHANLIST_URL is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
if ( MultiMC_VERSION_BUILD LESS 0 )
message ( FATAL_ERROR "Update system is enabled, but MultiMC_VERSION_BUILD is not set.\n"
" P l e a s e e n s u r e t h e C M a k e v a r i a b l e s M u l t i M C _ V E R S I O N _ C H A N N E L , M u l t i M C _ C H A N L I S T _ U R L , a n d M u l t i M C _ V E R S I O N _ B U I L D a r e s e t . " )
endif ( )
message ( STATUS "Updater is enabled. Channel list URL: ${MultiMC_CHANLIST_URL}" )
endif ( )
######## Configure header ########
configure_file ( "${PROJECT_SOURCE_DIR}/BuildConfig.cpp.in" "${PROJECT_BINARY_DIR}/BuildConfig.cpp" )
######## Packaging/install paths setup ########
if ( UNIX AND APPLE )
set ( BINARY_DEST_DIR MultiMC.app/Contents/MacOS )
set ( PLUGIN_DEST_DIR MultiMC.app/Contents/MacOS )
set ( QTCONF_DEST_DIR MultiMC.app/Contents/Resources )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.app" )
set ( MACOSX_BUNDLE_BUNDLE_NAME "MultiMC" )
set ( MACOSX_BUNDLE_INFO_STRING "MultiMC Minecraft launcher and management utility." )
set ( MACOSX_BUNDLE_GUI_IDENTIFIER "org.multimc.MultiMC5" )
set ( MACOSX_BUNDLE_BUNDLE_VERSION "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_SHORT_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_LONG_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_HOTFIX}.${MultiMC_VERSION_BUILD}" )
set ( MACOSX_BUNDLE_ICON_FILE MultiMC.icns )
2015-05-12 07:17:04 +00:00
set ( MACOSX_BUNDLE_COPYRIGHT "Copyright 2015 MultiMC Contributors" )
2015-02-09 00:51:14 +00:00
elseif ( UNIX )
set ( BINARY_DEST_DIR bin )
set ( PLUGIN_DEST_DIR plugins )
set ( QTCONF_DEST_DIR . )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/bin/MultiMC" )
elseif ( WIN32 )
set ( BINARY_DEST_DIR . )
set ( PLUGIN_DEST_DIR . )
set ( QTCONF_DEST_DIR . )
set ( APPS "\${CMAKE_INSTALL_PREFIX}/MultiMC.exe" )
endif ( )
# directories to look for dependencies
set ( DIRS ${ QT_LIBS_DIR } ${ QT_LIBEXECS_DIR } )
################################ FILES ################################
######## Sources and headers ########
SET ( MULTIMC_SOURCES
# Application base
m a i n . c p p
M u l t i M C . h
M u l t i M C . c p p
B u i l d C o n f i g . h
$ { P R O J E C T _ B I N A R Y _ D I R } / B u i l d C o n f i g . c p p
# GUI - general utilities
G u i U t i l . h
G u i U t i l . c p p
C o l u m n R e s i z e r . h
C o l u m n R e s i z e r . c p p
I n s t a n c e P r o x y M o d e l . h
I n s t a n c e P r o x y M o d e l . c p p
2015-04-28 07:01:37 +00:00
V e r s i o n P r o x y M o d e l . h
V e r s i o n P r o x y M o d e l . c p p
2015-08-19 23:49:03 +00:00
C o l o r C a c h e . h
C o l o r C a c h e . c p p
2015-02-09 00:51:14 +00:00
# GUI - windows
M a i n W i n d o w . h
M a i n W i n d o w . c p p
C o n s o l e W i n d o w . h
C o n s o l e W i n d o w . c p p
2015-07-05 00:29:41 +00:00
# GUI - settings-specific wrappers for paged dialog
S e t t i n g s U I . h
S e t t i n g s U I . c p p
2015-07-04 23:54:30 +00:00
# Processes
2015-07-09 22:06:05 +00:00
L a u n c h I n t e r a c t i o n . h
L a u n c h I n t e r a c t i o n . c p p
2015-07-04 23:54:30 +00:00
2015-02-09 00:51:14 +00:00
# page provider for instances
I n s t a n c e P a g e P r o v i d e r . h
I n s t a n c e P a g e P r o v i d e r . c p p
2015-05-03 23:20:48 +00:00
# Common java checking UI
J a v a C o m m o n . h
J a v a C o m m o n . c p p
2015-02-09 00:51:14 +00:00
# GUI - page dialog pages
p a g e s / B a s e P a g e . h
2015-05-29 00:22:02 +00:00
p a g e s / B a s e P a g e C o n t a i n e r . h
2015-02-09 00:51:14 +00:00
p a g e s / V e r s i o n P a g e . c p p
p a g e s / V e r s i o n P a g e . h
p a g e s / T e x t u r e P a c k P a g e . h
p a g e s / R e s o u r c e P a c k P a g e . h
p a g e s / M o d F o l d e r P a g e . c p p
p a g e s / M o d F o l d e r P a g e . h
p a g e s / N o t e s P a g e . c p p
p a g e s / N o t e s P a g e . h
p a g e s / L o g P a g e . c p p
p a g e s / L o g P a g e . h
p a g e s / I n s t a n c e S e t t i n g s P a g e . c p p
p a g e s / I n s t a n c e S e t t i n g s P a g e . h
p a g e s / S c r e e n s h o t s P a g e . c p p
p a g e s / S c r e e n s h o t s P a g e . h
p a g e s / O t h e r L o g s P a g e . c p p
p a g e s / O t h e r L o g s P a g e . h
2015-04-05 20:00:32 +00:00
p a g e s / L e g a c y J a r M o d P a g e . c p p
p a g e s / L e g a c y J a r M o d P a g e . h
p a g e s / L e g a c y U p g r a d e P a g e . c p p
p a g e s / L e g a c y U p g r a d e P a g e . h
2015-02-09 00:51:14 +00:00
# GUI - global settings pages
p a g e s / g l o b a l / A c c o u n t L i s t P a g e . c p p
p a g e s / g l o b a l / A c c o u n t L i s t P a g e . h
p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . c p p
p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . h
p a g e s / g l o b a l / J a v a P a g e . c p p
p a g e s / g l o b a l / J a v a P a g e . h
p a g e s / g l o b a l / M i n e c r a f t P a g e . c p p
p a g e s / g l o b a l / M i n e c r a f t P a g e . h
p a g e s / g l o b a l / M u l t i M C P a g e . c p p
p a g e s / g l o b a l / M u l t i M C P a g e . h
p a g e s / g l o b a l / P r o x y P a g e . c p p
p a g e s / g l o b a l / P r o x y P a g e . h
# GUI - dialogs
d i a l o g s / A b o u t D i a l o g . c p p
d i a l o g s / A b o u t D i a l o g . h
d i a l o g s / A c c o u n t S e l e c t D i a l o g . c p p
d i a l o g s / A c c o u n t S e l e c t D i a l o g . h
d i a l o g s / C o p y I n s t a n c e D i a l o g . c p p
d i a l o g s / C o p y I n s t a n c e D i a l o g . h
d i a l o g s / C u s t o m M e s s a g e B o x . c p p
d i a l o g s / C u s t o m M e s s a g e B o x . h
d i a l o g s / E d i t A c c o u n t D i a l o g . c p p
d i a l o g s / E d i t A c c o u n t D i a l o g . h
2015-04-19 02:19:29 +00:00
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . c p p
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . h
2015-02-09 00:51:14 +00:00
d i a l o g s / I c o n P i c k e r D i a l o g . c p p
d i a l o g s / I c o n P i c k e r D i a l o g . h
d i a l o g s / L o g i n D i a l o g . c p p
d i a l o g s / L o g i n D i a l o g . h
d i a l o g s / M o d E d i t D i a l o g C o m m o n . c p p
d i a l o g s / M o d E d i t D i a l o g C o m m o n . h
d i a l o g s / N e w I n s t a n c e D i a l o g . c p p
d i a l o g s / N e w I n s t a n c e D i a l o g . h
d i a l o g s / N o t i f i c a t i o n D i a l o g . c p p
d i a l o g s / N o t i f i c a t i o n D i a l o g . h
p a g e d i a l o g / P a g e D i a l o g . c p p
p a g e d i a l o g / P a g e D i a l o g . h
d i a l o g s / P r o g r e s s D i a l o g . c p p
d i a l o g s / P r o g r e s s D i a l o g . h
d i a l o g s / U p d a t e D i a l o g . c p p
d i a l o g s / U p d a t e D i a l o g . h
d i a l o g s / V e r s i o n S e l e c t D i a l o g . c p p
d i a l o g s / V e r s i o n S e l e c t D i a l o g . h
# GUI - widgets
w i d g e t s / C o m m o n . c p p
w i d g e t s / C o m m o n . h
w i d g e t s / I c o n L a b e l . c p p
w i d g e t s / I c o n L a b e l . h
w i d g e t s / L a b e l e d T o o l B u t t o n . c p p
w i d g e t s / L a b e l e d T o o l B u t t o n . h
w i d g e t s / L i n e S e p a r a t o r . c p p
w i d g e t s / L i n e S e p a r a t o r . h
w i d g e t s / M C M o d I n f o F r a m e . c p p
w i d g e t s / M C M o d I n f o F r a m e . h
w i d g e t s / M o d L i s t V i e w . c p p
w i d g e t s / M o d L i s t V i e w . h
w i d g e t s / P a g e C o n t a i n e r . c p p
w i d g e t s / P a g e C o n t a i n e r . h
w i d g e t s / P a g e C o n t a i n e r _ p . h
w i d g e t s / S e r v e r S t a t u s . c p p
w i d g e t s / S e r v e r S t a t u s . h
w i d g e t s / V e r s i o n L i s t V i e w . c p p
w i d g e t s / V e r s i o n L i s t V i e w . h
2015-05-28 17:38:29 +00:00
w i d g e t s / P r o g r e s s W i d g e t . h
w i d g e t s / P r o g r e s s W i d g e t . c p p
2015-02-09 00:51:14 +00:00
# GUI - instance group view
g r o u p v i e w / G r o u p e d P r o x y M o d e l . c p p
g r o u p v i e w / G r o u p e d P r o x y M o d e l . h
g r o u p v i e w / G r o u p V i e w . c p p
g r o u p v i e w / G r o u p V i e w . h
g r o u p v i e w / I n s t a n c e D e l e g a t e . c p p
g r o u p v i e w / I n s t a n c e D e l e g a t e . h
g r o u p v i e w / V i s u a l G r o u p . c p p
g r o u p v i e w / V i s u a l G r o u p . h
)
######## UIs ########
SET ( MULTIMC_UIS
# Option pages
p a g e s / V e r s i o n P a g e . u i
p a g e s / M o d F o l d e r P a g e . u i
p a g e s / L o g P a g e . u i
p a g e s / I n s t a n c e S e t t i n g s P a g e . u i
p a g e s / N o t e s P a g e . u i
p a g e s / S c r e e n s h o t s P a g e . u i
p a g e s / O t h e r L o g s P a g e . u i
2015-04-05 20:00:32 +00:00
p a g e s / L e g a c y J a r M o d P a g e . u i
p a g e s / L e g a c y U p g r a d e P a g e . u i
2015-02-09 00:51:14 +00:00
# Global settings pages
p a g e s / g l o b a l / A c c o u n t L i s t P a g e . u i
p a g e s / g l o b a l / E x t e r n a l T o o l s P a g e . u i
p a g e s / g l o b a l / J a v a P a g e . u i
p a g e s / g l o b a l / M i n e c r a f t P a g e . u i
p a g e s / g l o b a l / M u l t i M C P a g e . u i
p a g e s / g l o b a l / P r o x y P a g e . u i
# Dialogs
d i a l o g s / C o p y I n s t a n c e D i a l o g . u i
d i a l o g s / N e w I n s t a n c e D i a l o g . u i
d i a l o g s / A b o u t D i a l o g . u i
d i a l o g s / V e r s i o n S e l e c t D i a l o g . u i
d i a l o g s / P r o g r e s s D i a l o g . u i
d i a l o g s / I c o n P i c k e r D i a l o g . u i
d i a l o g s / A c c o u n t S e l e c t D i a l o g . u i
d i a l o g s / E d i t A c c o u n t D i a l o g . u i
2015-04-19 02:19:29 +00:00
d i a l o g s / E x p o r t I n s t a n c e D i a l o g . u i
2015-02-09 00:51:14 +00:00
d i a l o g s / L o g i n D i a l o g . u i
d i a l o g s / U p d a t e D i a l o g . u i
d i a l o g s / N o t i f i c a t i o n D i a l o g . u i
# Widgets/other
w i d g e t s / M C M o d I n f o F r a m e . u i
)
set ( MULTIMC_QRCS
r e s o u r c e s / b a c k g r o u n d s / b a c k g r o u n d s . q r c
r e s o u r c e s / m u l t i m c / m u l t i m c . q r c
r e s o u r c e s / p e _ d a r k / p e _ d a r k . q r c
r e s o u r c e s / p e _ l i g h t / p e _ l i g h t . q r c
r e s o u r c e s / p e _ c o l o r e d / p e _ c o l o r e d . q r c
r e s o u r c e s / p e _ b l u e / p e _ b l u e . q r c
r e s o u r c e s / O S X / O S X . q r c
r e s o u r c e s / i O S / i O S . q r c
r e s o u r c e s / i n s t a n c e s / i n s t a n c e s . q r c
r e s o u r c e s / v e r s i o n s / v e r s i o n s . q r c
2015-05-19 20:28:51 +00:00
r e s o u r c e s / c e r t s / c e r t s . q r c
2015-02-09 00:51:14 +00:00
)
######## Windows resource files ########
if ( WIN32 )
set ( MULTIMC_RCS resources/multimc.rc )
endif ( )
####### X11 Stuff #######
if ( UNIX AND NOT APPLE )
find_package ( Qt5X11Extras REQUIRED )
set ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } xcb Qt5::X11Extras )
list ( APPEND MULTIMC_SOURCES Platform_X11.cpp )
else ( )
list ( APPEND MULTIMC_SOURCES Platform_Other.cpp )
endif ( )
# Link additional libraries
if ( WIN32 )
set ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } Qt5::WinMain )
endif ( WIN32 )
include_directories ( ../logic )
# Qt 5 stuff
qt5_wrap_ui ( MULTIMC_UI ${ MULTIMC_UIS } )
qt5_add_resources ( MULTIMC_RESOURCES ${ MULTIMC_QRCS } )
# Add executable
add_executable ( MultiMC MACOSX_BUNDLE WIN32 ${ MULTIMC_SOURCES } ${ MULTIMC_UI } ${ MULTIMC_RESOURCES } ${ MULTIMC_RCS } )
target_link_libraries ( MultiMC MultiMC_logic xz-embedded unpack200 iconfix libUtil LogicalGui
2015-05-01 23:14:35 +00:00
$ { Q U A Z I P _ L I B R A R I E S } Q t 5 : : C o r e Q t 5 : : X m l Q t 5 : : W i d g e t s Q t 5 : : N e t w o r k Q t 5 : : C o n c u r r e n t
2015-08-19 00:06:32 +00:00
h o e d o w n r a i n b o w
$ { M u l t i M C _ L I N K _ A D D I T I O N A L _ L I B S } )
2015-02-09 00:51:14 +00:00
################################ INSTALLATION AND PACKAGING ################################
######## Install ########
#### Executable ####
if ( APPLE AND UNIX ) ## OSX
install ( TARGETS MultiMC
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N M u l t i M C . a p p / C o n t e n t s / M a c O S C O M P O N E N T R u n t i m e
)
elseif ( UNIX ) ## LINUX and similar
install ( TARGETS MultiMC
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N b i n C O M P O N E N T R u n t i m e
)
install ( PROGRAMS package/linux/MultiMC DESTINATION . )
elseif ( WIN32 ) ## WINDOWS
install ( TARGETS MultiMC
B U N D L E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
L I B R A R Y D E S T I N A T I O N . C O M P O N E N T R u n t i m e
R U N T I M E D E S T I N A T I O N . C O M P O N E N T R u n t i m e
)
endif ( )
#### Java bits ####
install_jar ( JavaCheck "${BINARY_DEST_DIR}/jars" )
install_jar ( NewLaunch "${BINARY_DEST_DIR}/jars" )
#### Dist package logic ####
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
# Image formats
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i m a g e f o r m a t s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " t g a | t i f f | m n g " E X C L U D E
)
# Icon engines
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i c o n e n g i n e s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " f o n t a w e s o m e " E X C L U D E
)
# Platform plugins
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / p l a t f o r m s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " m i n i m a l | l i n u x f b | o f f s c r e e n " E X C L U D E
)
else ( )
# Image formats
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i m a g e f o r m a t s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " t g a | t i f f | m n g " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
)
# Icon engines
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / i c o n e n g i n e s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " f o n t a w e s o m e " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
)
# Platform plugins
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / p l a t f o r m s "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " m i n i m a l | l i n u x f b | o f f s c r e e n " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
)
if ( APPLE )
2015-06-06 13:10:19 +00:00
# Accessible plugin to make buttons look decent on osx
if ( "${Qt5Core_VERSION_STRING}" VERSION_LESS "5.4.0" )
message ( STATUS "Packaging the Qt accessible plugins because we're on Qt ${Qt5Core_VERSION_STRING}" )
install (
D I R E C T O R Y " $ { Q T _ P L U G I N S _ D I R } / a c c e s s i b l e "
D E S T I N A T I O N $ { P L U G I N _ D E S T _ D I R }
C O M P O N E N T R u n t i m e
R E G E X " q u i c k " E X C L U D E
R E G E X " d \ \ . " E X C L U D E
R E G E X " _ d e b u g \ \ . " E X C L U D E
)
endif ( )
2015-02-09 00:51:14 +00:00
endif ( )
endif ( )
# qtconf
install (
C O D E "
file ( WRITE \"\${CMAKE_INSTALL_PREFIX}/${QTCONF_DEST_DIR}/qt.conf\" \"\")
"
C O M P O N E N T R u n t i m e
)
# ICNS file for OS X
if ( APPLE )
install ( FILES resources/MultiMC.icns DESTINATION MultiMC.app/Contents/Resources )
endif ( )
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / i n s t a l l _ p r e r e q s . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / i n s t a l l _ p r e r e q s . c m a k e "
@ O N L Y
)
install ( SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install_prereqs.cmake" COMPONENT Runtime )
######## Package ########
# Package with CPack
if ( UNIX )
if ( APPLE )
set ( CPACK_GENERATOR "ZIP" )
else ( )
set ( CPACK_GENERATOR "TGZ" )
endif ( )
elseif ( WIN32 )
set ( CPACK_GENERATOR "ZIP" )
endif ( )
set ( CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0 )
set ( CPACK_PACKAGE_NAME "MultiMC 5" )
set ( CPACK_PACKAGE_VENDOR "" )
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "MultiMC - Minecraft launcher and management tool." )
set ( CPACK_PACKAGE_VERSION "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
set ( CPACK_PACKAGE_VERSION_MAJOR ${ MultiMC_VERSION_MAJOR } )
set ( CPACK_PACKAGE_VERSION_MINOR ${ MultiMC_VERSION_MINOR } )
set ( CPACK_PACKAGE_VERSION_PATCH ${ MultiMC_VERSION_REV } )
set ( CPACK_PACKAGE_FILE_NAME "MultiMC" )
include ( CPack )