Debian Codegraph @

CMakeLists.txt

raw ◀ ▶
1 Debian patch touch this file
1 # Required cmake version
•2 cmake_minimum_required(VERSION 3.30.0)
3
4 # Put the include dirs which are in the source or build tree
5 # before all other include dirs, so the headers in the sources
6 # are prefered over the already installed ones
7 # since cmake 2.4.1
8 set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
9
10 project(pvpgn CXX)
11
12 option(WITH_BNETD "compile the bnetd target" ON)
13 option(WITH_D2CS "compile the d2cs target" ON)
14 option(WITH_D2DBS "compile the d2dbs target" ON)
15 option(WITH_LUA "enable Lua support" OFF)
16 if(WIN32)
17 option(WITH_WIN32_GUI "enable GUI building (default on)" ON)
18 endif(WIN32)
19
20 #storage backends flags
21 option(WITH_MYSQL "include MySQL user accounts support" OFF)
22 option(WITH_SQLITE3 "include SQLite3 user accounts support" OFF)
23 option(WITH_PGSQL "include PostgreSQL user accounts support" OFF)
24 option(WITH_ODBC "include ODBC user accounts support" OFF)
25 include(ConfigureChecks.cmake)
26
27
28 subdirs(src conf man files)
29 if(WITH_LUA)
30 add_subdirectory(lua)
31 endif(WITH_LUA)
32
33 ENABLE_TESTING()
34
35 # uninstall target
36 configure_file(
37 "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
38 "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake"
39 IMMEDIATE @ONLY)
40
41 add_custom_target(uninstall
42 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_MODULE_PATH}/cmake_uninstall.cmake)
43
44 # purge target
45 configure_file(
46 "${CMAKE_MODULE_PATH}/cmake_purge.cmake.in"
47 "${CMAKE_MODULE_PATH}/cmake_purge.cmake"
48 IMMEDIATE @ONLY)
49
50 add_custom_target(purge
51 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_MODULE_PATH}/cmake_purge.cmake)