2013-01-11 06:55:40 +05:30
cmake_minimum_required ( VERSION 2.8.9 )
2013-09-26 17:19:58 +05:30
2013-10-06 05:39:21 +05:30
IF ( WIN32 )
# In Qt 5.1+ we have our own main() function, don't autolink to qtmain on Windows
cmake_policy ( SET CMP0020 OLD )
ENDIF ( )
2013-09-26 17:19:58 +05:30
2013-02-05 23:39:20 +05:30
project ( MultiMC )
2013-12-14 18:47:59 +05:30
enable_testing ( )
2013-01-11 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
######## Set CMake options ########
SET ( CMAKE_AUTOMOC ON )
SET ( CMAKE_INCLUDE_CURRENT_DIR ON )
2013-09-08 23:48:55 +05:30
SET ( FILES_TO_TRANSLATE )
2013-01-11 06:55:40 +05:30
2013-11-24 11:06:16 +05:30
######## Set module path ########
SET ( CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/" )
SET ( MMC_SRC "${PROJECT_SOURCE_DIR}" )
SET ( MMC_BIN "${PROJECT_BINARY_DIR}" )
2013-02-21 22:02:13 +05:30
# Output all executables and shared libs in the main build folder, not in subfolders.
2013-02-21 06:40:09 +05:30
SET ( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
2013-01-11 06:55:40 +05:30
2013-02-22 02:22:23 +05:30
IF ( UNIX )
SET ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } )
ENDIF ( )
2013-02-22 00:05:33 +05:30
######## Set compiler flags ########
IF ( APPLE )
message ( STATUS "Using APPLE CMAKE_CXX_FLAGS" )
2013-12-01 21:04:51 +05:30
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
2013-02-22 00:05:33 +05:30
ELSEIF ( UNIX )
# assume GCC, add C++0x/C++11 stuff
MESSAGE ( STATUS "Using UNIX CMAKE_CXX_FLAGS" )
2013-12-01 21:04:51 +05:30
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall" )
2013-02-22 00:05:33 +05:30
ELSEIF ( MINGW )
MESSAGE ( STATUS "Using MINGW CMAKE_CXX_FLAGS" )
2013-12-01 21:04:51 +05:30
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall" )
2013-02-22 00:05:33 +05:30
ENDIF ( )
2013-02-21 22:02:13 +05:30
2014-01-08 05:57:40 +05:30
################################ 3rd Party Libs ################################
2013-02-21 22:02:13 +05:30
# Find the required Qt parts
2013-12-17 06:39:58 +05:30
find_package ( Qt5Core REQUIRED )
2013-02-20 20:02:26 +05:30
find_package ( Qt5Widgets REQUIRED )
find_package ( Qt5Network REQUIRED )
2013-12-17 06:39:58 +05:30
find_package ( Qt5Test REQUIRED )
2014-01-01 23:51:58 +05:30
find_package ( Qt5Concurrent REQUIRED )
2013-09-08 23:48:55 +05:30
find_package ( Qt5LinguistTools REQUIRED )
2013-01-11 06:55:40 +05:30
2013-12-17 06:39:58 +05:30
include_directories (
$ { Q t 5 C o r e _ I N C L U D E _ D I R S }
$ { Q t 5 W i d g e t s _ I N C L U D E _ D I R S }
2014-01-01 23:51:58 +05:30
$ { Q t 5 C o n c u r r e n t _ I N C L U D E _ D I R S }
2013-12-17 06:39:58 +05:30
$ { Q t 5 N e t w o r k _ I N C L U D E _ D I R S }
$ { Q t 5 T e s t _ I N C L U D E _ D I R S }
)
2013-01-11 06:55:40 +05:30
2013-12-01 21:04:51 +05:30
# The Qt5 cmake files don't provide its install paths, so ask qmake.
get_target_property ( QMAKE_EXECUTABLE Qt5::qmake LOCATION )
function ( QUERY_QMAKE VAR RESULT )
exec_program ( ${ QMAKE_EXECUTABLE } ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
if ( NOT return_code )
file ( TO_CMAKE_PATH "${output}" output )
set ( ${ RESULT } ${ output } PARENT_SCOPE )
endif ( NOT return_code )
endfunction ( QUERY_QMAKE )
query_qmake ( QT_INSTALL_PLUGINS QT_PLUGINS_DIR )
query_qmake ( QT_INSTALL_IMPORTS QT_IMPORTS_DIR )
query_qmake ( QT_INSTALL_LIBS QT_LIBS_DIR )
query_qmake ( QT_HOST_DATA QT_DATA_DIR )
set ( QT_MKSPECS_DIR ${ QT_DATA_DIR } /mkspecs )
2013-02-21 22:02:13 +05:30
################################ SET UP BUILD OPTIONS ################################
######## Check endianness ########
INCLUDE ( TestBigEndian )
TEST_BIG_ENDIAN ( BIGENDIAN )
IF ( ${ BIGENDIAN } )
2013-03-20 05:45:19 +05:30
ADD_DEFINITIONS ( -DMULTIMC_BIG_ENDIAN )
2013-02-21 22:02:13 +05:30
ENDIF ( ${ BIGENDIAN } )
2013-12-16 02:18:58 +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." )
2013-02-21 22:02:13 +05:30
######## Set version numbers ########
2014-01-05 09:14:18 +05:30
SET ( MultiMC_VERSION_MAJOR 0 )
2014-01-08 06:51:42 +05:30
SET ( MultiMC_VERSION_MINOR 1 )
2014-01-09 10:20:08 +05:30
SET ( MultiMC_VERSION_HOTFIX 1 )
2013-01-11 06:55:40 +05:30
2013-10-02 03:31:41 +05:30
# Build number
2013-12-02 01:57:36 +05:30
SET ( MultiMC_VERSION_BUILD -1 CACHE STRING "Build number. -1 for no build number." )
2014-01-08 05:39:05 +05:30
# 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." )
2013-12-02 01:57:36 +05:30
2013-12-05 00:04:12 +05:30
# 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." )
2013-12-02 01:57:36 +05:30
2013-12-05 00:04:12 +05:30
# 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." )
2013-12-02 01:57:36 +05:30
2014-01-03 23:49:27 +05:30
# Notification URL
SET ( MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications." )
2013-12-05 00:04:12 +05:30
2014-01-08 05:39:05 +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 ( )
2013-12-05 00:04:12 +05:30
# Build a version string to display in the configure logs.
2014-01-08 07:00:08 +05:30
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" )
2014-01-08 05:39:05 +05:30
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}" )
ELSEIF ( MultiMC_VERSION_TYPE STREQUAL "ReleaseCandidate" )
2014-01-08 07:00:08 +05:30
MESSAGE ( STATUS "Version Type: Release Candidate" )
2014-01-08 05:39:05 +05:30
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-rc${MultiMC_VERSION_BUILD}" )
ELSEIF ( MultiMC_VERSION_TYPE STREQUAL "Development" )
2014-01-08 07:00:08 +05:30
MESSAGE ( STATUS "Version Type: Development" )
2014-01-08 05:39:05 +05:30
SET ( MultiMC_VERSION_STRING "${MultiMC_RELEASE_VERSION_NAME}-dev${MultiMC_VERSION_BUILD}" )
ELSE ( )
MESSAGE ( ERROR "Invalid build type." )
2013-12-02 01:57:36 +05:30
ENDIF ( )
2014-01-08 07:00:08 +05:30
MESSAGE ( STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}" )
2013-02-21 22:02:13 +05:30
2013-12-05 00:04:12 +05:30
# 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 ( )
2013-12-02 05:25:24 +05:30
#### Custom target to just print the version.
2013-12-02 01:57:36 +05:30
ADD_CUSTOM_TARGET ( version echo "Version: ${MultiMC_VERSION_STRING}" )
2013-10-02 03:31:41 +05:30
2013-12-02 05:25:24 +05:30
#### Check the current Git commit
2013-02-21 22:32:48 +05:30
execute_process ( COMMAND git rev-parse HEAD
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ S O U R C E _ D I R }
R E S U L T _ V A R I A B L E G I T _ C O M M I T _ C H E C K _ R E S U L T V A R
O U T P U T _ V A R I A B L E G I T _ C O M M I T _ C H E C K _ O U T V A R
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
IF ( GIT_COMMIT_CHECK_RESULTVAR EQUAL 0 )
SET ( MultiMC_GIT_COMMIT "${GIT_COMMIT_CHECK_OUTVAR}" )
MESSAGE ( STATUS "Git commit: ${MultiMC_GIT_COMMIT}" )
ELSE ( )
SET ( MultiMC_GIT_COMMIT "Unknown" )
MESSAGE ( STATUS "Failed to check Git commit. ${GIT_COMMIT_CHECK_RESULTVAR}" )
ENDIF ( )
2013-02-21 22:02:13 +05:30
######## Configure header ########
2013-12-02 05:25:24 +05:30
configure_file ( "${PROJECT_SOURCE_DIR}/config.h.in" "${PROJECT_BINARY_DIR}/include/config.h" )
2013-01-11 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
2013-04-01 22:34:40 +05:30
######## Other Stuff ########
ADD_DEFINITIONS ( -DQUAZIP_STATIC )
2013-08-26 06:23:29 +05:30
ADD_DEFINITIONS ( -DLIBSETTINGS_STATIC )
ADD_DEFINITIONS ( -DLIBUTIL_STATIC )
ADD_DEFINITIONS ( -DLIBGROUPVIEW_STATIC )
2013-04-01 22:34:40 +05:30
2014-01-08 05:57:40 +05:30
######## 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_REV}.${MultiMC_VERSION_BUILD}" )
SET ( MACOSX_BUNDLE_SHORT_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
SET ( MACOSX_BUNDLE_LONG_VERSION_STRING "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}.${MultiMC_VERSION_REV}.${MultiMC_VERSION_BUILD}" )
SET ( MACOSX_BUNDLE_ICON_FILE MultiMC.icns )
SET ( MACOSX_BUNDLE_COPYRIGHT "Copyright 2013 MultiMC Contributors" )
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}" )
################################ Included Libs ################################
# Add quazip
add_subdirectory ( depends/quazip )
include_directories ( depends/quazip )
# Add the java launcher and checker
add_subdirectory ( depends/launcher )
add_subdirectory ( depends/javacheck )
# Add xz decompression
add_subdirectory ( depends/xz-embedded )
include_directories ( ${ XZ_INCLUDE_DIR } )
# Add pack200 decompression
add_subdirectory ( depends/pack200 )
include_directories ( ${ PACK200_INCLUDE_DIR } )
######## MultiMC Libs ########
# Add the util library.
add_subdirectory ( depends/util )
include_directories ( ${ LIBUTIL_INCLUDE_DIR } )
# Add the settings library.
add_subdirectory ( depends/settings )
include_directories ( ${ LIBSETTINGS_INCLUDE_DIR } )
# Add the group view library.
add_subdirectory ( depends/groupview )
include_directories ( ${ LIBGROUPVIEW_INCLUDE_DIR } )
# Add the updater
add_subdirectory ( mmc_updater )
2013-02-21 22:02:13 +05:30
################################ FILES ################################
2013-09-22 07:51:36 +05:30
######## Sources and headers ########
SET ( MULTIMC_SOURCES
# Application base
2013-09-07 07:30:58 +05:30
M u l t i M C . h
2013-09-22 07:51:36 +05:30
M u l t i M C . c p p
2013-09-07 07:30:58 +05:30
M u l t i M C V e r s i o n . h
2013-07-29 04:29:35 +05:30
2013-10-06 04:43:40 +05:30
# Logging
l o g g e r / Q s D e b u g O u t p u t . c p p
l o g g e r / Q s D e b u g O u t p u t . h
l o g g e r / Q s L o g . c p p
l o g g e r / Q s L o g . h
l o g g e r / Q s L o g D e s t . c p p
l o g g e r / Q s L o g D e s t . h
2013-11-04 07:23:05 +05:30
# GUI - windows
g u i / M a i n W i n d o w . h
g u i / M a i n W i n d o w . c p p
g u i / C o n s o l e W i n d o w . h
g u i / C o n s o l e W i n d o w . c p p
# GUI - dialogs
g u i / d i a l o g s / S e t t i n g s D i a l o g . h
g u i / d i a l o g s / S e t t i n g s D i a l o g . c p p
g u i / 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
g u i / 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
g u i / d i a l o g s / d i a l o g s /
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 . c p p
g u i / d i a l o g s / P r o g r e s s D i a l o g . h
g u i / d i a l o g s / P r o g r e s s D i a l o g . c p p
g u i / d i a l o g s / A b o u t D i a l o g . h
g u i / d i a l o g s / A b o u t D i a l o g . c p p
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 . h
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 . c p p
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . h
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . c p p
g u i / d i a l o g s / I n s t a n c e S e t t i n g s . h
g u i / d i a l o g s / I n s t a n c e S e t t i n g s . c p p
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 . h
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 . c p p
g u i / d i a l o g s / L e g a c y M o d E d i t D i a l o g . h
g u i / d i a l o g s / L e g a c y M o d E d i t D i a l o g . c p p
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . h
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . c p p
g u i / 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
g u i / 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
g u i / d i a l o g s / E d i t N o t e s D i a l o g . h
g u i / d i a l o g s / E d i t N o t e s D i a l o g . c p p
g u i / d i a l o g s / C u s t o m M e s s a g e B o x . h
g u i / 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
2013-11-29 09:10:40 +05:30
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 . h
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 . c p p
2013-11-18 23:35:35 +05:30
g u i / d i a l o g s / A c c o u n t L i s t D i a l o g . h
g u i / d i a l o g s / A c c o u n t L i s t D i a l o g . c p p
2013-11-28 03:44:18 +05:30
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 . h
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 . c p p
2013-12-02 05:25:24 +05:30
g u i / d i a l o g s / U p d a t e D i a l o g . h
g u i / d i a l o g s / U p d a t e D i a l o g . c p p
2013-11-04 07:23:05 +05:30
# GUI - widgets
g u i / w i d g e t s / I n s t a n c e D e l e g a t e . h
g u i / w i d g e t s / I n s t a n c e D e l e g a t e . c p p
g u i / w i d g e t s / M o d L i s t V i e w . h
g u i / w i d g e t s / M o d L i s t V i e w . c p p
g u i / 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
g u i / 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
g u i / w i d g e t s / M C M o d I n f o F r a m e . h
g u i / w i d g e t s / M C M o d I n f o F r a m e . c p p
2013-08-17 17:10:51 +05:30
# Base classes and infrastructure
2013-09-16 04:24:39 +05:30
l o g i c / B a s e V e r s i o n . h
2013-08-17 17:10:51 +05:30
l o g i c / M i n e c r a f t V e r s i o n . h
l o g i c / I n s t a n c e F a c t o r y . h
2013-09-22 07:51:36 +05:30
l o g i c / I n s t a n c e F a c t o r y . c p p
2013-08-17 17:10:51 +05:30
l o g i c / B a s e I n s t a n c e . h
2013-09-22 07:51:36 +05:30
l o g i c / B a s e I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
l o g i c / B a s e I n s t a n c e _ p . h
2013-09-22 07:51:36 +05:30
2013-08-17 17:10:51 +05:30
l o g i c / M i n e c r a f t P r o c e s s . h
2013-09-22 07:51:36 +05:30
l o g i c / M i n e c r a f t P r o c e s s . c p p
2013-08-17 17:10:51 +05:30
l o g i c / M o d . h
2013-09-22 07:51:36 +05:30
l o g i c / M o d . c p p
2013-08-17 17:10:51 +05:30
l o g i c / M o d L i s t . h
2013-09-22 07:51:36 +05:30
l o g i c / M o d L i s t . c p p
2013-08-17 17:10:51 +05:30
2013-09-07 07:30:58 +05:30
# Basic instance launcher for starting from terminal
l o g i c / I n s t a n c e L a u n c h e r . h
2013-09-22 07:51:36 +05:30
l o g i c / I n s t a n c e L a u n c h e r . c p p
2013-09-07 07:30:58 +05:30
2013-08-17 17:10:51 +05:30
# network stuffs
2013-10-26 23:25:48 +05:30
l o g i c / n e t / N e t A c t i o n . h
2013-12-10 11:42:52 +05:30
l o g i c / n e t / M D 5 E t a g D o w n l o a d . h
l o g i c / n e t / M D 5 E t a g D o w n l o a d . c p p
2013-09-08 05:45:20 +05:30
l o g i c / n e t / B y t e A r r a y D o w n l o a d . h
2013-09-22 07:51:36 +05:30
l o g i c / n e t / B y t e A r r a y D o w n l o a d . c p p
2013-09-08 05:45:20 +05:30
l o g i c / n e t / C a c h e D o w n l o a d . h
2013-09-22 07:51:36 +05:30
l o g i c / n e t / C a c h e D o w n l o a d . c p p
2013-11-17 16:14:18 +05:30
l o g i c / n e t / F o r g e M i r r o r s . h
l o g i c / n e t / F o r g e M i r r o r s . c p p
2013-09-30 06:04:46 +05:30
l o g i c / n e t / F o r g e X z D o w n l o a d . h
l o g i c / n e t / F o r g e X z D o w n l o a d . c p p
2013-10-26 23:25:48 +05:30
l o g i c / n e t / N e t J o b . h
l o g i c / n e t / N e t J o b . c p p
2013-09-07 01:28:51 +05:30
l o g i c / n e t / H t t p M e t a C a c h e . h
2013-09-22 07:51:36 +05:30
l o g i c / n e t / H t t p M e t a C a c h e . c p p
2013-12-07 04:07:12 +05:30
l o g i c / n e t / P a s t e U p l o a d . h
l o g i c / n e t / P a s t e U p l o a d . c p p
2013-12-13 20:28:11 +05:30
l o g i c / n e t / U R L C o n s t a n t s . h
2013-10-26 23:25:48 +05:30
2013-11-12 00:29:59 +05:30
# Yggdrasil login stuff
2013-12-13 07:17:59 +05:30
l o g i c / a u t h / M o j a n g A c c o u n t L i s t . h
l o g i c / a u t h / M o j a n g A c c o u n t L i s t . c p p
2013-11-12 00:29:59 +05:30
l o g i c / a u t h / M o j a n g A c c o u n t . h
l o g i c / a u t h / M o j a n g A c c o u n t . c p p
2013-11-14 00:08:28 +05:30
l o g i c / a u t h / Y g g d r a s i l T a s k . h
l o g i c / a u t h / Y g g d r a s i l T a s k . c p p
2013-12-01 06:30:42 +05:30
l o g i c / a u t h / f l o w s / A u t h e n t i c a t e T a s k . h
l o g i c / a u t h / f l o w s / A u t h e n t i c a t e T a s k . c p p
l o g i c / a u t h / f l o w s / R e f r e s h T a s k . c p p
l o g i c / a u t h / f l o w s / R e f r e s h T a s k . c p p
l o g i c / a u t h / f l o w s / V a l i d a t e T a s k . h
l o g i c / a u t h / f l o w s / V a l i d a t e T a s k . c p p
2013-08-17 17:10:51 +05:30
2013-12-05 00:04:12 +05:30
# Update system
l o g i c / u p d a t e r / U p d a t e C h e c k e r . h
l o g i c / u p d a t e r / U p d a t e C h e c k e r . c p p
2013-12-06 01:22:55 +05:30
l o g i c / u p d a t e r / D o w n l o a d U p d a t e T a s k . h
l o g i c / u p d a t e r / D o w n l o a d U p d a t e T a s k . c p p
2014-01-03 23:49:27 +05:30
l o g i c / u p d a t e r / N o t i f i c a t i o n C h e c k e r . h
l o g i c / u p d a t e r / N o t i f i c a t i o n C h e c k e r . c p p
2013-12-05 00:04:12 +05:30
2013-12-16 02:18:58 +05:30
# News System
l o g i c / n e w s / N e w s C h e c k e r . h
l o g i c / n e w s / N e w s C h e c k e r . c p p
l o g i c / n e w s / N e w s E n t r y . h
l o g i c / n e w s / N e w s E n t r y . c p p
2013-08-17 17:10:51 +05:30
# legacy instances
l o g i c / L e g a c y I n s t a n c e . h
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
l o g i c / L e g a c y I n s t a n c e _ p . h
l o g i c / L e g a c y U p d a t e . h
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y U p d a t e . c p p
2013-08-17 17:10:51 +05:30
l o g i c / L e g a c y F o r g e . h
2013-09-22 07:51:36 +05:30
l o g i c / L e g a c y F o r g e . c p p
2013-08-17 17:10:51 +05:30
# 1.6 instances
l o g i c / O n e S i x I n s t a n c e . h
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
l o g i c / O n e S i x I n s t a n c e _ p . h
l o g i c / O n e S i x U p d a t e . h
l o g i c / O n e S i x U p d a t e . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x V e r s i o n . h
2013-09-12 03:13:17 +05:30
l o g i c / O n e S i x V e r s i o n . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x L i b r a r y . h
2013-09-12 03:13:17 +05:30
l o g i c / O n e S i x L i b r a r y . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O n e S i x R u l e . h
2013-09-12 03:13:17 +05:30
l o g i c / O n e S i x R u l e . c p p
2013-09-22 07:51:36 +05:30
l o g i c / O p S y s . h
2013-09-12 03:13:17 +05:30
l o g i c / O p S y s . c p p
2013-09-22 07:51:36 +05:30
l o g i c / F o r g e I n s t a l l e r . h
l o g i c / F o r g e I n s t a l l e r . c p p
2013-12-28 18:52:36 +05:30
l o g i c / L i t e L o a d e r I n s t a l l e r . h
l o g i c / L i t e L o a d e r I n s t a l l e r . c p p
2013-08-17 17:10:51 +05:30
# Nostalgia
2013-09-22 07:51:36 +05:30
l o g i c / N o s t a l g i a I n s t a n c e . h
2013-08-17 17:10:51 +05:30
l o g i c / N o s t a l g i a I n s t a n c e . c p p
2013-12-20 19:17:26 +05:30
# FTB
l o g i c / O n e S i x F T B I n s t a n c e . h
l o g i c / O n e S i x F T B I n s t a n c e . c p p
l o g i c / L e g a c y F T B I n s t a n c e . h
l o g i c / L e g a c y F T B I n s t a n c e . c p p
2013-08-17 17:10:51 +05:30
# Lists
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / I n s t a n c e L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / I n s t a n c e L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / B a s e V e r s i o n L i s t . h
2013-09-16 04:24:39 +05:30
l o g i c / l i s t s / B a s e V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / M i n e c r a f t V e r s i o n L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / M i n e c r a f t V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / L w j g l V e r s i o n L i s t . h
2013-08-17 17:10:51 +05:30
l o g i c / l i s t s / L w j g l V e r s i o n L i s t . c p p
2013-09-22 07:51:36 +05:30
l o g i c / l i s t s / F o r g e V e r s i o n L i s t . h
2013-09-16 04:24:39 +05:30
l o g i c / l i s t s / F o r g e V e r s i o n L i s t . c p p
2013-10-14 07:29:21 +05:30
l o g i c / l i s t s / J a v a V e r s i o n L i s t . h
l o g i c / l i s t s / J a v a V e r s i o n L i s t . c p p
2013-09-16 04:24:39 +05:30
2013-12-31 05:54:28 +05:30
# Icons
l o g i c / i c o n s / M M C I c o n . h
l o g i c / i c o n s / M M C I c o n . c p p
l o g i c / i c o n s / I c o n L i s t . h
l o g i c / i c o n s / I c o n L i s t . c p p
2013-09-16 04:24:39 +05:30
# misc model/view
2013-09-22 07:51:36 +05:30
l o g i c / E n a b l e d I t e m F i l t e r . h
2013-09-16 04:24:39 +05:30
l o g i c / E n a b l e d I t e m F i l t e r . c p p
2013-08-17 17:10:51 +05:30
# Tasks
2013-09-22 07:51:36 +05:30
l o g i c / t a s k s / P r o g r e s s P r o v i d e r . h
l o g i c / t a s k s / T a s k . h
2013-08-17 17:10:51 +05:30
l o g i c / t a s k s / T a s k . c p p
2014-01-01 23:51:58 +05:30
l o g i c / t a s k s / T h r e a d T a s k . h
l o g i c / t a s k s / T h r e a d T a s k . c p p
2013-12-20 19:17:26 +05:30
l o g i c / t a s k s / S e q u e n t i a l T a s k . h
l o g i c / t a s k s / S e q u e n t i a l T a s k . c p p
2013-09-23 03:53:50 +05:30
2013-10-05 05:38:13 +05:30
# Utilities
2013-11-24 11:06:16 +05:30
l o g i c / J a v a C h e c k e r . h
l o g i c / J a v a C h e c k e r . c p p
2013-10-05 05:38:13 +05:30
l o g i c / J a v a U t i l s . h
l o g i c / J a v a U t i l s . c p p
2013-11-03 20:50:26 +05:30
l o g i c / N a g U t i l s . h
l o g i c / N a g U t i l s . c p p
2013-11-27 22:26:15 +05:30
l o g i c / S k i n U t i l s . h
l o g i c / S k i n U t i l s . c p p
2013-12-11 09:24:39 +05:30
l o g i c / J a v a C h e c k e r J o b . h
l o g i c / J a v a C h e c k e r J o b . c p p
2013-09-22 07:51:36 +05:30
2013-12-08 08:28:44 +05:30
# Assets
2014-01-01 20:26:26 +05:30
l o g i c / a s s e t s / A s s e t s M i g r a t e T a s k . h
l o g i c / a s s e t s / A s s e t s M i g r a t e T a s k . c p p
2013-12-08 08:28:44 +05:30
l o g i c / a s s e t s / A s s e t s U t i l s . h
l o g i c / a s s e t s / A s s e t s U t i l s . c p p
2013-02-21 06:40:09 +05:30
)
2013-02-21 22:02:13 +05:30
######## UIs ########
SET ( MULTIMC_UIS
2013-11-04 07:23:05 +05:30
# Windows
g u i / M a i n W i n d o w . u i
g u i / C o n s o l e W i n d o w . u i
# Dialogs
g u i / d i a l o g s / S e t t i n g s D i a l o g . u i
g u i / 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
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
g u i / d i a l o g s / A b o u t D i a l o g . u i
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
g u i / d i a l o g s / L w j g l S e l e c t D i a l o g . u i
g u i / d i a l o g s / I n s t a n c e S e t t i n g s . u i
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
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
g u i / d i a l o g s / L e g a c y M o d E d i t D i a l o g . u i
g u i / d i a l o g s / O n e S i x M o d E d i t D i a l o g . u i
g u i / d i a l o g s / E d i t N o t e s D i a l o g . u i
2013-11-18 23:35:35 +05:30
g u i / d i a l o g s / A c c o u n t L i s t D i a l o g . u i
2013-11-28 03:44:18 +05:30
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
2013-11-29 09:10:40 +05:30
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
2013-12-02 05:25:24 +05:30
g u i / d i a l o g s / U p d a t e D i a l o g . u i
2013-11-04 07:23:05 +05:30
# Widgets/other
g u i / w i d g e t s / M C M o d I n f o F r a m e . u i
2013-01-20 05:46:07 +05:30
)
2013-09-22 07:51:36 +05:30
set ( FILES_TO_TRANSLATE ${ FILES_TO_TRANSLATE } ${ MULTIMC_SOURCES } ${ MULTIMC_UIS } )
2013-09-08 23:48:55 +05:30
2013-02-19 00:29:01 +05:30
2013-02-21 22:02:13 +05:30
######## Windows resource files ########
IF ( WIN32 )
SET ( MULTIMC_RCS multimc.rc )
ENDIF ( )
2013-10-18 22:12:41 +05:30
####### X11 Stuff #######
IF ( UNIX AND NOT APPLE )
SET ( MultiMC_QT_ADDITIONAL_MODULES ${ MultiMC_QT_ADDITIONAL_MODULES } X11Extras )
SET ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS } xcb )
2013-11-04 07:23:05 +05:30
LIST ( APPEND MULTIMC_SOURCES gui/Platform_X11.cpp )
2013-10-18 22:12:41 +05:30
ELSE ( )
2013-11-04 07:23:05 +05:30
LIST ( APPEND MULTIMC_SOURCES gui/Platform_Other.cpp )
2013-10-18 22:12:41 +05:30
ENDIF ( )
2013-02-21 22:02:13 +05:30
################################ COMPILE ################################
2013-02-19 00:29:01 +05:30
2013-02-21 22:02:13 +05:30
# ICNS file for OS X
2013-02-19 00:29:01 +05:30
IF ( APPLE )
2013-03-12 02:49:17 +05:30
SET ( MACOSX_BUNDLE_ICON_FILE MultiMC.icns )
2013-02-19 00:29:01 +05:30
SET_SOURCE_FILES_PROPERTIES ( ${ CMAKE_CURRENT_SOURCE_DIR } /MultiMC.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
SET ( MULTIMC_SOURCES ${ MULTIMC_SOURCES } ${ CMAKE_CURRENT_SOURCE_DIR } /MultiMC.icns )
ENDIF ( APPLE )
2013-02-21 22:02:13 +05:30
# Link additional libraries
IF ( WIN32 )
2013-03-20 05:45:19 +05:30
SET ( MultiMC_LINK_ADDITIONAL_LIBS ${ MultiMC_LINK_ADDITIONAL_LIBS }
Q t 5 : : W i n M a i n # Link WinMain
)
2013-02-21 22:02:13 +05:30
ENDIF ( WIN32 )
2013-02-05 23:39:20 +05:30
2014-01-05 18:54:33 +05:30
OPTION ( MultiMC_UPDATER_DRY_RUN "Enable updater dry-run mode -- for updater development." OFF )
OPTION ( MultiMC_UPDATER_FORCE_LOCAL "Do not download updated updater -- for updater development." OFF )
2014-01-05 04:36:55 +05:30
2013-12-02 15:39:56 +05:30
OPTION ( MultiMC_CODE_COVERAGE "Compiles for code coverage" OFF )
IF ( MultiMC_CODE_COVERAGE )
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 --coverage" )
SET ( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -O0 --coverage" )
SET ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0 --coverage" )
ENDIF ( MultiMC_CODE_COVERAGE )
2013-02-21 22:02:13 +05:30
# Tell CMake that MultiMCLauncher.jar is generated.
2014-01-08 05:57:40 +05:30
#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/launcher/MultiMCLauncher.jar GENERATED)
#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/javacheck/JavaCheck.jar GENERATED)
2013-01-11 06:55:40 +05:30
2013-02-21 22:02:13 +05:30
# Qt 5 stuff
QT5_WRAP_UI ( MULTIMC_UI ${ MULTIMC_UIS } )
2013-11-24 11:06:16 +05:30
CONFIGURE_FILE ( generated.qrc.in generated.qrc )
QT5_ADD_RESOURCES ( GENERATED_QRC ${ CMAKE_CURRENT_BINARY_DIR } /generated.qrc )
QT5_ADD_RESOURCES ( GRAPHICS_QRC graphics.qrc )
2013-12-02 15:39:56 +05:30
# Add common library
2013-12-14 23:56:50 +05:30
ADD_LIBRARY ( MultiMC_common STATIC ${ MULTIMC_SOURCES } ${ MULTIMC_UI } ${ GENERATED_QRC } ${ GRAPHICS_QRC } )
2013-12-02 15:39:56 +05:30
2013-02-21 22:02:13 +05:30
# Add executable
2014-01-08 05:57:40 +05:30
ADD_EXECUTABLE ( MultiMC MACOSX_BUNDLE WIN32 main.cpp ${ MULTIMC_RCS } )
2013-02-21 22:02:13 +05:30
# Link
2013-12-02 15:39:56 +05:30
TARGET_LINK_LIBRARIES ( MultiMC MultiMC_common )
TARGET_LINK_LIBRARIES ( MultiMC_common xz-embedded unpack200 quazip libUtil libSettings libGroupView ${ MultiMC_LINK_ADDITIONAL_LIBS } )
2014-01-03 02:07:56 +05:30
QT5_USE_MODULES ( MultiMC Core Widgets Network Xml Concurrent ${ MultiMC_QT_ADDITIONAL_MODULES } )
QT5_USE_MODULES ( MultiMC_common Core Widgets Network Xml Concurrent ${ MultiMC_QT_ADDITIONAL_MODULES } )
2013-12-02 15:39:56 +05:30
ADD_DEPENDENCIES ( MultiMC_common MultiMCLauncher JavaCheck )
2013-07-01 02:09:57 +05:30
2013-02-21 22:02:13 +05:30
################################ INSTALLATION AND PACKAGING ################################
2013-02-12 21:44:23 +05:30
2013-02-21 22:02:13 +05:30
######## Install ########
2013-02-12 23:27:18 +05:30
2013-02-21 22:02:13 +05:30
#### Executable ####
2013-12-01 21:04:51 +05:30
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
)
2013-02-05 23:39:20 +05:30
2013-12-01 21:04:51 +05:30
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 . )
2013-02-21 22:02:13 +05:30
2013-12-01 21:04:51 +05:30
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 ( )
2013-02-12 21:44:23 +05:30
2013-12-01 21:04:51 +05:30
#### Dist package logic ####
2013-09-19 22:49:01 +05:30
2013-12-01 22:03:40 +05:30
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 | s v g | t i f f | m n g " E X C L U D E
)
2013-09-19 22:49:01 +05:30
2013-12-01 22:03:40 +05:30
# 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 ( )
2013-12-01 21:04:51 +05:30
# 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 | s v g | 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
2013-12-01 22:03:40 +05:30
R E G E X " _ d e b u g \ \ . " E X C L U D E
2013-12-01 21:04:51 +05:30
)
2013-09-19 22:49:01 +05:30
2013-12-01 21:04:51 +05:30
# 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
2013-12-01 22:03:40 +05:30
R E G E X " _ d e b u g \ \ . " E X C L U D E
2013-12-01 21:04:51 +05:30
)
2014-01-02 19:52:57 +05:30
IF ( APPLE )
# Accessible plugin to make buttons look decent on osx
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 ( )
2013-12-01 22:03:40 +05:30
endif ( )
2013-09-19 22:49:01 +05:30
2013-12-01 21:04:51 +05:30
# 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
)
2013-09-19 22:49:01 +05:30
2013-12-11 01:07:15 +05:30
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 )
2013-09-19 22:49:01 +05:30
2013-02-06 12:07:51 +05:30
2013-02-05 23:39:20 +05:30
2013-02-21 22:02:13 +05:30
######## Package ########
2013-02-05 23:39:20 +05:30
# Package with CPack
IF ( UNIX )
2013-03-20 05:45:19 +05:30
if ( APPLE )
SET ( CPACK_GENERATOR "ZIP" )
else ( )
SET ( CPACK_GENERATOR "TGZ" )
endif ( )
2013-02-05 23:39:20 +05:30
ELSEIF ( WIN32 )
2013-03-20 05:45:19 +05:30
SET ( CPACK_GENERATOR "ZIP" )
2013-02-05 23:39:20 +05:30
ENDIF ( )
2013-02-12 23:27:18 +05:30
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 } )
IF ( CPACK_GENERATOR STREQUAL "NSIS" )
SET ( CPACK_PACKAGE_FILE_NAME "Setup-MultiMC" )
ELSE ( )
SET ( CPACK_PACKAGE_FILE_NAME "MultiMC" )
ENDIF ( )
IF ( WIN32 )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "MultiMC 5" )
ENDIF ( )
2013-02-05 23:39:20 +05:30
INCLUDE ( CPack )
2013-03-20 01:47:35 +05:30
include_directories ( ${ PROJECT_BINARY_DIR } /include )
2013-09-08 23:48:55 +05:30
### translation stuff
file ( GLOB TRANSLATIONS_FILES translations/*.ts )
option ( UPDATE_TRANSLATIONS "Update source translation translations/*.ts files (WARNING: make clean will delete the source .ts files! Danger!)" )
2013-12-01 21:04:51 +05:30
IF ( UPDATE_TRANSLATIONS )
qt5_create_translation ( QM_FILES ${ FILES_TO_TRANSLATE } ${ TRANSLATIONS_FILES } )
ELSE ( )
qt5_add_translation ( QM_FILES ${ TRANSLATIONS_FILES } )
ENDIF ( )
2013-09-08 23:48:55 +05:30
2013-10-02 02:43:21 +05:30
add_custom_target ( translations DEPENDS ${ QM_FILES } )
2013-12-28 06:33:53 +05:30
IF ( APPLE AND UNIX ) ## OSX
install ( FILES ${ QM_FILES } DESTINATION MultiMC.app/Contents/MacOS/translations )
ELSE ( )
install ( FILES ${ QM_FILES } DESTINATION translations )
ENDIF ( )
2013-09-08 23:48:55 +05:30
2013-12-02 15:39:56 +05:30
# Tests
add_subdirectory ( tests )