This repository has been archived by the owner on May 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
61 lines (51 loc) · 2.03 KB
/
CMakeLists.txt
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
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
cmake_minimum_required(VERSION 2.8)
project("MasterServer")
include(CheckIncludeFiles)
# Add definitions for w32 build that dosen't support _WIN32 macro
if (WIN32)
add_definitions("-DWIN32 -D__WIN32__ -D_CRT_SECURE_NO_WARNINGS")
endif()
# Set CMake output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if (MSVC)
check_include_files(vld.h HAVE_VLD_H)
if (HAVE_VLD_H)
add_definitions(-DHAVE_VLD_H)
endif()
endif()
set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/MSConfig.cpp
${CMAKE_CURRENT_LIST_DIR}/MSConfig.h
${CMAKE_CURRENT_LIST_DIR}/ini.c
${CMAKE_CURRENT_LIST_DIR}/ini.h
${CMAKE_CURRENT_LIST_DIR}/INIReader.cpp
${CMAKE_CURRENT_LIST_DIR}/INIReader.h
${CMAKE_CURRENT_LIST_DIR}/Main.cpp
${CMAKE_CURRENT_LIST_DIR}/Module.cpp
${CMAKE_CURRENT_LIST_DIR}/Module.h
${CMAKE_CURRENT_LIST_DIR}/ModuleManager.cpp
${CMAKE_CURRENT_LIST_DIR}/ModuleManager.h
)
if (WIN32)
set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/resource.h)
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/MasterServer.rc PROPERTIES LANGUAGE RC)
endif()
add_executable(MasterServer ${SOURCES})
target_link_libraries(MasterServer MDK ${CMAKE_DL_LIBS})
#set_target_properties(MasterServer PROPERTIES LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"")
if (RS_64BIT EQUAL 1)
target_compile_definitions(MasterServer PRIVATE __64BIT__)
endif()