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)