mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2024-11-10 06:42:14 +00:00
added wolfssl and updated curl to the windows build for now
This commit is contained in:
parent
956384e913
commit
fd4d153710
4 changed files with 128 additions and 36 deletions
19
CMake-MS-static-patch.txt
Normal file
19
CMake-MS-static-patch.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
#MSVC patch
|
||||
if(MSVC)
|
||||
message(STATUS "Patching MSVC build for static linking")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHsc /O2")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /EHa /W3")
|
||||
|
||||
set(CompilerFlags
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
)
|
||||
|
||||
foreach(CompilerFlag ${CompilerFlags})
|
||||
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
endforeach()
|
||||
endif()
|
137
CMakeLists.txt
137
CMakeLists.txt
|
@ -1,8 +1,9 @@
|
|||
include(ExternalProject)
|
||||
include(CheckIncludeFile)
|
||||
|
||||
set(LIBS_BINARYDIR_DIR ${PROJECT_BINARY_DIR}/libs)
|
||||
set(LIBS_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads)
|
||||
set(LIBS_BINARY_DIR ${PROJECT_BINARY_DIR}/libs)
|
||||
set(LIBS_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads/pgk)
|
||||
set(LIBS_DOWNLOAD_SRC_DIR ${PROJECT_BINARY_DIR}/downloads/src)
|
||||
|
||||
# note/FIXME/clarify:
|
||||
# when features are disabled this script is still
|
||||
|
@ -30,10 +31,50 @@ foreach (_variableName ${_variableNames})
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
if(FEATURE_SSL AND BUNDLED_WOLFSSL)
|
||||
message(STATUS "Configuring wolfSSL")
|
||||
|
||||
if(VSTUDIO)
|
||||
set(WOLFSSL_BUNDLED_LIBRARY optimized "${LIBS_BINARY_DIR}/wolfssl/Release/wolfssl${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${LIBS_BINARY_DIR}/wolfssl/Debug/wolfssl${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(VS_BUILD)
|
||||
set(WOLFSSL_BUNDLED_LIBRARY "${LIBS_BINARY_DIR}/wolfssl/lib/wolfssl${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
else()
|
||||
set(WOLFSSL_BUNDLED_LIBRARY "${LIBS_BINARY_DIR}/wolfssl/lib/libwolfssl${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(WOLFSSL_PATCH_COMMAND "${CMAKE_CURRENT_LIST_DIR}/patcher.bat" "${LIBS_DOWNLOAD_SRC_DIR}/wolfssl/CMakeLists.txt")
|
||||
else()
|
||||
set(WOLFSSL_PATCH_COMMAND "")
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(bundled_wolfssl
|
||||
DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}
|
||||
URL https://github.com/wolfSSL/wolfssl/archive/v4.6.0-stable.tar.gz
|
||||
URL_HASH MD5=99f09fce6739a6dcb7554d2c2588e4c1
|
||||
SOURCE_DIR "${LIBS_DOWNLOAD_SRC_DIR}/wolfssl"
|
||||
PATCH_COMMAND ${WOLFSSL_PATCH_COMMAND}
|
||||
BINARY_DIR ${LIBS_BINARY_DIR}/wolfssl
|
||||
BUILD_BYPRODUCTS ${WOLFSSL_BUNDLED_LIBRARY}
|
||||
PREFIX ${LIBS_BINARY_DIR}/wolfssl
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_OSX_DEPLOYMENT_TARGET="${CMAKE_OSX_DEPLOYMENT_TARGET}"
|
||||
-DWOLFSSL_EXAMPLES=OFF -DWOLFSSL_CRYPT_TESTS=OFF
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBS_BINARY_DIR}/wolfssl
|
||||
)
|
||||
set(WOLFSSL_BUNDLED_INCLUDE_DIR "${LIBS_BINARY_DIR}/wolfssl/include" "${LIBS_BINARY_DIR}/wolfssl/include/wolfssl")
|
||||
set_target_properties(bundled_wolfssl PROPERTIES FOLDER ${BUNDLED_TARGETS_FOLDER})
|
||||
else()
|
||||
add_custom_target(bundled_wolfssl)
|
||||
set_target_properties(bundled_wolfssl PROPERTIES FOLDER ${BUNDLED_TARGETS_FOLDER})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
# moved for now until linux BUNDLED_OPENSSL is done
|
||||
if(BUNDLED_OPENSSL)
|
||||
if(FEATURE_SSL AND BUNDLED_OPENSSL)
|
||||
find_program(NASM_EXECUTABLE nasm)
|
||||
if(NOT NASM_EXECUTABLE)
|
||||
message(FATAL_ERROR "NASM not found")
|
||||
|
@ -56,8 +97,8 @@ if(WIN32)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(BUNDLED_OPENSSL AND (BUILD_CLIENT OR BUILD_SERVER))
|
||||
set(OPENSSL_PREFIX "${CMAKE_BINARY_DIR}/openssl/build")
|
||||
if(FEATURE_SSL AND BUNDLED_OPENSSL AND (BUILD_CLIENT OR BUILD_SERVER))
|
||||
set(OPENSSL_PREFIX "${LIBS_DOWNLOAD_SRC_DIR}/openssl/build")
|
||||
set(OPENSSL_CONFIGURE "${PERL_EXECUTABLE}" Configure "${openssl_plat}" "--prefix=${OPENSSL_PREFIX}" "--openssldir=${OPENSSL_PREFIX}" no-shared no-unit-test -static)
|
||||
set(OPENSSL_BUILD nmake)
|
||||
set(OPENSSL_INSTALL nmake install)
|
||||
|
@ -66,9 +107,9 @@ if(WIN32)
|
|||
# Use github archive instead of the one hosted on openssl.org because of CMake bug #13251
|
||||
#URL_MD5 "76766e98997660138cdaf13a187bd234"
|
||||
#GIT_REPOSITORY "https://github.com/openssl/openssl.git"
|
||||
DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}/openssl
|
||||
DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}
|
||||
URL https://github.com/openssl/openssl/archive/OpenSSL_1_1_1g.tar.gz
|
||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/openssl"
|
||||
SOURCE_DIR "${LIBS_DOWNLOAD_SRC_DIR}/openssl"
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND ${OPENSSL_CONFIGURE}
|
||||
BUILD_COMMAND ${OPENSSL_BUILD}
|
||||
|
@ -86,7 +127,7 @@ if(WIN32)
|
|||
# Build bundled cURL library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_CURL AND (BUILD_CLIENT OR BUILD_SERVER))
|
||||
set(binary_dir "${LIBS_BINARYDIR_DIR}/curl")
|
||||
set(binary_dir "${LIBS_BINARY_DIR}/curl")
|
||||
if(VSTUDIO)
|
||||
set(CURL_BUNDLED_LIBRARY optimized "${binary_dir}/lib/Release/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${binary_dir}/lib/Debug/libcurl-d${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(MINGW OR VS_BUILD)
|
||||
|
@ -95,22 +136,50 @@ if(WIN32)
|
|||
set(CURL_BUNDLED_LIBRARY "${binary_dir}/libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif(VSTUDIO)
|
||||
|
||||
# -DHTTP_ONLY=1
|
||||
ExternalProject_Add(bundled_curl
|
||||
DEPENDS bundled_openssl
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/curl
|
||||
BINARY_DIR ${binary_dir}
|
||||
BUILD_BYPRODUCTS ${CURL_BUNDLED_LIBRARY}
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
set(CURL_CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DBUILD_CURL_EXE=0 -DBUILD_SHARED_LIBS=0 -DENABLE_ARES=0 -DENABLE_THREADED_RESOLVER=1 -DENABLE_DEBUG=0
|
||||
-DENABLE_CURLDEBUG=0 -DBUILD_TESTING=0 -DENABLE_IPV6=1 -DENABLE_MANUAL=0 -DCMAKE_USE_LIBSSH2=0
|
||||
-DUSE_NGHTTP2=0 -DCURL_WINDOWS_SSPI=0 -DCURL_ZLIB=1 -DCMAKE_USE_GSSAPI=0
|
||||
-DUSE_NGHTTP2=0 -DCURL_WINDOWS_SSPI=0 -DCURL_ZLIB=AUTO -DCMAKE_USE_GSSAPI=0
|
||||
-DCURL_DISABLE_LDAP=1 -DCURL_DISABLE_LDAPS=1 -DCURL_DISABLE_TELNET=1 -DCURL_DISABLE_DICT=1
|
||||
-DCURL_DISABLE_FILE=1 -DCURL_DISABLE_TFTP=1 -DCURL_DISABLE_RTSP=1 -DCURL_DISABLE_POP3=1 -DCURL_DISABLE_IMAP=1
|
||||
-DCURL_DISABLE_SMTP=1 -DCURL_DISABLE_GOPHER=1
|
||||
-DOPENSSL_ROOT_DIR=${OPENSSL_PREFIX} -DCMAKE_USE_OPENSSL=${FEATURE_OPENSSL}
|
||||
-DENABLE_UNIX_SOCKETS=1 -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/curl
|
||||
-DCURL_DISABLE_FILE=1 -DCURL_DISABLE_TFTP=1 -DCURL_DISABLE_RTSP=1 -DCURL_DISABLE_POP3=1
|
||||
-DCURL_DISABLE_IMAP=1 -DCURL_DISABLE_SMTP=1 -DCURL_DISABLE_GOPHER=1
|
||||
-DCURL_STATIC_CRT=1 -DENABLE_UNIX_SOCKETS=1
|
||||
-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/curl)
|
||||
|
||||
if(FEATURE_SSL)
|
||||
if(BUNDLED_WOLFSSL)
|
||||
include(CheckTypeSize)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
|
||||
list(APPEND CURL_CMAKE_ARGS
|
||||
-DCMAKE_C_FLAGS=-DSIZEOF_LONG_LONG=${SIZEOF_LONG_LONG}
|
||||
-DCMAKE_USE_OPENSSL=OFF -DCURL_DISABLE_CRYPTO_AUTH=ON
|
||||
-DCMAKE_USE_WOLFSSL=ON
|
||||
-DCMAKE_LIBRARY_PATH=${LIBS_BINARY_DIR}/wolfssl
|
||||
-DWolfSSL_INCLUDE_DIR=${WOLFSSL_BUNDLED_INCLUDE_DIR}
|
||||
)
|
||||
elseif(BUNDLED_OPENSSL)
|
||||
list(APPEND CURL_CMAKE_ARGS -DOPENSSL_ROOT_DIR=${OPENSSL_PREFIX} -DCMAKE_USE_OPENSSL=ON)
|
||||
else()
|
||||
list(APPEND CURL_CMAKE_ARGS -DCMAKE_USE_OPENSSL=ON)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND CURL_CMAKE_ARGS -DCMAKE_USE_OPENSSL=OFF)
|
||||
endif()
|
||||
|
||||
# -DHTTP_ONLY=1
|
||||
ExternalProject_Add(bundled_curl
|
||||
DEPENDS bundled_wolfssl bundled_openssl
|
||||
DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}
|
||||
URL https://github.com/curl/curl/archive/curl-7_74_0.tar.gz
|
||||
URL_HASH MD5=f9eb1ef3867584da7c8dc5f57ed4d95f
|
||||
# SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/curl
|
||||
SOURCE_DIR "${LIBS_DOWNLOAD_SRC_DIR}/curl"
|
||||
BINARY_DIR ${binary_dir}
|
||||
BUILD_BYPRODUCTS ${CURL_BUNDLED_LIBRARY}
|
||||
CMAKE_ARGS ${CURL_CMAKE_ARGS}
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
|
@ -283,7 +352,7 @@ if(WIN32)
|
|||
# Build bundled OpenAL library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_OPENAL AND BUILD_CLIENT)
|
||||
set(binary_dir "${LIBS_BINARYDIR_DIR}/openal")
|
||||
set(binary_dir "${LIBS_BINARY_DIR}/openal")
|
||||
if(VSTUDIO)
|
||||
set(OPENAL_BUNDLED_LIBRARIES optimized "${binary_dir}/Release/OpenAL32${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${binary_dir}/Debug/OpenAL32${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(VS_BUILD)
|
||||
|
@ -505,7 +574,7 @@ elseif(UNIX)
|
|||
if(BUNDLED_OPENAL AND BUILD_CLIENT)
|
||||
ExternalProject_Add(bundled_openal
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/openal
|
||||
BINARY_DIR ${LIBS_BINARYDIR_DIR}/openal
|
||||
BINARY_DIR ${LIBS_BINARY_DIR}/openal
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/openal
|
||||
|
@ -536,9 +605,9 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
|
|||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Darwin" OR WIN32)
|
||||
set(SDL32_BUNDLED_LIBRARIES optimized "${LIBS_BINARYDIR_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${LIBS_BINARYDIR_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2maind${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set(SDL32_BUNDLED_LIBRARIES optimized "${LIBS_BINARY_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${LIBS_BINARY_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2maind${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
set(SDL32_BUNDLED_LIBRARIES ${SDL32_BUNDLED_LIBRARIES} optimized "${LIBS_BINARYDIR_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${LIBS_BINARYDIR_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2d${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set(SDL32_BUNDLED_LIBRARIES ${SDL32_BUNDLED_LIBRARIES} optimized "${LIBS_BINARY_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${LIBS_BINARY_DIR}/sdl2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2d${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
||||
set(SDL_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DCMAKE_OSX_DEPLOYMENT_TARGET="${CMAKE_OSX_DEPLOYMENT_TARGET}"
|
||||
|
@ -546,7 +615,7 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
|
|||
-DVIDEO_DUMMY=OFF -DVIDEO_OPENGL=ON -DVIDEO_OPENGLES=${SDL_WITH_GLES} -DVIDEO_VULKAN=OFF -DVIDEO_METAL=OFF
|
||||
-DVIDEO_KMSDRM=OFF -DVIDEO_WAYLAND=OFF -DVIDEO_X11_XINPUT=OFF
|
||||
-DSDL_SHARED=OFF -DFORCE_STATIC_VCRT=ON -DSNDIO=OFF -DHAVE_LIBC=ON
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBS_BINARYDIR_DIR}/sdl2)
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBS_BINARY_DIR}/sdl2)
|
||||
|
||||
# Bye bye X11
|
||||
if(APPLE)
|
||||
|
@ -555,17 +624,17 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
|
|||
|
||||
ExternalProject_Add(bundled_sdl
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/sdl2
|
||||
# DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}/sdl2
|
||||
# DOWNLOAD_DIR ${LIBS_DOWNLOAD_DIR}
|
||||
# URL https://www.libsdl.org/release/SDL2-2.0.12.tar.gz
|
||||
BINARY_DIR ${LIBS_BINARYDIR_DIR}/sdl2
|
||||
BINARY_DIR ${LIBS_BINARY_DIR}/sdl2
|
||||
BUILD_BYPRODUCTS ${SDL32_BUNDLED_LIBRARIES}
|
||||
CMAKE_ARGS ${SDL_CMAKE_ARGS}
|
||||
PREFIX ${LIBS_BINARYDIR_DIR}/sdl2
|
||||
PREFIX ${LIBS_BINARY_DIR}/sdl2
|
||||
)
|
||||
|
||||
#ExternalProject_Get_Property(bundled_sdl binary_dir)
|
||||
|
||||
set(SDL32_BUNDLED_INCLUDE_DIR "${LIBS_BINARYDIR_DIR}/sdl2/include")
|
||||
set(SDL32_BUNDLED_INCLUDE_DIR "${LIBS_BINARY_DIR}/sdl2/include")
|
||||
set_target_properties(bundled_sdl PROPERTIES FOLDER ${BUNDLED_TARGETS_FOLDER})
|
||||
endif()
|
||||
|
||||
|
@ -660,7 +729,7 @@ if(BUNDLED_JPEG AND BUILD_CLIENT)
|
|||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
check_include_file(stdlib.h HAVE_STDLIB_H)
|
||||
|
||||
set(binary_dir "${LIBS_BINARYDIR_DIR}/jpegturbo")
|
||||
set(binary_dir "${LIBS_BINARY_DIR}/jpegturbo")
|
||||
if(VSTUDIO)
|
||||
set(JPEG_BUNDLED_LIBRARIES optimized "${binary_dir}/Release/turbojpeg-static${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${binary_dir}/Debug/turbojpeg-static${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(VS_BUILD)
|
||||
|
@ -683,7 +752,7 @@ if(BUNDLED_JPEG AND BUILD_CLIENT)
|
|||
|
||||
ExternalProject_Add(bundled_jpeg
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/jpegturbo
|
||||
BINARY_DIR ${LIBS_BINARYDIR_DIR}/jpegturbo
|
||||
BINARY_DIR ${LIBS_BINARY_DIR}/jpegturbo
|
||||
BUILD_BYPRODUCTS ${JPEG_BUNDLED_LIBRARIES}
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
|
@ -704,7 +773,7 @@ endif()
|
|||
# Build bundled PNG library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_PNG AND BUILD_CLIENT)
|
||||
set(binary_dir "${LIBS_BINARYDIR_DIR}/libpng")
|
||||
set(binary_dir "${LIBS_BINARY_DIR}/libpng")
|
||||
if(VSTUDIO)
|
||||
set(PNG_BUNDLED_LIBRARIES optimized "${binary_dir}/Release/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${binary_dir}/Debug/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(VS_BUILD)
|
||||
|
@ -719,7 +788,7 @@ if(BUNDLED_PNG AND BUILD_CLIENT)
|
|||
|
||||
ExternalProject_Add(bundled_png
|
||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/libpng
|
||||
BINARY_DIR ${LIBS_BINARYDIR_DIR}/libpng
|
||||
BINARY_DIR ${LIBS_BINARY_DIR}/libpng
|
||||
BUILD_BYPRODUCTS ${PNG_BUNDLED_LIBRARIES}
|
||||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
|
@ -738,7 +807,7 @@ endif()
|
|||
# Build bundled Freetype library
|
||||
#-----------------------------------------------------------------
|
||||
if(BUNDLED_FREETYPE AND BUILD_CLIENT)
|
||||
set(binary_dir "${LIBS_BINARYDIR_DIR}/freetype")
|
||||
set(binary_dir "${LIBS_BINARY_DIR}/freetype")
|
||||
if(VSTUDIO)
|
||||
set(BUNDLED_FREETYPE_LIBRARIES optimized "${binary_dir}/Release/freetype${CMAKE_STATIC_LIBRARY_SUFFIX}" debug "${binary_dir}/Debug/freetype${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(VS_BUILD)
|
||||
|
|
|
@ -395,7 +395,7 @@ if(MSVC)
|
|||
foreach(CompilerFlag ${CompilerFlags})
|
||||
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
endforeach()
|
||||
endif(MSVC)
|
||||
endif()
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
list(APPEND BASE_SRCS builds/mac/freetype-Info.plist)
|
||||
|
|
4
patcher.bat
Normal file
4
patcher.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@ECHO OFF
|
||||
setlocal
|
||||
cd /d %~dp0
|
||||
type CMake-MS-static-patch.txt >> %1
|
Loading…
Reference in a new issue