Skip to content

Commit

Permalink
revert now-unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Aug 17, 2022
1 parent d4e7d21 commit 7782d06
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED( VERSION 3.7.2)
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.2 )
PROJECT( MegaGlest )

#SET(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down Expand Up @@ -137,7 +137,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
# ENDIF()
ENDIF()

#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
#MESSAGE(STATUS "*TEST: Checking for max SSE LEVEL [${FORCE_MAX_SSE_LEVEL}]")

OPTION(FORCE_STREFLOP_SOFTWRAPPER "Set the streflop library to be forced to use the software emulator" OFF)
Expand Down Expand Up @@ -230,7 +230,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
include(FindGit)

IF(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git/")
SET(HAS_GIT "TRUE")
SET(HAS_GIT "TRUE")
MESSAGE(STATUS "Found GIT and using GIT version stamping...")

# Get the current commit SHA1
Expand Down Expand Up @@ -320,7 +320,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW)
ENDIF()
SET(CMAKE_CXX_FLAGS_${MG_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${MG_BUILD_TYPE}} ${CUSTOM_INSTALL_PATHS_VALUES}")

# We do some funky character escaping to get the right stuff written out to
# 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}}")

Expand Down
18 changes: 9 additions & 9 deletions source/glest_game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ IF(BUILD_MEGAGLEST)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/zlib-1.2.5)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/curl-7.21.3/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/${SDL_WINDOWS_DIR_DINC}/include)

link_directories(${PROJECT_SOURCE_DIR}/source/win32_deps/lib)
link_directories(${PROJECT_SOURCE_DIR}/source/win32_deps/xerces-c-src_2_8_0/lib)
ENDIF()
Expand Down Expand Up @@ -83,15 +83,15 @@ IF(BUILD_MEGAGLEST)
ENDIF()

IF(WANT_USE_OpenSSL)
include(FindOpenSSL)
FIND_PACKAGE(OpenSSL)
IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
ELSE()
MESSAGE(STATUS "**NOTE: OpenSSL is usually not required.")
ENDIF()
ENDIF()

include(FindCURL)
FIND_PACKAGE(CURL REQUIRED)
INCLUDE(${CMAKE_SOURCE_DIR}/mk/cmake/Modules/CurlGetConfig.cmake)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
IF(UNIX)
Expand Down Expand Up @@ -232,7 +232,7 @@ IF(BUILD_MEGAGLEST)
ENDIF()

SET(MG_SOURCE_FILES "")

FOREACH(DIR IN LISTS DIRS_WITH_SRC)
INCLUDE_DIRECTORIES( ${DIR} )

Expand Down Expand Up @@ -329,18 +329,18 @@ IF(BUILD_MEGAGLEST)

# Requires an install prefix for the items below to work
IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "")
MESSAGE(STATUS "**Source package INSTALL TRIGGERED [${PROJECT_SOURCE_DIR}]")
MESSAGE(STATUS "**Source package INSTALL TRIGGERED [${PROJECT_SOURCE_DIR}]")

# Installation of the program
INSTALL(TARGETS
${TARGET_NAME}
INSTALL(TARGETS
${TARGET_NAME}
DESTINATION ${MEGAGLEST_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}]")
MESSAGE(STATUS "**NOTE: Will Install manpage [${TARGET_NAME_MANPAGE}] to [${MEGAGLEST_MANPAGE_INSTALL_PATH}]")

# Installation of the program manpage file
INSTALL(FILES
INSTALL(FILES
"${HELP2MAN_OUT_PATH}${TARGET_NAME_MANPAGE}"
DESTINATION ${MEGAGLEST_MANPAGE_INSTALL_PATH})
ENDIF()
Expand Down
30 changes: 16 additions & 14 deletions source/shared_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/curl-7.21.3/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/${SDL_WINDOWS_DIR_DINC}/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/win32_deps/wxWidgets-2.8.10/include)

link_directories(${PROJECT_SOURCE_DIR}/source/win32_deps/lib)
link_directories(${PROJECT_SOURCE_DIR}/source/win32_deps/xerces-c-src_2_8_0/lib)
link_directories(${PROJECT_SOURCE_DIR}/source/win32_deps/wxWidgets-2.8.10/lib)
Expand All @@ -79,22 +79,24 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
ENDIF()

IF(WANT_USE_OpenSSL)
include(FindOpenSSL)
FIND_PACKAGE(OpenSSL)
IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENSSL_LIBRARIES})
ELSE()
MESSAGE(STATUS "**NOTE: OpenSSL is usually not required.")
ENDIF()
ENDIF()

include(FindCURL)
FIND_PACKAGE(CURL REQUIRED)
INCLUDE(${CMAKE_SOURCE_DIR}/mk/cmake/Modules/CurlGetConfig.cmake)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
IF(UNIX)
IF(NOT OPENSSL_FOUND)
# default
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
ELSE()
# mageia
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
ENDIF()
ENDIF()

Expand Down Expand Up @@ -156,7 +158,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(HAVE_FONTCONFIG 1)
ADD_DEFINITIONS(-DHAVE_FONTCONFIG)

INCLUDE_DIRECTORIES( ${FONTCONFIG_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${FONTCONFIG_INCLUDE_DIR} )
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${FONTCONFIG_LIBRARIES} )
ENDIF(FONTCONFIG_FOUND)
ENDIF()
Expand Down Expand Up @@ -260,12 +262,12 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST

SET(DIRS_WITH_SRC
compression
feathery_ftp
feathery_ftp
glew
graphics
graphics/gl
lua
map
map
platform/common
sound
sound/openal
Expand All @@ -279,7 +281,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
streflop/libm_flt32_source
streflop/softfloat)
ENDIF()

IF(FORCE_EMBEDDED_LIBS)
SET(FORCE_USE_EMBEDDED_Miniupnpc ON)
ELSE()
Expand Down Expand Up @@ -344,7 +346,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/posix)
SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} platform/unix)
ENDIF()

SET(MG_INCLUDES_ROOT "include/")
SET(MG_SOURCES_ROOT "sources/")
SET(MG_INCLUDE_FILES "")
Expand Down Expand Up @@ -425,7 +427,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/shared_lib/sources/platform/${SDL_VERSION_SNAME}/window_gl.cpp)
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/win32_deps/src/glprocs.c)
ENDIF()

FOREACH(DIR IN LISTS DIRS_WITH_SRC)
set(INCLUDE_DIR_TO_GLOB ${MG_INCLUDES_ROOT}${DIR})
INCLUDE_DIRECTORIES( ${INCLUDE_DIR_TO_GLOB} )
Expand All @@ -441,7 +443,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.cpp)
#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(SRC_DIR_TO_GLOB ${MG_SOURCES_ROOT}${DIR})
#MESSAGE(STATUS "SRC_DIR_TO_GLOB: ${SRC_DIR_TO_GLOB}")
FILE(GLOB SRC_FILES_FROM_THIS_DIR ${SRC_DIR_TO_GLOB}/*.c)
Expand All @@ -454,7 +456,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(MG_SOURCE_FILES ${MG_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(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${SRC_FILES_FROM_THIS_DIR})
ENDIF(APPLE)
ENDFOREACH(DIR)

Expand All @@ -470,9 +472,9 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(PLATFORM_SPECIFIC_DEFINES "-DX11_AVAILABLE -DHAVE_SYS_IOCTL_H")
ENDIF()

SET_SOURCE_FILES_PROPERTIES(${MG_SOURCE_FILES} PROPERTIES COMPILE_FLAGS
SET_SOURCE_FILES_PROPERTIES(${MG_SOURCE_FILES} PROPERTIES COMPILE_FLAGS
"${PLATFORM_SPECIFIC_DEFINES} ${STREFLOP_PROPERTIES} ${CXXFLAGS}")

SET_SOURCE_FILES_PROPERTIES(${MG_INCLUDE_FILES} PROPERTIES HEADER_FILE_ONLY 1)

IF(NOT WIN32)
Expand Down

0 comments on commit 7782d06

Please sign in to comment.