blob: 7a92d5cf8a4065d6de22d46846c01af3bffde8df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
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
libmmc_config.h
# Base classes and infrastructure
InstanceVersion.h
MinecraftVersion.h
InstanceFactory.h
BaseUpdate.h
BaseInstance.h
BaseInstance_p.h
MinecraftProcess.h
Mod.h
ModList.h
# network stuffs
net/DownloadJob.h
net/JobQueue.h
net/NetWorker.h
# legacy instances
LegacyInstance.h
LegacyInstance_p.h
LegacyUpdate.h
LegacyForge.h
# 1.6 instances
OneSixAssets.h
OneSixInstance.h
OneSixInstance_p.h
OneSixUpdate.h
OneSixVersion.h
VersionFactory.h
# Nostalgia
NostalgiaInstance.h
# Lists
lists/InstanceList.h
lists/InstVersionList.h
lists/MinecraftVersionList.h
lists/LwjglVersionList.h
IconListModel.h
# Tasks
tasks/Task.h
tasks/LoginTask.h
)
SET(LIBINST_SOURCES
# Base classes and infrastructure
InstanceFactory.cpp
BaseUpdate.cpp
BaseInstance.cpp
MinecraftProcess.cpp
Mod.cpp
ModList.cpp
# network stuffs
net/NetWorker.cpp
net/DownloadJob.cpp
# legacy instances
LegacyInstance.cpp
LegacyUpdate.cpp
LegacyForge.cpp
# 1.6 instances
OneSixAssets.cpp
OneSixInstance.cpp
OneSixVersion.cpp
OneSixUpdate.cpp
VersionFactory.cpp
# Nostalgia
NostalgiaInstance.cpp
# Lists
lists/InstanceList.cpp
lists/InstVersionList.cpp
lists/MinecraftVersionList.cpp
lists/LwjglVersionList.cpp
IconListModel.cpp
# Tasks
tasks/Task.cpp
tasks/LoginTask.cpp
)
# Set the include dir path.
SET(LIBMULTIMC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
# Include self.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR}/include)
add_definitions(-DLIBMULTIMC_LIBRARY)
add_library(backend SHARED ${LIBINST_SOURCES} ${LIBINST_HEADERS})
qt5_use_modules(backend Core Network Xml)
target_link_libraries(backend libUtil libSettings quazip)
|