Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
add comments, touch up (#227)
Browse files Browse the repository at this point in the history
At this point, things install without errors, but there are some things
missing and some of the menu files and meta info need verifying
  • Loading branch information
andy5995 committed Oct 5, 2018
1 parent 1298338 commit 4331011
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
24 changes: 9 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ OPTION(WANT_INSTALL_DATA "Install ZetaGlest's data" OFF)
if(WANT_INSTALL_DATA)
add_definitions("-DDATADIR=${INSTALL_DIR_DATA}")

# The two variables need to be set here, they are not set in the source
# CMakeLists.txt, nor do they need to be.
IF(NOT INSTALL_DIR_APPDATA)
SET(INSTALL_DIR_APPDATA "${CMAKE_INSTALL_PREFIX}/share/metainfo/" CACHE PATH "The installation path for appdata files")
ENDIF()
Expand All @@ -22,20 +24,9 @@ if(WANT_INSTALL_DATA)
SET(INSTALL_DIR_MENU "${CMAKE_INSTALL_PREFIX}/share/menu/" CACHE PATH "The installation path for menus")
ENDIF()

FOREACH(ZG_PATH BIN ICON)
IF(NOT "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}" STREQUAL "")
IF(IS_ABSOLUTE "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}")
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ELSE()
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
ENDIF()
STRING(REGEX REPLACE "//+" "/" ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH}")
ENDIF()
ENDFOREACH()

CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/others/menu/zetaglest.menu.in"
"${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" COPYONLY)
IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
IF(BUILD_MAP_EDITOR)
FILE(READ "${PROJECT_SOURCE_DIR}/others/menu/zetaglest_editor.menu.in" EDITOR_MENU)
FILE(APPEND "${PROJECT_BINARY_DIR}/others/menu/zetaglest.menu.in" "${EDITOR_MENU}")
ENDIF()
Expand All @@ -50,8 +41,7 @@ if(WANT_INSTALL_DATA)
"${PROJECT_SOURCE_DIR}/techs"
"${PROJECT_SOURCE_DIR}/tilesets"
"${PROJECT_SOURCE_DIR}/tutorials"
DESTINATION ${INSTALL_DIR_DATA}
OPTIONAL REGEX "/.git" EXCLUDE)
DESTINATION ${INSTALL_DIR_DATA})

INSTALL(FILES "${PROJECT_SOURCE_DIR}/others/appdata/zetaglest.appdata.xml"
DESTINATION ${INSTALL_DIR_APPDATA})
Expand All @@ -74,14 +64,18 @@ if(WANT_INSTALL_DATA)
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest.desktop"
DESTINATION ${INSTALL_DIR_DESKTOP})

IF(BUILD_MAP_EDITOR OR NOT DEFINED BUILD_MAP_EDITOR)
# Install only the desktop file. The icon gets installed from the
# cmake file in source/glest_map_editor
IF(BUILD_MAP_EDITOR)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest_editor.desktop"
DESTINATION ${INSTALL_DIR_DESKTOP})
ENDIF()

IF(BUILD_MODEL_VIEWER)
INSTALL(FILES
"${PROJECT_SOURCE_DIR}/others/desktop/zetaglest_g3dviewer.desktop"
DESTINATION ${INSTALL_DIR_DESKTOP})
ENDIF()

ENDIF()
2 changes: 1 addition & 1 deletion others/desktop/zetaglest_g3dviewer.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Categories=Game;StrategyGame;
Comment=G3d Model Viewer
Name=ZetaGlest Model Viewer
Icon=g3dviewer
Icon=g3d_viewer
Exec=zetaglest_g3dviewer
Terminal=false
Type=Application
Expand Down

0 comments on commit 4331011

Please sign in to comment.