mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 19:29:47 +02:00
CMake:correct spelling of "zetaglest"
This also removes the git revision number stamping from cmake, support for which was removed from the source code months ago. This is to help prepare to fix #110 but doesn't fix it.
This commit is contained in:
180
CMakeLists.txt
180
CMakeLists.txt
@@ -1,11 +1,11 @@
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.2 )
|
||||
PROJECT( MegaGlest )
|
||||
PROJECT( ZetaGlest )
|
||||
|
||||
#SET(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
|
||||
#
|
||||
# *NOTE: For now we assume some variation of GCC Compiler (or MingW for Windows binaries)
|
||||
# VC++ users should not use CMake yet but rather the build-mg.bat file in mk/windows
|
||||
# VC++ users should not use CMake yet but rather the build-zg.bat file in mk/windows
|
||||
#
|
||||
|
||||
# build type
|
||||
@@ -30,11 +30,11 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
ADD_DEFINITIONS("-Wno-switch")
|
||||
ENDIF()
|
||||
|
||||
OPTION(BUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS "Build model import/export tools" ON)
|
||||
OPTION(BUILD_MEGAGLEST_MODEL_VIEWER "Build model viewer" ON)
|
||||
OPTION(BUILD_MEGAGLEST_MAP_EDITOR "Build map editor" ON)
|
||||
OPTION(BUILD_MEGAGLEST "Build MegaGlest" ON)
|
||||
OPTION(BUILD_MEGAGLEST_TESTS "Build MegaGlest Unit Tests" OFF)
|
||||
OPTION(BUILD_ZETAGLEST_MODEL_IMPORT_EXPORT_TOOLS "Build model import/export tools" ON)
|
||||
OPTION(BUILD_ZETAGLEST_MODEL_VIEWER "Build model viewer" ON)
|
||||
OPTION(BUILD_ZETAGLEST_MAP_EDITOR "Build map editor" ON)
|
||||
OPTION(BUILD_ZETAGLEST "Build ZetaGlest" ON)
|
||||
OPTION(BUILD_ZETAGLEST_TESTS "Build ZetaGlest Unit Tests" OFF)
|
||||
OPTION(WANT_SINGLE_INSTALL_DIRECTORY "Use single install directory for everything. It is useful for example for MacOS cpack bundles." OFF)
|
||||
OPTION(WANT_STATIC_LIBS "Builds as many static libs as possible." OFF)
|
||||
OPTION(WANT_USE_VLC "Use libVLC to play videos." ON)
|
||||
@@ -58,37 +58,37 @@ include(${CMAKE_SOURCE_DIR}/mk/cmake/Modules/SpecialMacros.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/mk/cmake/Modules/ReqVersAndStaticConf.cmake)
|
||||
MESSAGE(STATUS "=====================================================================")
|
||||
|
||||
SET(PKG_NAME "megaglest")
|
||||
SET(PKG_NAME "zetaglest")
|
||||
# read version
|
||||
FILE(READ ${PROJECT_SOURCE_DIR}/source/glest_game/facilities/game_util.cpp MG_VERSION_H_CONTENTS)
|
||||
FILE(READ ${PROJECT_SOURCE_DIR}/source/glest_game/facilities/game_util.cpp ZG_VERSION_H_CONTENTS)
|
||||
MESSAGE(STATUS "Determining version number system type to use:")
|
||||
SET(Begin_otv_string "string glestVersionString")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)(\\.)([^\\.]*)(\\.)([^\"\\.;]*)\";" _threePartMatch "${MG_VERSION_H_CONTENTS}")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)(\\.)([^\"\\.;]*)\";" _twoPartMatch "${MG_VERSION_H_CONTENTS}")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\"\\.;]*)\";" _onePartMatch "${MG_VERSION_H_CONTENTS}")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)(\\.)([^\\.]*)(\\.)([^\"\\.;]*)\";" _threePartMatch "${ZG_VERSION_H_CONTENTS}")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)(\\.)([^\"\\.;]*)\";" _twoPartMatch "${ZG_VERSION_H_CONTENTS}")
|
||||
STRING(REGEX MATCH "${Begin_otv_string}[ \t]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\"\\.;]*)\";" _onePartMatch "${ZG_VERSION_H_CONTENTS}")
|
||||
IF(_threePartMatch)
|
||||
MESSAGE(STATUS "** Trying 3 part versioning ")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)\\.[^\\.]*\\..*" "\\1" VER_MAJOR "${_threePartMatch}")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*[0-9][^\\.]*\\.([^\\.]*)\\..*" "\\1" VER_MINOR "${_threePartMatch}")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*[0-9][^\\.]*\\.[^\\.]*\\.([^\"\\.;]*).*" "\\1" VER_PATCH "${_threePartMatch}")
|
||||
SET(MEGAGLEST_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}")
|
||||
SET(ZETAGLEST_VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}")
|
||||
ELSEIF(_twoPartMatch)
|
||||
MESSAGE(STATUS "** Trying 2 part versioning ")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\\.]*)\\..*" "\\1" VER_MAJOR "${_twoPartMatch}")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*[0-9][^\\.]*\\.([^\"\\.;]*).*" "\\1" VER_MINOR "${_twoPartMatch}")
|
||||
SET(VER_PATCH "0")
|
||||
SET(MEGAGLEST_VERSION "${VER_MAJOR}.${VER_MINOR}")
|
||||
SET(ZETAGLEST_VERSION "${VER_MAJOR}.${VER_MINOR}")
|
||||
ELSEIF(_onePartMatch)
|
||||
MESSAGE(STATUS "** Trying 1 part versioning ")
|
||||
STRING(REGEX REPLACE "[^=]*=[ \t]*\"[ \t]*v[ \t]*([0-9][^\"\\.;]*).*" "\\1" VER_MAJOR "${_onePartMatch}")
|
||||
SET(VER_MINOR "0")
|
||||
SET(VER_PATCH "0")
|
||||
SET(MEGAGLEST_VERSION "${VER_MAJOR}")
|
||||
SET(ZETAGLEST_VERSION "${VER_MAJOR}")
|
||||
ENDIF()
|
||||
FOREACH(ver_var VER_MAJOR;VER_MINOR;VER_PATCH;MEGAGLEST_VERSION)
|
||||
FOREACH(ver_var VER_MAJOR;VER_MINOR;VER_PATCH;ZETAGLEST_VERSION)
|
||||
STRING(REGEX REPLACE "[ \t]" "" "${ver_var}" "${${ver_var}}")
|
||||
ENDFOREACH()
|
||||
MESSAGE(STATUS "Detected MegaGlest Version is [v${MEGAGLEST_VERSION}] ")
|
||||
MESSAGE(STATUS "Detected ZetaGlest Version is [v${ZETAGLEST_VERSION}] ")
|
||||
|
||||
SET(PIC_FLAG "${PIC_FLAG} -fPIC")
|
||||
IF(WANT_STATIC_LIBS AND "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
@@ -210,121 +210,79 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -s") ## Strip binary
|
||||
ENDIF()
|
||||
|
||||
# see if this fixes compile issue for tomreyn: libpthread.so.0: error adding symbols: DSO missing from command line
|
||||
IF(UNIX)
|
||||
MESSAGE(STATUS "*NOTE: Apply fix for: libpthread.so.0: error adding symbols: DSO missing from command line")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -pthread")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -pthread")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -pthread")
|
||||
ENDIF()
|
||||
|
||||
# Get the git revision info for the binary
|
||||
SET(HAS_GIT "FALSE")
|
||||
SET(GIT_LIVE_REV_CMD "")
|
||||
|
||||
OPTION(WANT_GIT_STAMP "use git revision stamp" ON)
|
||||
IF(WANT_GIT_STAMP)
|
||||
# The stuff below gets GIT Global Revision # but ONLY when calling cmake!
|
||||
# the FindGit.cmake module is part of the standard distribution
|
||||
include(FindGit)
|
||||
|
||||
IF(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git/")
|
||||
SET(HAS_GIT "TRUE")
|
||||
MESSAGE(STATUS "Found GIT and using GIT version stamping...")
|
||||
|
||||
# Get the current commit SHA1
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h --abbrev=7
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_SHA1
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get the current version counter
|
||||
execute_process(
|
||||
COMMAND git rev-list HEAD --count
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_COUNT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
SET(GIT_LIVE_REV_CMD "`cd '${PROJECT_SOURCE_DIR}' && git rev-list HEAD --count`.`cd '${PROJECT_SOURCE_DIR}' && git log -1 --format=%h --abbrev=7`")
|
||||
|
||||
MESSAGE(STATUS "Using GIT revision stamp: [${GIT_COMMIT_COUNT}.${GIT_SHA1}] CMD [${GIT_LIVE_REV_CMD}]")
|
||||
|
||||
IF(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
SET(GIT_VERSION_CMD "-DGITVERSION='\\\\'${GIT_COMMIT_COUNT}.${GIT_SHA1}\\\\''")
|
||||
ELSE()
|
||||
SET(GIT_VERSION_CMD "-DGITVERSION='\\\"${GIT_LIVE_REV_CMD}\\\"'")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
# see if this fixes compile issue for tomreyn: libpthread.so.0: error adding symbols: DSO missing from command line
|
||||
IF(UNIX)
|
||||
MESSAGE(STATUS "*NOTE: Apply fix for: libpthread.so.0: error adding symbols: DSO missing from command line")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -pthread")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -pthread")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -pthread")
|
||||
ENDIF()
|
||||
|
||||
SET(COMMON_INFO_ABOUT_PATH "(if the path is relative then is appended to the CMAKE_INSTALL_PREFIX)")
|
||||
IF(CMAKE_INSTALL_PREFIX STREQUAL "")
|
||||
MESSAGE(STATUS "*NOTE: NOT USING a Custom Data Install Path...")
|
||||
ELSE()
|
||||
IF(WANT_SINGLE_INSTALL_DIRECTORY AND NOT MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH)
|
||||
SET(MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH "megaglest-game/" CACHE STRING "The single directory installation path for game ${COMMON_INFO_ABOUT_PATH}")
|
||||
IF(WANT_SINGLE_INSTALL_DIRECTORY AND NOT ZETAGLEST_SINGLE_DIRECTORY_INSTALL_PATH)
|
||||
SET(ZETAGLEST_SINGLE_DIRECTORY_INSTALL_PATH "zetaglest-game/" CACHE STRING "The single directory installation path for game ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
IF(NOT MEGAGLEST_BIN_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(MEGAGLEST_BIN_INSTALL_PATH "bin/" CACHE STRING "The installation path for binaries ${COMMON_INFO_ABOUT_PATH}")
|
||||
IF(NOT ZETAGLEST_BIN_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(ZETAGLEST_BIN_INSTALL_PATH "bin/" CACHE STRING "The installation path for binaries ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
IF(NOT MEGAGLEST_DATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(MEGAGLEST_DATA_INSTALL_PATH "share/megaglest/" CACHE STRING "The installation path for data files ${COMMON_INFO_ABOUT_PATH}")
|
||||
IF(NOT ZETAGLEST_DATA_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(ZETAGLEST_DATA_INSTALL_PATH "share/zetaglest/" CACHE STRING "The installation path for data files ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
SET(MEGAGLEST_INI_INSTALL_PATH "${MEGAGLEST_DATA_INSTALL_PATH}")
|
||||
IF(NOT MEGAGLEST_DESKTOP_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(MEGAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files ${COMMON_INFO_ABOUT_PATH}")
|
||||
SET(ZETAGLEST_INI_INSTALL_PATH "${ZETAGLEST_DATA_INSTALL_PATH}")
|
||||
IF(NOT ZETAGLEST_DESKTOP_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(ZETAGLEST_DESKTOP_INSTALL_PATH "share/applications/" CACHE STRING "The installation path for desktop files ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
IF(NOT MEGAGLEST_ICON_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(MEGAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files ${COMMON_INFO_ABOUT_PATH}")
|
||||
IF(NOT ZETAGLEST_ICON_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(ZETAGLEST_ICON_INSTALL_PATH "share/pixmaps/" CACHE STRING "The installation path for icon files ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
IF(NOT MEGAGLEST_MANPAGE_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(MEGAGLEST_MANPAGE_INSTALL_PATH "share/man/man6/" CACHE STRING "The installation path for manpage files ${COMMON_INFO_ABOUT_PATH}")
|
||||
IF(NOT ZETAGLEST_MANPAGE_INSTALL_PATH AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
SET(ZETAGLEST_MANPAGE_INSTALL_PATH "share/man/man6/" CACHE STRING "The installation path for manpage files ${COMMON_INFO_ABOUT_PATH}")
|
||||
ENDIF()
|
||||
IF(WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
FOREACH(MG_PATH BIN DATA INI DESKTOP ICON)
|
||||
IF(NOT MEGAGLEST_${MG_PATH}_INSTALL_PATH)
|
||||
SET(MEGAGLEST_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_SINGLE_DIRECTORY_INSTALL_PATH}")
|
||||
FOREACH(ZG_PATH BIN DATA INI DESKTOP ICON)
|
||||
IF(NOT ZETAGLEST_${ZG_PATH}_INSTALL_PATH)
|
||||
SET(ZETAGLEST_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_SINGLE_DIRECTORY_INSTALL_PATH}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
IF(NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
FOREACH(MG_PATH DATA INI)
|
||||
IF(IS_ABSOLUTE "${MEGAGLEST_${MG_PATH}_INSTALL_PATH}")
|
||||
SET(MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_${MG_PATH}_INSTALL_PATH}/")
|
||||
FOREACH(ZG_PATH DATA INI)
|
||||
IF(IS_ABSOLUTE "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}")
|
||||
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
|
||||
ELSE()
|
||||
SET(MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_${MG_PATH}_INSTALL_PATH}/")
|
||||
SET(ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${ZETAGLEST_${ZG_PATH}_INSTALL_PATH}/")
|
||||
ENDIF()
|
||||
STRING(REGEX REPLACE "//+" "/" MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH "${MEGAGLEST_FULL_${MG_PATH}_INSTALL_PATH}")
|
||||
STRING(REGEX REPLACE "//+" "/" ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH "${ZETAGLEST_FULL_${ZG_PATH}_INSTALL_PATH}")
|
||||
ENDFOREACH()
|
||||
|
||||
IF(NOT CUSTOM_DATA_INSTALL_PATH)
|
||||
SET(CUSTOM_DATA_INSTALL_PATH "${MEGAGLEST_FULL_DATA_INSTALL_PATH}")
|
||||
SET(CUSTOM_DATA_INSTALL_PATH "${ZETAGLEST_FULL_DATA_INSTALL_PATH}")
|
||||
# ^ someday this intermediate step may be removed
|
||||
ENDIF()
|
||||
SET(CUSTOM_INSTALL_PATHS_VALUES "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}")
|
||||
ENDIF()
|
||||
|
||||
#SET(PKG_DATADIR ${CUSTOM_DATA_INSTALL_PATH_VALUE})
|
||||
#SET(PKG_BINDIR ${MEGAGLEST_BIN_INSTALL_PATH})
|
||||
#SET(PKG_BINDIR ${ZETAGLEST_BIN_INSTALL_PATH})
|
||||
# ^ hard to tell for what it is needed and most likely both were set to wrong values, so let's try to not use them
|
||||
MESSAGE(STATUS "*NOTE: Custom Data Install Path is [${CUSTOM_DATA_INSTALL_PATH}]")
|
||||
ENDIF()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" MG_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" ZG_BUILD_TYPE)
|
||||
IF(HAS_GIT STREQUAL "TRUE")
|
||||
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${GIT_VERSION_CMD}")
|
||||
SET(CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE}} ${GIT_VERSION_CMD}")
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${CUSTOM_INSTALL_PATHS_VALUES}")
|
||||
SET(CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE}} ${CUSTOM_INSTALL_PATHS_VALUES}")
|
||||
|
||||
# We do some funky character escaping to get the right stuff written out to
|
||||
# the final Makefile so we get the GIT Global Revsion #
|
||||
string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}}")
|
||||
string(REPLACE "'" "\"" CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE}}")
|
||||
|
||||
message(STATUS "CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}: ${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}}")
|
||||
message(STATUS "CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE}: ${CMAKE_CXX_FLAGS_${ZG_BUILD_TYPE}}")
|
||||
|
||||
# Win32 specific Compiler Flags
|
||||
IF(WIN32)
|
||||
@@ -348,10 +306,10 @@ IF(NOT WANT_DEPRECATION_WARNINGS)
|
||||
ENDIF()
|
||||
MARK_AS_ADVANCED(WANT_DEPRECATION_WARNINGS)
|
||||
|
||||
IF(NOT MG_CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX STREQUAL "")
|
||||
SET(MG_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
IF(NOT ZG_CMAKE_INSTALL_PREFIX AND NOT CMAKE_INSTALL_PREFIX STREQUAL "")
|
||||
SET(ZG_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
ENDIF()
|
||||
MESSAGE(STATUS "**NOTE: MG_CMAKE_INSTALL_PREFIX is [${MG_CMAKE_INSTALL_PREFIX}]")
|
||||
MESSAGE(STATUS "**NOTE: ZG_CMAKE_INSTALL_PREFIX is [${ZG_CMAKE_INSTALL_PREFIX}]")
|
||||
|
||||
SET(SDL_WINDOWS_DIR_DINC "SDL-2.0.x")
|
||||
SET(SDL_VERSION_NAME "SDL2")
|
||||
@@ -359,13 +317,13 @@ SET(SDL_VERSION_SNAME "sdl")
|
||||
|
||||
OPTION(WANT_DEV_OUTPATH "Use developer friendly output paths." OFF)
|
||||
IF(UNIX AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/linux/")
|
||||
SET(ZETAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/linux/")
|
||||
ELSEIF(UNIX AND APPLE)
|
||||
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macos/")
|
||||
SET(ZETAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/macos/")
|
||||
ELSEIF(UNIX AND NOT APPLE)
|
||||
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/other_unix/")
|
||||
SET(ZETAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/mk/other_unix/")
|
||||
ELSE()
|
||||
SET(MEGAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/data/glest_game/")
|
||||
SET(ZETAGLEST_FRIENDLY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/data/glest_game/")
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
@@ -431,33 +389,33 @@ IF(NOT DEFINED CPACK_GENERATOR)
|
||||
ENDIF()
|
||||
# CPack configuration shared accross platforms
|
||||
SET(CPACK_PACKAGE_NAME ${PKG_NAME})
|
||||
IF(EXISTS "${PROJECT_SOURCE_DIR}/data/glest_game/others/megaglest-long-description.txt.in")
|
||||
FILE(READ "${PROJECT_SOURCE_DIR}/data/glest_game/others/megaglest-long-description.txt.in" MEGAGLEST_LONG_DESCRIPTION)
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${MEGAGLEST_LONG_DESCRIPTION}")
|
||||
IF(EXISTS "${PROJECT_SOURCE_DIR}/../zetaglest-data/others/zetaglest-long-description.txt.in")
|
||||
FILE(READ "${PROJECT_SOURCE_DIR}/../zetaglest-data/others/zetaglest-long-description.txt.in" ZETAGLEST_LONG_DESCRIPTION)
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${ZETAGLEST_LONG_DESCRIPTION}")
|
||||
ELSE()
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MegaGlest")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ZetaGlest")
|
||||
ENDIF()
|
||||
SET(CPACK_PACKAGE_VENDOR "megaglest.org")
|
||||
SET(CPACK_PACKAGE_VENDOR "zetaglest.github.io")
|
||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
|
||||
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "megaglest")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "zetaglest")
|
||||
SET(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
SET(CPACK_PACKAGE_VERSION "${MEGAGLEST_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION "${ZETAGLEST_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VER_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${VER_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${VER_PATCH}")
|
||||
|
||||
IF("${CPACK_GENERATOR}" STREQUAL "DEB")
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "ZetaGlest Team") #required
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
SET(CPACK_DEBIAN_PACKAGE_SUGGESTS "p7zip-full")
|
||||
ENDIF()
|
||||
IF("${CPACK_GENERATOR}" STREQUAL "NSIS")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "MegaGlest")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "ZetaGlest")
|
||||
SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/mk/windows/zetaglest.ico")
|
||||
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mk/windows/zetaglest.ico")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "http://megaglest.org")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "https://zetaglest.github.io")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
IF(WANT_STATIC_LIBS)
|
||||
IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST)
|
||||
IF(BUILD_ZETAGLEST_MODEL_VIEWER OR BUILD_ZETAGLEST_MAP_EDITOR OR BUILD_ZETAGLEST)
|
||||
# shared lib
|
||||
FOREACH(STATIC_LIB
|
||||
OpenSSL
|
||||
@@ -26,7 +26,7 @@ IF(WANT_STATIC_LIBS)
|
||||
LIST(APPEND LIST_OF_STATIC_LIBS_MG "${STATIC_LIB}")
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR)
|
||||
IF(BUILD_ZETAGLEST_MODEL_VIEWER OR BUILD_ZETAGLEST_MAP_EDITOR)
|
||||
# wxWidgets for tools
|
||||
FOREACH(STATIC_LIB
|
||||
wxWidgets)
|
||||
@@ -38,7 +38,7 @@ IF(WANT_STATIC_LIBS)
|
||||
# wxWidgets by default are not available static
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(BUILD_MEGAGLEST)
|
||||
IF(BUILD_ZETAGLEST)
|
||||
# only libs not used by shared lib
|
||||
FOREACH(STATIC_LIB
|
||||
OGG)
|
||||
|
@@ -25,7 +25,7 @@ GCC_FORCED_VERSION=0
|
||||
LUA_FORCED_VERSION=0
|
||||
FORCE_32BIT_CROSS_COMPILE=0
|
||||
COMPILATION_WITHOUT=0
|
||||
BUILD_MEGAGLEST_TESTS="ON"
|
||||
BUILD_ZETAGLEST_TESTS="ON"
|
||||
|
||||
while getopts "c:defg:hl:mnswx" option; do
|
||||
case "${option}" in
|
||||
@@ -189,14 +189,14 @@ case $distribution in
|
||||
echo 'Turning ON dynamic FTGL, LUA, JPEG, PNG ... and forcing use the embedded IRCCLIENT'
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_JPEG=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
|
||||
fi
|
||||
if [ $CLANG_FORCED = 1 ]; then BUILD_MEGAGLEST_TESTS="OFF"; fi
|
||||
if [ $CLANG_FORCED = 1 ]; then BUILD_ZETAGLEST_TESTS="OFF"; fi
|
||||
;;
|
||||
*)
|
||||
if [ "$WANT_STATIC_LIBS" = "-DWANT_STATIC_LIBS=ON" ]; then
|
||||
echo 'Turning ON dynamic OGG ... and forcing use the embedded IRCCLIENT'
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON"
|
||||
fi
|
||||
if [ $CLANG_FORCED = 1 ]; then BUILD_MEGAGLEST_TESTS="OFF"; fi
|
||||
if [ $CLANG_FORCED = 1 ]; then BUILD_ZETAGLEST_TESTS="OFF"; fi
|
||||
# ^ may be removed ~ when default clang's version will be 3.9+
|
||||
;;
|
||||
esac
|
||||
@@ -311,12 +311,12 @@ if [ $FORCE_32BIT_CROSS_COMPILE != 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$COMPILATION_WITHOUT" != "0" ] && [ "$COMPILATION_WITHOUT" != "" ]; then
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MEGAGLEST_MAP_EDITOR=OFF -DBUILD_MEGAGLEST_MODEL_VIEWER=OFF"
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_ZETAGLEST_MAP_EDITOR=OFF -DBUILD_ZETAGLEST_MODEL_VIEWER=OFF"
|
||||
fi
|
||||
|
||||
if [ $MAKE_ONLY = 0 ]; then
|
||||
echo "Calling cmake with EXTRA_CMAKE_OPTIONS = ${EXTRA_CMAKE_OPTIONS} AND WANT_STATIC_LIBS = ${WANT_STATIC_LIBS}"
|
||||
cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBUILD_MEGAGLEST_TESTS=$BUILD_MEGAGLEST_TESTS -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../..
|
||||
cmake -DCMAKE_INSTALL_PREFIX='' -DWANT_DEV_OUTPATH=ON $WANT_STATIC_LIBS -DBUILD_ZETAGLEST_TESTS=$BUILD_ZETAGLEST_TESTS -DBREAKPAD_ROOT=$BREAKPAD_ROOT $EXTRA_CMAKE_OPTIONS ../../..
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 'ERROR: CMAKE failed.' >&2; exit 1
|
||||
fi
|
||||
|
@@ -37,7 +37,7 @@ include (InstallRequiredSystemLibraries)
|
||||
# Use bundle generator (OSX has 3 other options if you feel adventurous)
|
||||
SET(CPACK_GENERATOR "Bundle")
|
||||
SET(CPACK_BUNDLE_NAME "MegaGlest")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "MegaGlest-game-macos-${MEGAGLEST_VERSION}")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "MegaGlest-game-macos-${ZETAGLEST_VERSION}")
|
||||
SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macos/bundle_resources/MegaGlest.icns")
|
||||
SET(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/mk/macos/bundle_resources/MegaGlest.icns")
|
||||
SET(CPACK_BUNDLE_STARTUP_COMMAND "${PROJECT_SOURCE_DIR}/mk/macos/bundle_resources/MegaGlest.sh")
|
||||
|
@@ -191,7 +191,7 @@ if [ "$FORCE_EMBEDDED_LIBS" != "0" ] && [ "$FORCE_EMBEDDED_LIBS" != "" ]; then
|
||||
fi
|
||||
|
||||
if [ "$COMPILATION_WITHOUT" != "0" ] && [ "$COMPILATION_WITHOUT" != "" ]; then
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MEGAGLEST_MAP_EDITOR=OFF -DBUILD_MEGAGLEST_MODEL_VIEWER=OFF"
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_ZETAGLEST_MAP_EDITOR=OFF -DBUILD_ZETAGLEST_MODEL_VIEWER=OFF"
|
||||
fi
|
||||
|
||||
if [ "$MAKE_ONLY" -eq "0" ]; then
|
||||
@@ -200,7 +200,7 @@ if [ "$MAKE_ONLY" -eq "0" ]; then
|
||||
EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=''"
|
||||
if [ "$GCC_FORCED" -ne "1" ] || [ "$USE_XCODE" -eq "1" ]; then :
|
||||
#^ Remove this condition when it V will start working on gcc
|
||||
#EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_MEGAGLEST_TESTS=ON"
|
||||
#EXTRA_CMAKE_OPTIONS="${EXTRA_CMAKE_OPTIONS} -DBUILD_ZETAGLEST_TESTS=ON"
|
||||
#^ Uncomment when it will start working on clang
|
||||
else
|
||||
rm -f ../zetaglest_tests
|
||||
|
@@ -7,11 +7,11 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>MegaGlest</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>v${MEGAGLEST_VERSION}, © 2018 The ZetaGlest Team.</string>
|
||||
<string>v${ZETAGLEST_VERSION}, © 2018 The ZetaGlest Team.</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>MegaGlest</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.megaglest.v${MEGAGLEST_VERSION}</string>
|
||||
<string>org.megaglest.v${ZETAGLEST_VERSION}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@@ -4,7 +4,7 @@ SET(EXTERNAL_LIBS "")
|
||||
SET(TARGET_NAME "zetaglest_g3dviewer")
|
||||
SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
|
||||
|
||||
IF(BUILD_MEGAGLEST_MODEL_VIEWER)
|
||||
IF(BUILD_ZETAGLEST_MODEL_VIEWER)
|
||||
MESSAGE(STATUS "Will try to build ZetaGlest model viewer")
|
||||
|
||||
IF(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
@@ -187,7 +187,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
|
||||
ENDFOREACH(DIR)
|
||||
|
||||
IF(WANT_DEV_OUTPATH)
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${MEGAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${ZETAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
ENDIF()
|
||||
|
||||
SET(HELP2MAN_OUT_PATH ${EXECUTABLE_OUTPUT_PATH})
|
||||
@@ -234,20 +234,20 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER)
|
||||
# Installation of the program
|
||||
INSTALL(TARGETS
|
||||
${TARGET_NAME}
|
||||
DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_BIN_INSTALL_PATH})
|
||||
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${MEGAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "" AND NOT APPLE)
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${ZETAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "" AND NOT APPLE)
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${ZETAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
|
||||
# Installation of the program manpage file
|
||||
INSTALL(FILES
|
||||
"${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}"
|
||||
DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_MANPAGE_INSTALL_PATH})
|
||||
ENDIF()
|
||||
|
||||
# Installation of the program config and image files
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/shared/g3dviewer.ico"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@@ -5,7 +5,7 @@ SET(EXTERNAL_LIBS "")
|
||||
SET(TARGET_NAME "zetaglest")
|
||||
SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
|
||||
|
||||
IF(BUILD_MEGAGLEST)
|
||||
IF(BUILD_ZETAGLEST)
|
||||
MESSAGE(STATUS "Will try to build ZetaGlest game")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
@@ -112,8 +112,8 @@ IF(BUILD_MEGAGLEST)
|
||||
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${GLEW_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
IF(VLC_MIN_VERSION_MG)
|
||||
SET(LIBVLC_MIN_VERSION "${VLC_MIN_VERSION_MG}")
|
||||
IF(VLC_MIN_VERSION_ZG)
|
||||
SET(LIBVLC_MIN_VERSION "${VLC_MIN_VERSION_ZG}")
|
||||
ELSE()
|
||||
SET(LIBVLC_MIN_VERSION "1.1.0")
|
||||
ENDIF()
|
||||
@@ -233,26 +233,26 @@ IF(BUILD_MEGAGLEST)
|
||||
SET(GLEST_LIB_INCLUDE_DIRS ${GLEST_LIB_INCLUDE_DIRS} ${GLEST_LIB_INCLUDE_ROOT}platform/unix)
|
||||
ENDIF()
|
||||
|
||||
SET(MG_SOURCE_FILES "")
|
||||
SET(ZG_SOURCE_FILES "")
|
||||
|
||||
FOREACH(DIR IN LISTS DIRS_WITH_SRC)
|
||||
INCLUDE_DIRECTORIES( ${DIR} )
|
||||
|
||||
set(SRC_DIR_TO_GLOB ${DIR})
|
||||
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.cpp)
|
||||
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
SET(ZG_SOURCE_FILES ${ZG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.c)
|
||||
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
SET(ZG_SOURCE_FILES ${ZG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
FILE(GLOB INCLUDE_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.h)
|
||||
SET(MG_INCLUDE_FILES ${MG_INCLUDE_FILES} ${INCLUDE_FILES_FROM_THIS_DIR})
|
||||
SET(ZG_INCLUDE_FILES ${ZG_INCLUDE_FILES} ${INCLUDE_FILES_FROM_THIS_DIR})
|
||||
|
||||
IF(APPLE)
|
||||
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.mm)
|
||||
#MESSAGE(STATUS "SRC_FILES_FROM_THIS_DIR: ${SRC_FILES_FROM_THIS_DIR}")
|
||||
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
SET(ZG_SOURCE_FILES ${ZG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.m)
|
||||
#MESSAGE(STATUS "SRC_FILES_FROM_THIS_DIR: ${SRC_FILES_FROM_THIS_DIR}")
|
||||
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
SET(ZG_SOURCE_FILES ${ZG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
|
||||
ENDIF(APPLE)
|
||||
ENDFOREACH(DIR)
|
||||
|
||||
@@ -261,18 +261,18 @@ IF(BUILD_MEGAGLEST)
|
||||
ENDIF()
|
||||
|
||||
IF(WANT_DEV_OUTPATH)
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${MEGAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${ZETAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "***Note: The final output path for the ZetaGlest engine will be [${EXECUTABLE_OUTPUT_PATH}]")
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${MG_INCLUDE_FILES} PROPERTIES HEADER_FILE_ONLY 1)
|
||||
SET_SOURCE_FILES_PROPERTIES(${ZG_INCLUDE_FILES} PROPERTIES HEADER_FILE_ONLY 1)
|
||||
|
||||
ADD_EXECUTABLE(${TARGET_NAME} ${MG_SOURCE_FILES} ${MG_INCLUDE_FILES})
|
||||
ADD_EXECUTABLE(${TARGET_NAME} ${ZG_SOURCE_FILES} ${ZG_INCLUDE_FILES})
|
||||
|
||||
SET(MG_STREFLOP "")
|
||||
SET(ZG_STREFLOP "")
|
||||
IF(WANT_USE_STREFLOP AND NOT STREFLOP_FOUND)
|
||||
SET(MG_STREFLOP "streflop")
|
||||
SET(ZG_STREFLOP "streflop")
|
||||
ENDIF()
|
||||
|
||||
if(WANT_USE_GoogleBreakpad)
|
||||
@@ -289,12 +289,12 @@ IF(BUILD_MEGAGLEST)
|
||||
endif()
|
||||
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} stdc++ gcc odbc32 wsock32 winspool winmm shell32 comctl32 ctl3d32 advapi32 wsock32 opengl32 glu32 ole32 oleaut32 uuid mingw32 ddraw dsound dxguid ws2_32 iphlpapi wsock32 libogg libvorbis libvorbisfile zlib jpeg libpng xerces-c2_8_0 OpenAL32 libcurl winmm gdi32 opengl32 glu32 ${SDL_VERSION_NAME} ${SDL_VERSION_NAME}main lua5.1 ${MG_STREFLOP} libmegaglest stdc++ moldname mingwex msvcrt user32 kernel32)
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} stdc++ gcc odbc32 wsock32 winspool winmm shell32 comctl32 ctl3d32 advapi32 wsock32 opengl32 glu32 ole32 oleaut32 uuid mingw32 ddraw dsound dxguid ws2_32 iphlpapi wsock32 libogg libvorbis libvorbisfile zlib jpeg libpng xerces-c2_8_0 OpenAL32 libcurl winmm gdi32 opengl32 glu32 ${SDL_VERSION_NAME} ${SDL_VERSION_NAME}main lua5.1 ${ZG_STREFLOP} libmegaglest stdc++ moldname mingwex msvcrt user32 kernel32)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT WIN32)
|
||||
IF(WANT_USE_STREFLOP AND NOT STREFLOP_FOUND)
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${MG_STREFLOP})
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${ZG_STREFLOP})
|
||||
ENDIF()
|
||||
TARGET_LINK_LIBRARIES(${TARGET_NAME} libmegaglest)
|
||||
ENDIF()
|
||||
@@ -307,17 +307,17 @@ IF(BUILD_MEGAGLEST)
|
||||
|
||||
IF(EXISTS ${HELP2MAN})
|
||||
MESSAGE(STATUS "***-- Found help2man: ${HELP2MAN} about to build manpage in [${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}]")
|
||||
SET(MG_MANPAGE_DESCRIPTION "3D multi-player real time strategy game")
|
||||
SET(ZG_MANPAGE_DESCRIPTION "3D multi-player real time strategy game")
|
||||
|
||||
IF(EXISTS ${XVFB_EXEC})
|
||||
MESSAGE(STATUS "***-- Found xvfb-run: ${XVFB_EXEC} about to build manpage with it.")
|
||||
|
||||
add_custom_target(${TARGET_NAME_MANPAGE} ALL
|
||||
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name="${MG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
|
||||
COMMAND ${XVFB_EXEC} --auto-servernum --server-num=770 ${HELP2MAN} --name="${ZG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
|
||||
DEPENDS ${TARGET_NAME})
|
||||
ELSE()
|
||||
add_custom_target(${TARGET_NAME_MANPAGE} ALL
|
||||
COMMAND ${HELP2MAN} --name="${MG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
|
||||
COMMAND ${HELP2MAN} --name="${ZG_MANPAGE_DESCRIPTION}" --section=6 -N -o ${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE} ${HELP2MAN_OUT_PATH}${TARGET_NAME}
|
||||
DEPENDS ${TARGET_NAME})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@@ -329,57 +329,57 @@ IF(BUILD_MEGAGLEST)
|
||||
# Installation of the program
|
||||
INSTALL(TARGETS
|
||||
${TARGET_NAME}
|
||||
DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_BIN_INSTALL_PATH})
|
||||
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${MEGAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "")
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${ZETAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "")
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${ZETAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
|
||||
# Installation of the program manpage file
|
||||
INSTALL(FILES
|
||||
"${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}"
|
||||
DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_MANPAGE_INSTALL_PATH})
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
INSTALL(PROGRAMS
|
||||
"${PROJECT_SOURCE_DIR}/mk/linux/start_zetaglest_gameserver"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
ENDIF()
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/shared/glestkeys.ini"
|
||||
"${PROJECT_SOURCE_DIR}/mk/shared/servers.ini"
|
||||
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_DATA_INSTALL_PATH})
|
||||
IF(WIN32)
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/windows/glest.ini"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
ELSEIF(UNIX AND NOT APPLE)
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/linux/glest.ini"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
ELSEIF(UNIX AND APPLE)
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/macos/glest.ini"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
IF(WANT_SINGLE_INSTALL_DIRECTORY AND EXISTS "${PROJECT_SOURCE_DIR}/mk/macos/p7zip/")
|
||||
INSTALL(DIRECTORY
|
||||
"${PROJECT_SOURCE_DIR}/mk/macos/p7zip"
|
||||
DESTINATION ${MEGAGLEST_DATA_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_DATA_INSTALL_PATH})
|
||||
ENDIF()
|
||||
IF(WANT_SINGLE_INSTALL_DIRECTORY AND EXISTS "${PROJECT_SOURCE_DIR}/mk/macos/lib/")
|
||||
INSTALL(DIRECTORY
|
||||
"${PROJECT_SOURCE_DIR}/mk/macos/lib/"
|
||||
DESTINATION "${MEGAGLEST_DATA_INSTALL_PATH}/../../Frameworks/")
|
||||
DESTINATION "${ZETAGLEST_DATA_INSTALL_PATH}/../../Frameworks/")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/shared/zetaglest.ico"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
IF(UNIX AND APPLE AND NOT WANT_SINGLE_INSTALL_DIRECTORY)
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/macos/bundle_resources/MegaGlest.icns"
|
||||
DESTINATION ${MEGAGLEST_ICON_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_ICON_INSTALL_PATH})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@@ -4,7 +4,7 @@ SET(EXTERNAL_LIBS "")
|
||||
SET(TARGET_NAME "zetaglest_editor")
|
||||
SET(TARGET_NAME_MANPAGE "${TARGET_NAME}.6")
|
||||
|
||||
IF(BUILD_MEGAGLEST_MAP_EDITOR)
|
||||
IF(BUILD_ZETAGLEST_MAP_EDITOR)
|
||||
MESSAGE(STATUS "Will try to build ZetaGlest map editor")
|
||||
|
||||
IF(UNIX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
@@ -168,7 +168,7 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR)
|
||||
ENDFOREACH(DIR)
|
||||
|
||||
IF(WANT_DEV_OUTPATH)
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${MEGAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${ZETAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
ENDIF()
|
||||
|
||||
SET(HELP2MAN_OUT_PATH ${EXECUTABLE_OUTPUT_PATH})
|
||||
@@ -224,20 +224,20 @@ IF(BUILD_MEGAGLEST_MAP_EDITOR)
|
||||
# Installation of the program
|
||||
INSTALL(TARGETS
|
||||
${TARGET_NAME}
|
||||
DESTINATION ${MEGAGLEST_BIN_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_BIN_INSTALL_PATH})
|
||||
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${MEGAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "" AND NOT APPLE)
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
IF(EXISTS ${HELP2MAN} AND NOT "${ZETAGLEST_MANPAGE_INSTALL_PATH}" STREQUAL "" AND NOT APPLE)
|
||||
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${ZETAGLEST_MANPAGE_INSTALL_PATH}]")
|
||||
|
||||
# Installation of the program manpage file
|
||||
INSTALL(FILES
|
||||
"${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}"
|
||||
DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_MANPAGE_INSTALL_PATH})
|
||||
ENDIF()
|
||||
|
||||
# Installation of the program config and image files
|
||||
INSTALL(FILES
|
||||
"${PROJECT_SOURCE_DIR}/mk/shared/editor.ico"
|
||||
DESTINATION ${MEGAGLEST_INI_INSTALL_PATH})
|
||||
DESTINATION ${ZETAGLEST_INI_INSTALL_PATH})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@@ -45,7 +45,7 @@ ENDIF()
|
||||
SET(EXTERNAL_LIBS "")
|
||||
SET(TARGET_NAME "libmegaglest")
|
||||
|
||||
IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST)
|
||||
IF(BUILD_ZETAGLEST_MODEL_VIEWER OR BUILD_ZETAGLEST_MAP_EDITOR OR BUILD_ZETAGLEST)
|
||||
MESSAGE(STATUS "Will try to build MegaGlest shared library")
|
||||
|
||||
INCLUDE (CheckIncludeFiles)
|
||||
|
@@ -4,7 +4,7 @@
|
||||
SET(EXTERNAL_LIBS "")
|
||||
SET(TARGET_NAME "zetaglest_tests")
|
||||
|
||||
IF(BUILD_MEGAGLEST_TESTS)
|
||||
IF(BUILD_ZETAGLEST_TESTS)
|
||||
MESSAGE(STATUS "Will try to build ZetaGlest unit tests")
|
||||
|
||||
INCLUDE (CheckIncludeFiles)
|
||||
@@ -181,7 +181,7 @@ IF(BUILD_MEGAGLEST_TESTS)
|
||||
SET_SOURCE_FILES_PROPERTIES(${MG_INCLUDE_FILES} PROPERTIES HEADER_FILE_ONLY 1)
|
||||
|
||||
IF(WANT_DEV_OUTPATH)
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${MEGAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
SET(EXECUTABLE_OUTPUT_PATH "${ZETAGLEST_FRIENDLY_OUTPUT_PATH}")
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "EXTERNAL_LIBS = [${EXTERNAL_LIBS}]")
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# glexemel
|
||||
|
||||
IF(BUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS)
|
||||
IF(BUILD_ZETAGLEST_MODEL_IMPORT_EXPORT_TOOLS)
|
||||
MESSAGE(STATUS "Will try to build MegaGlest model import/export tools")
|
||||
|
||||
OPTION(WANT_DEV_OUTPATH "use developer friendly output paths" OFF)
|
||||
|
Reference in New Issue
Block a user