patch libsodium for windows the cmake way

This commit is contained in:
Linux User 2020-05-29 23:37:12 -05:00 committed by Rick V
parent adf253e800
commit e6bcbf47b4
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465
4 changed files with 4 additions and 3 deletions

View File

@ -37,6 +37,7 @@ ExternalProject_Add(libsodium_external
URL ${LIBSODIUM_URL}
URL_HASH ${LIBSODIUM_HASH}
CONFIGURE_COMMAND ${SODIUM_CONFIGURE}
PATCH_COMMAND patch -p1 -d <SOURCE_DIR> < ${CMAKE_SOURCE_DIR}/win32-setup/libsodium-1.0.18-win32.patch
BUILD_COMMAND make -j${PROCESSOR_COUNT}
INSTALL_COMMAND ${MAKE}
BUILD_BYPRODUCTS ${LIBSODIUM_PREFIX}/lib/libsodium.a ${LIBSODIUM_PREFIX}/include

View File

@ -41,7 +41,7 @@ if (STATIC_LINK)
if (WOW64_CROSS_COMPILE)
link_libraries( -static-libstdc++ -static-libgcc -static -Wl,--image-base=0x10000,--large-address-aware,--dynamicbase,--pic-executable,-e,_mainCRTStartup,--subsystem,console:5.00 )
else()
link_libraries( -static-libstdc++ -static-libgcc -static -Wl,--image-base=0x10000,--dynamicbase,--pic-executable,-e,_mainCRTStartup )
link_libraries( -static-libstdc++ -static-libgcc -static -Wl,--image-base=0x10000,--dynamicbase,--pic-executable,-e,mainCRTStartup )
endif()
endif()

View File

@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX i686-w64-mingw32)
set(TOOLCHAIN_SUFFIX "-posix")
set(WOW64_CROSS_COMPILE ON)
set(LIBSODIUM_CROSS_TARGET i686-w64-mingw32)
set(CROSS_TARGET i686-w64-mingw32)
set(TOOLCHAIN_PATHS
/usr/${TOOLCHAIN_PREFIX}

View File

@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
set(TOOLCHAIN_SUFFIX "-posix")
set(WIN64_CROSS_COMPILE ON)
set(LIBSODIUM_CROSS_TARGET x86_64-w64-mingw32)
set(CROSS_TARGET x86_64-w64-mingw32)
set(TOOLCHAIN_PATHS
/usr/${TOOLCHAIN_PREFIX}