diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-11-24 06:36:16 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-11-24 06:36:16 +0100 |
commit | ca297fca79a7b1b96e41ba5abed4956af9383c16 (patch) | |
tree | 5c6cf2a486c4015f5e52842acb412e39b8498acd /CMakeLists.txt | |
parent | 4124faf474908e4d79d93b0f624bf8fd81bd9972 (diff) | |
download | MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.gz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.lz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.tar.xz MultiMC-ca297fca79a7b1b96e41ba5abed4956af9383c16.zip |
Prepare for rework of instance launch/update
Added missing licenses
Added a Java functionality checker (detects 32/64bit java)
Refactor of *Update - no longer based on BaseUpdate, but Task directly
Fixed runner script to not derp up on 32bit linux. Could add more detection and error reporting there.
Resources are now split into graphics and generated. Generated resources are placed in the build tree and included from there.
Used the Java checker in the main settings dialog (TODO: instance settings).
Partial support for ${arch}-using libraries - both 32 and 64 variants of ${arch} are downloaded.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa78981b..a9de11d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ SET(CMAKE_AUTOMOC ON) SET(CMAKE_INCLUDE_CURRENT_DIR ON) SET(FILES_TO_TRANSLATE ) +######## Set module path ######## +SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") +SET(MMC_SRC "${PROJECT_SOURCE_DIR}") +SET(MMC_BIN "${PROJECT_BINARY_DIR}") + # Output all executables and shared libs in the main build folder, not in subfolders. SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) @@ -49,8 +54,9 @@ include_directories(${Qt5Widgets_INCLUDE_DIRS}) add_subdirectory(depends/quazip) include_directories(depends/quazip) -# Add the java launcher +# Add the java launcher and checker add_subdirectory(depends/launcher) +add_subdirectory(depends/javacheck) # Add xz decompression add_subdirectory(depends/xz-embedded) @@ -84,10 +90,6 @@ IF(${BIGENDIAN}) ENDIF(${BIGENDIAN}) -######## Set module path ######## -SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}") - - ######## Set version numbers ######## SET(MultiMC_VERSION_MAJOR 5) SET(MultiMC_VERSION_MINOR 0) @@ -231,8 +233,6 @@ logic/BaseVersion.h logic/MinecraftVersion.h logic/InstanceFactory.h logic/InstanceFactory.cpp -logic/BaseUpdate.h -logic/BaseUpdate.cpp logic/BaseInstance.h logic/BaseInstance.cpp logic/BaseInstance_p.h @@ -328,6 +328,8 @@ logic/tasks/Task.h logic/tasks/Task.cpp # Utilities +logic/JavaChecker.h +logic/JavaChecker.cpp logic/JavaUtils.h logic/JavaUtils.cpp logic/NagUtils.h @@ -397,20 +399,24 @@ IF(WIN32) ENDIF(WIN32) # Tell CMake that MultiMCLauncher.jar is generated. -SET_SOURCE_FILES_PROPERTIES(resources/MultiMCLauncher.jar GENERATED) +SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/launcher/MultiMCLauncher.jar GENERATED) +SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/depends/javacheck/JavaCheck.jar GENERATED) # Qt 5 stuff QT5_WRAP_UI(MULTIMC_UI ${MULTIMC_UIS}) -QT5_ADD_RESOURCES(MULTIMC_QRC multimc.qrc) +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) + # Add executable ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32 - ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_QRC} ${MULTIMC_RCS}) + ${MULTIMC_SOURCES} ${MULTIMC_UI} ${GRAPHICS_QRC} ${GENERATED_QRC} ${MULTIMC_RCS}) # Link TARGET_LINK_LIBRARIES(MultiMC xz-embedded unpack200 quazip libUtil libSettings libGroupView ${MultiMC_LINK_ADDITIONAL_LIBS}) QT5_USE_MODULES(MultiMC Core Widgets Network Xml ${MultiMC_QT_ADDITIONAL_MODULES}) -ADD_DEPENDENCIES(MultiMC MultiMCLauncher) +ADD_DEPENDENCIES(MultiMC MultiMCLauncher JavaCheck) option(BUILD_KEYRING_TEST "Build the simple keyring test binary" OFF) IF(BUILD_KEYRING_TEST) @@ -568,3 +574,5 @@ endif (UPDATE_TRANSLATIONS) add_custom_target (translations DEPENDS ${QM_FILES}) install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/translations) + + |