1 cmake_minimum_required (VERSION 3.13)
3 set (MIN_BOOST_VERSION 1.47)
4 set (MIN_CRYPTOPP_VERSION 5.6)
5 set (MIN_GDLIB_VERSION 2.0.0)
6 set (MIN_WX_VERSION 2.8.12)
8 set (PACKAGE_BUGREPORT "admin@amule.org")
9 set (PACKAGE_NAME "aMule")
10 set (PACKAGE_STRING "aMule SVN")
11 set (PACKAGE_TARNAME "amule")
12 set (PACKAGE_URL \"\")
13 set (PACKAGE_VERSION "SVN")
15 set (DEFAULT_BUILD_TYPE "Release")
16 set (RECONF_COMMAND ${CMAKE_COMMAND})
18 if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
19 SET (DEFAULT_BUILD_TYPE "Debug")
22 # Set the possible values of build type for cmake-gui
23 if (CMAKE_CONFIGURATION_TYPES)
24 set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE
25 STRING "Semicolon separated list of supported configuration types, only supports debug and release, anything else will be ignored" FORCE
28 set_property (CACHE CMAKE_CONFIGURATION_TYPES PROPERTY STRINGS
33 if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
34 message (STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.")
35 set (CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE
36 STRING "Choose the type of build." FORCE
40 include (cmake/CmDaB.cmake)
41 include (cmake/manpage_install.cmake)
42 include (cmake/options.cmake)
43 include (cmake/search-dirs.cmake)
45 if (BUILD_AMULECMD OR BUILD_WEBSERVER)
46 include (cmake/FindReadline.cmake)
50 include (cmake/gdlib.cmake)
51 include (cmake/getopt_long.cmake)
55 find_package (Qt4 COMPONENTS QtCore QtGUI REQUIRED)
58 if (BUILD_WEBSERVER OR NEED_ZLIB)
59 include (cmake/zlib.cmake)
63 include (cmake/png.cmake)
67 include (cmake/boost.cmake)
70 if (ENABLE_IP2COUNTRY)
71 include (cmake/ip2country.cmake)
75 include (cmake/nls.cmake)
79 include (cmake/upnp.cmake)
83 include (cmake/glib21.cmake)
87 include (cmake/cryptopp.cmake)
91 include (cmake/wx.cmake)
99 COMMAND ${GIT_EXECUTABLE} describe
100 OUTPUT_VARIABLE GIT_INFO_WC_REVISION
101 OUTPUT_STRIP_TRAILING_WHITESPACE
102 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
105 set (SVNDATE "rev. ${GIT_INFO_WC_REVISION}" CACHE STRING "Revision to be written to version string" FORCE)
106 message (STATUS "git revision ${SVNDATE} found")
109 include (cmake/bfd.cmake)
123 if (BUILD_MONOLITHIC)
124 install (FILES amule.desktop
125 DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
130 install (FILES amulegui.desktop
131 DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
135 add_subdirectory (docs)
136 add_subdirectory (src)
140 add_subdirectory (unittests)
145 Configured aMule ${PACKAGE_VERSION}${SVN_REVISION} for '${CMAKE_SYSTEM}' on '${CMAKE_SYSTEM_PROCESSOR}'.
147 aMule enabled options:
150 Prefix where aMule should be installed? ${CMAKE_PREFIX_PATH}
151 Should aMule be compiled with i18n support? ${ENABLE_NLS}
152 Which mode should aMule be compiled in? ${CMAKE_BUILD_TYPE}
153 Should aMule be compiled with UPnP support? ${ENABLE_UPNP}
154 Should aMule be compiled with IP2country support? ${ENABLE_IP2COUNTRY}
155 Should aMule monolithic application be built? ${BUILD_MONOLITHIC}
156 Should aMule daemon version be built? ${BUILD_DAEMON}
157 Should aMule remote gui be built? ${BUILD_REMOTEGUI}
159 **** aMule TextClient ****
160 Should aMule Command Line Client be built? ${BUILD_AMULECMD}
162 **** aMule WebServer ****
163 Should aMule WebServer be built? ${BUILD_WEBSERVER}
165 **** aMule ED2K Links Handler ****
166 Should aMule ED2K Links Handler be built? ${BUILD_ED2K}
168 **** aMuleLinkCreator ****
169 Should aMuleLinkCreator GUI version (alc) be built? ${BUILD_ALC}
170 Should aMuleLinkCreator for console (alcc) be built? ${BUILD_ALCC}
172 **** aMule Statistics ****
173 Should C aMule Statistics (CAS) be built? ${BUILD_CAS}
174 Should aMule GUI Statistics (wxCas) be built? ${BUILD_WXCAS}"
178 message (" Should xas XChat2 plugin be installed? ${BUILD_XAS}")
182 **** General Libraries and Tools ****
183 Should aMule file viewer for console be built? ${BUILD_FILEVIEW}
185 Libraries aMule will use to build:"
189 message (STATUS " wxWidgets ${WX_VERSION}")
193 message (" boost ${Boost_VERSION}")
197 message (" crypto++ ${CRYPTOPP_VERSION} in ${CRYPTOPP_INCLUDE_PREFIX}")
201 message (" libupnp ${LIBUPNP_VERSION}")
204 message (" libintl ${ENABLE_NLS}")
206 if (ENABLE_IP2COUNTRY)
207 message (" libGeoIP ${GEOIP_LIB}")
211 message (" libpng ${PNG_VERSION_STRING}")
215 message (" libgd ${gdlib_VERSION}")
219 message (" zlib ${ZLIB_VERSION_STRING}")