2015-09-29 00:23:46 +05:30
project ( application )
2015-02-09 06:21:14 +05:30
######## 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 )
2016-02-29 13:38:35 +05:30
set ( MultiMC_VERSION_HOTFIX 12 )
2015-02-09 06:21:14 +05:30
# Build number
set ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
# 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." )
# Channel list URL
set ( MultiMC_CHANLIST_URL "" CACHE STRING "URL for the channel list." )
# Notification URL
set ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2015-10-02 03:42:53 +05:30
# paste.ee API key
set ( MultiMC_PASTE_EE_API_KEY "" CACHE STRING "API key you can get from paste.ee when you register an account" )
2016-11-21 01:10:59 +05:30
# Google analytics ID
set ( MultiMC_ANALYTICS_ID "" CACHE STRING "ID you can get from Google analytics" )
2015-12-28 09:15:49 +05:30
#### Check the current Git commit and branch
include ( GetGitRevisionDescription )
get_git_head_revision ( MultiMC_GIT_REFSPEC MultiMC_GIT_COMMIT )
2016-04-07 02:39:30 +05:30
# Root URL for wonko files
set ( MultiMC_WONKO_ROOT_URL "" CACHE STRING "Root URL for wonko stuff" )
2015-02-10 01:30:45 +05:30
message ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
2015-12-28 09:15:49 +05:30
message ( STATUS "Git refspec: ${MultiMC_GIT_REFSPEC}" )
2015-02-10 01:30:45 +05:30
2015-02-09 06:21:14 +05:30
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 ( )
2015-02-10 01:30:45 +05:30
#### Custom target to just print the version.
2015-12-28 09:15:49 +05:30
add_custom_target ( version echo "Version: ${MultiMC_RELEASE_VERSION_NAME}" )
2015-02-09 06:21:14 +05:30
######## 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 12:47:04 +05:30
set ( MACOSX_BUNDLE_COPYRIGHT "Copyright 2015 MultiMC Contributors" )
2015-02-09 06:21:14 +05:30
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
2016-05-03 21:56:17 +05:30
set ( DIRS ${ QT_LIBS_DIR } ${ QT_LIBEXECS_DIR } ${ CMAKE_LIBRARY_OUTPUT_DIRECTORY } ${ CMAKE_RUNTIME_OUTPUT_DIRECTORY } )
2015-02-09 06:21:14 +05:30
################################ 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
2016-11-18 20:34:08 +05:30
U p d a t e C o n t r o l l e r . c p p
U p d a t e C o n t r o l l e r . h
2015-02-09 06:21:14 +05:30
# 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 12:31:37 +05:30
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-20 05:19:03 +05:30
C o l o r C a c h e . h
C o l o r C a c h e . c p p
2016-04-07 02:39:30 +05:30
W o n k o G u i . h
W o n k o G u i . c p p
2015-02-09 06:21:14 +05:30
# 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
2016-08-06 19:09:29 +05:30
I n s t a n c e W i n d o w . h
I n s t a n c e W i n d o w . c p p
2015-02-09 06:21:14 +05:30
2016-12-01 06:47:27 +05:30
# GUI - setup wizard
s e t u p w i z a r d / S e t u p W i z a r d . h
s e t u p w i z a r d / S e t u p W i z a r d . c p p
2016-10-21 12:37:26 +05:30
# GUI - themes
2016-11-05 20:21:51 +05:30
t h e m e s / F u s i o n T h e m e . c p p
t h e m e s / F u s i o n T h e m e . h
2016-11-01 13:20:23 +05:30
t h e m e s / B r i g h t T h e m e . c p p
t h e m e s / B r i g h t T h e m e . h
2016-11-06 08:59:12 +05:30
t h e m e s / C u s t o m T h e m e . c p p
t h e m e s / C u s t o m T h e m e . h
2016-10-21 12:37:26 +05:30
t h e m e s / D a r k T h e m e . c p p
t h e m e s / D a r k T h e m e . h
2016-11-06 08:59:12 +05:30
t h e m e s / I T h e m e . c p p
2016-10-21 12:37:26 +05:30
t h e m e s / I T h e m e . h
t h e m e s / S y s t e m T h e m e . c p p
t h e m e s / S y s t e m T h e m e . h
2015-07-05 05:59:41 +05:30
# GUI - settings-specific wrappers for paged dialog
S e t t i n g s U I . h
2015-07-05 05:24:30 +05:30
# Processes
2016-08-11 04:14:01 +05:30
L a u n c h C o n t r o l l e r . h
L a u n c h C o n t r o l l e r . c p p
2015-07-05 05:24:30 +05:30
2015-02-09 06:21:14 +05:30
# 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-04 04:50:48 +05:30
# 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 06:21:14 +05:30
# GUI - page dialog pages
p a g e s / B a s e P a g e . h
2015-05-29 05:52:02 +05:30
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 06:21:14 +05:30
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-06 01:30:32 +05:30
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-08-19 04:40:17 +05:30
p a g e s / W o r l d L i s t P a g e . c p p
p a g e s / W o r l d L i s t P a g e . h
2015-02-09 06:21:14 +05:30
# 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
2015-10-02 03:42:53 +05:30
p a g e s / g l o b a l / P a s t e E E P a g e . c p p
p a g e s / g l o b a l / P a s t e E E P a g e . h
2016-04-07 02:39:30 +05:30
p a g e s / g l o b a l / W o n k o P a g e . c p p
p a g e s / g l o b a l / W o n k o P a g e . h
2015-02-09 06:21:14 +05:30
# 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
2016-08-11 04:14:01 +05:30
d i a l o g s / P r o f i l e S e l e c t D i a l o g . c p p
d i a l o g s / P r o f i l e S e l e c t D i a l o g . h
2015-02-09 06:21:14 +05:30
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 07:49:29 +05:30
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 06:21:14 +05:30
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
2016-05-13 02:21:25 +05:30
d i a l o g s / S k i n U p l o a d D i a l o g . c p p
d i a l o g s / S k i n U p l o a d D i a l o g . h
2015-02-09 06:21:14 +05:30
# 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
2016-01-12 09:07:30 +05:30
w i d g e t s / F o c u s L i n e E d i t . c p p
w i d g e t s / F o c u s L i n e E d i t . h
2015-02-09 06:21:14 +05:30
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
2016-08-19 01:01:37 +05:30
w i d g e t s / L o g V i e w . c p p
w i d g e t s / L o g V i e w . h
2015-02-09 06:21:14 +05:30
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 23:08:29 +05:30
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 06:21:14 +05:30
# 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
2016-05-13 02:21:25 +05:30
)
2015-02-09 06:21:14 +05:30
######## 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-06 01:30:32 +05:30
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-08-19 04:40:17 +05:30
p a g e s / W o r l d L i s t P a g e . u i
2015-02-09 06:21:14 +05:30
# 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
2015-10-02 03:42:53 +05:30
p a g e s / g l o b a l / P a s t e E E P a g e . u i
2016-04-07 02:39:30 +05:30
p a g e s / g l o b a l / W o n k o P a g e . u i
2015-02-09 06:21:14 +05:30
# 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
2016-08-11 04:14:01 +05:30
d i a l o g s / P r o f i l e S e l e c t D i a l o g . u i
2015-02-09 06:21:14 +05:30
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 07:49:29 +05:30
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 06:21:14 +05:30
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
2016-05-13 02:21:25 +05:30
d i a l o g s / S k i n U p l o a d D i a l o g . u i
2015-02-09 06:21:14 +05:30
# 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 / v e r s i o n s / v e r s i o n s . q r c
2015-05-20 01:58:51 +05:30
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 06:21:14 +05:30
)
2015-09-29 04:18:33 +05:30
set ( MultiMC_OSX_source
C e r t W o r k a r o u n d . c p p
C e r t W o r k a r o u n d . h
)
if ( APPLE )
list ( APPEND MULTIMC_SOURCES ${ MultiMC_OSX_source } )
endif ( )
2015-02-09 06:21:14 +05:30
######## Windows resource files ########
if ( WIN32 )
set ( MULTIMC_RCS resources/multimc.rc )
endif ( )
# 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 } )
2016-12-28 21:53:48 +05:30
target_link_libraries ( MultiMC MultiMC_gui ${ QUAZIP_LIBRARIES } hoedown MultiMC_rainbow LocalPeer ganalytics )
2015-09-29 00:23:46 +05:30
2015-09-29 05:12:45 +05:30
if ( APPLE )
find_library ( OSX_CORE_FOUNDATION CoreFoundation )
find_library ( OSX_SECURITY Security )
if ( NOT OSX_CORE_FOUNDATION OR NOT OSX_SECURITY )
message ( FATAL_ERROR "OSX framerworks not found: CoreFoundation, Security" )
endif ( )
target_link_libraries ( MultiMC ${ OSX_CORE_FOUNDATION } ${ OSX_SECURITY } )
endif ( )
2015-02-09 06:21:14 +05:30
################################ 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 18:40:19 +05:30
# 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 06:21:14 +05:30
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 )