PrismLauncher/libmultimc/CMakeLists.txt
Andrew 3b38e5f924 Implemented LWJGL version lists.
The LWJGL list actually doesn't use tasks for loading. Instead, it takes advantage of the
QNetworkAccessManager's asynchronous requests. This is a system that I may look to implement for other version
lists and things such as the Minecraft version list and possibly even instance mod lists.

Loading things this way means that code that wants to load a list can simply call the load list function, rather
than having to get a task from the list and execute the task. Unfortunately, it also means we can't have task
progress dialogs for loading lists, but it shouldn't really be too difficult to write one that works with this
system.

At some point in the future, I'll probably end up putting all the code for this method of loading lists into a
base class and then update the other lists to support it.
2013-05-17 11:53:22 -05:00

97 lines
1.7 KiB
CMake

project(libMultiMC)
set(CMAKE_AUTOMOC ON)
# Find Qt
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Xml REQUIRED)
# Include Qt headers.
include_directories(${Qt5Base_INCLUDE_DIRS})
include_directories(${Qt5Network_INCLUDE_DIRS})
# Include utility library.
include_directories(${CMAKE_SOURCE_DIR}/libutil/include)
# Include settings library.
include_directories(${CMAKE_SOURCE_DIR}/libsettings/include)
SET(LIBINST_HEADERS
include/libmmc_config.h
# Instance Stuff
include/instance.h
include/instancelist.h
include/instanceloader.h
include/instversion.h
include/instversionlist.h
include/minecraftversion.h
include/minecraftversionlist.h
# Tasks
include/task.h
include/logintask.h
include/gameupdatetask.h
# Login Data
include/userinfo.h
include/loginresponse.h
# Misc Data
include/version.h
include/appsettings.h
include/minecraftprocess.h
include/lwjglversionlist.h
)
SET(LIBINST_SOURCES
# Instance Stuff
src/instance.cpp
src/instancelist.cpp
src/instanceloader.cpp
src/instversion.cpp
src/instversionlist.cpp
src/minecraftversion.cpp
src/minecraftversionlist.cpp
# Tasks
src/task.cpp
src/logintask.cpp
src/gameupdatetask.cpp
# Login Data
src/userinfo.cpp
src/loginresponse.cpp
# Misc Data
src/version.cpp
src/appsettings.cpp
src/minecraftprocess.cpp
src/lwjglversionlist.cpp
)
# Set the include dir path.
SET(LIBMULTIMC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
# Include self.
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
add_definitions(-DLIBMULTIMC_LIBRARY)
add_library(libMultiMC SHARED ${LIBINST_SOURCES} ${LIBINST_HEADERS})
qt5_use_modules(libMultiMC Core Network Xml)
target_link_libraries(libMultiMC libUtil libSettings)