This repository has been archived by the owner on Jul 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
103 lines (90 loc) · 4.21 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
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
#########################################################################################
# Game data
CMAKE_MINIMUM_REQUIRED( VERSION 2.6.2 )
PROJECT( MegaGlest )
# Requires an install prefix for the items below to work
IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "")
#MESSAGE(STATUS "Looking for [${PROJECT_SOURCE_DIR}/../glest_game/]")
MESSAGE(STATUS "**Data package INSTALL triggered.")
# Check if we are running from a GIT folder structure or tarballs
#IF(EXISTS "${PROJECT_SOURCE_DIR}/../glest_game/")
# MESSAGE(STATUS "**Data package detected GIT folder structure.")
# rename the ini for installation
#IF(WIN32)
# INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/glest.ini"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
#ELSE()
# INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/../../mk/linux/glest.ini"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
#ENDIF()
# Installation of the program config and image files
#INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/../../mk/linux/glestkeys.ini"
# "${PROJECT_SOURCE_DIR}/../../mk/linux/megaglest.bmp"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
# Installation of data files from outside normal data folder
#INSTALL(DIRECTORY "${PROJECT_SOURCE_DIR}/../../source/masterserver/flags"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}data/core/misc_textures
# OPTIONAL REGEX "/.git" EXCLUDE)
# Installation of the data
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/data"
"${PROJECT_SOURCE_DIR}/docs"
"${PROJECT_SOURCE_DIR}/maps"
"${PROJECT_SOURCE_DIR}/scenarios"
"${PROJECT_SOURCE_DIR}/techs"
"${PROJECT_SOURCE_DIR}/tilesets"
"${PROJECT_SOURCE_DIR}/tutorials"
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}
OPTIONAL REGEX "/.git" EXCLUDE)
#ELSE()
# MESSAGE(STATUS "**Data package detected stand alone data folder structure, prefix [${CMAKE_INSTALL_PREFIX}] bindir [${PROJECT_SOURCE_DIR}].")
# IF(NOT MEGAGLEST_BIN_INSTALL_PATH)
# SET(MEGAGLEST_BIN_INSTALL_PATH "bin/" CACHE STRING "The installation path for binaries (this is appended to the CMAKE_INSTALL_PREFIX)")
# ENDIF()
# IF(NOT MEGAGLEST_DATA_INSTALL_PATH)
# SET(MEGAGLEST_DATA_INSTALL_PATH "share/megaglest/" CACHE STRING "The installation path for data files (this is appended to the CMAKE_INSTALL_PREFIX)")
# ENDIF()
# IF(NOT MEGAGLEST_DESKTOP_INSTALL_PATH)
# SET(MEGAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files (this is appended to the CMAKE_INSTALL_PREFIX)")
#ENDIF()
# IF(NOT MEGAGLEST_ICON_INSTALL_PATH)
# SET(MEGAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files (this is appended to the CMAKE_INSTALL_PREFIX)")
# ENDIF()
# IF(NOT CUSTOM_DATA_INSTALL_PATH)
# SET(CUSTOM_DATA_INSTALL_PATH "'\\\"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\"'" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)")
# ENDIF()
# MESSAGE(STATUS "*NOTE: Custom Data Install Path is [${MEGAGLEST_DATA_INSTALL_PATH}]")
# rename the ini for installation
# IF(WIN32)
# INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/glest_windows.ini"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}
# RENAME "glest.ini")
# ELSE()
#install(CODE "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${PROJECT_SOURCE_DIR}/glest_linux.ini\" \"${MEGAGLEST_DATA_INSTALL_PATH}/glest.ini\")")
# INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/glest_linux.ini"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}
# RENAME "glest.ini")
# ENDIF()
# Installation of the program config and image files
# INSTALL(FILES
# "${PROJECT_SOURCE_DIR}/glestkeys.ini"
# "${PROJECT_SOURCE_DIR}/megaglest.bmp"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
# Installation of the data
# install(
# DIRECTORY "${PROJECT_SOURCE_DIR}/data"
# "${PROJECT_SOURCE_DIR}/docs"
# "${PROJECT_SOURCE_DIR}/maps"
# "${PROJECT_SOURCE_DIR}/scenarios"
# "${PROJECT_SOURCE_DIR}/techs"
# "${PROJECT_SOURCE_DIR}/tilesets"
# "${PROJECT_SOURCE_DIR}/tutorials"
# DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH}
# OPTIONAL REGEX "/.git" EXCLUDE)
#ENDIF()
ENDIF()