updated modules: LUA, GLEW

This commit is contained in:
filux
2015-09-22 00:52:09 +02:00
parent ca5cd29ef1
commit 4ad684deaf
15 changed files with 319 additions and 280 deletions

View File

@@ -18,11 +18,12 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
INCLUDE (CheckIncludeFiles)
#Game options
option(WANT_STATIC_LIBS "builds as many static libs as possible" OFF)
option(ENABLE_FRIBIDI "Enable FriBIDi support" ON)
option(FORCE_LUA_5_1 "Force looking for LUA 5.1" OFF)
option(FORCE_LUA_5_2 "Force looking for LUA 5.2" OFF)
option(FORCE_LUA_5_3 "Force looking for LUA 5.3" OFF)
IF(NOT FORCE_LUA_VERSION)
SET(FORCE_LUA_VERSION "OFF" CACHE STRING "Try to force some specific lua version (for example older). On the list may be also not existing versions yet for future use." FORCE)
ENDIF()
SET_PROPERTY(CACHE FORCE_LUA_VERSION PROPERTY STRINGS OFF 5.5 5.4 5.3 5.2 5.1 5.0)
SET(ALL_LUA_VERSIONS_IN_ORDER 5.3 5.2 5.1 5.4 5.5 5.0)
IF(WIN32)
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}
@@ -52,6 +53,9 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/platform/win32)
ENDIF()
IF(WANT_STATIC_LIBS)
OPTION(OPENSSL_USE_STATIC_LIBS "Set to ON to link your project with static library (instead of DLL)." ON)
ENDIF()
FIND_PACKAGE(OpenSSL)
IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
@@ -67,35 +71,9 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
ELSE()
# mageia
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES} ssl)
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES} ${OPENSSL_SSL_LIBRARY})
ENDIF()
ENDIF()
# check libcurl version #
IF(WIN32)
file (READ ${PROJECT_SOURCE_DIR}${CURL_INCLUDE_DIR}/curl/curlver.h CURL_VERSION_H_CONTENTS)
ELSE()
file (READ ${CURL_INCLUDE_DIR}/curl/curlver.h CURL_VERSION_H_CONTENTS)
ENDIF()
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)" LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ})
string (REGEX MATCH "LIBCURL_VERSION_MINOR[ \t]+([0-9]+)" LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI})
string (REGEX MATCH "LIBCURL_VERSION_PATCH[ \t]+([0-9]+)" LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS})
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT})
set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ})
set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI})
set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT})
include_regular_expression("^.*$")
# Setup package meta-data
set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
message(STATUS "curl version=[${CURL_VERSION}]")
#IF( ${CURL_VERSION} VERSION_LESS 7.21.0)
IF( ${CURL_VERSION} VERSION_LESS 7.16.4)
message(STATUS "(please visit http://curl.haxx.se/libcurl/ to find a newer version)")
#message(FATAL_ERROR " CURL version = [${CURL_VERSION}] we require AT LEAST [7.21.0]")
message(FATAL_ERROR " CURL version = [${CURL_VERSION}] we require AT LEAST [7.16.4]")
ENDIF()
FIND_PACKAGE(${SDL_VERSION_NAME} REQUIRED)
INCLUDE_DIRECTORIES(${${SDL_VERSION_NAME}_INCLUDE_DIR})
@@ -220,9 +198,9 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
ENDIF()
FIND_PACKAGE(GLEW REQUIRED)
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIRS})
IF(UNIX)
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${GLEW_LIBRARY})
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${GLEW_LIBRARIES})
ENDIF()
SET(LIBVLC_MIN_VERSION "1.1.0")
@@ -274,7 +252,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
#SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES})
else()
message("** WARNING: Could not find GoogleBreakpad. Disabling GoogleBreakpad support.")
message(STATUS "** WARNING: Could not find GoogleBreakpad. Disabling GoogleBreakpad support.")
endif()
#########################################################################################