mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-27 08:40:41 +08:00
Merge branch 'build_using_openssl_binaries'
This commit is contained in:
@@ -21,11 +21,17 @@ if (SYNERGY_ADD_HEADERS)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(OPENSSL_INCLUDE ../../../../ext/openssl/inc32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(OPENSSL_PLAT_DIR openssl-win64)
|
||||
else()
|
||||
set(OPENSSL_PLAT_DIR openssl-win32)
|
||||
endif()
|
||||
set(OPENSSL_INCLUDE ../../../../ext/${OPENSSL_PLAT_DIR}/inc32)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set(OPENSSL_INCLUDE ../../../../ext/openssl/include)
|
||||
set(OPENSSL_PLAT_DIR openssl-osx)
|
||||
set(OPENSSL_INCLUDE ../../../../ext/${OPENSSL_PLAT_DIR}/include)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
@@ -37,21 +43,21 @@ include_directories(
|
||||
add_library(ns SHARED ${sources})
|
||||
|
||||
if (WIN32)
|
||||
set(OPENSSL_LIBS
|
||||
${CMAKE_SOURCE_DIR}/ext/openssl/out32dll/libeay32.lib
|
||||
${CMAKE_SOURCE_DIR}/ext/openssl/out32dll/ssleay32.lib
|
||||
)
|
||||
set(OPENSSL_LIBS
|
||||
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/out32dll/libeay32.lib
|
||||
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/out32dll/ssleay32.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
if (APPLE)
|
||||
set(OPENSSL_LIBS
|
||||
${CMAKE_SOURCE_DIR}/ext/openssl/libssl.a
|
||||
${CMAKE_SOURCE_DIR}/ext/openssl/libcrypto.a
|
||||
)
|
||||
else()
|
||||
set(OPENSSL_LIBS ssl crypto)
|
||||
endif()
|
||||
if (APPLE)
|
||||
set(OPENSSL_LIBS
|
||||
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libssl.a
|
||||
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libcrypto.a
|
||||
)
|
||||
else()
|
||||
set(OPENSSL_LIBS ssl crypto)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(ns
|
||||
@@ -69,14 +75,14 @@ if (WIN32)
|
||||
TARGET ns
|
||||
POST_BUILD
|
||||
COMMAND xcopy /Y /Q
|
||||
..\\..\\..\\..\\..\\ext\\openssl\\out32dll\\libeay32.*
|
||||
..\\..\\..\\..\\..\\ext\\${OPENSSL_PLAT_DIR}\\out32dll\\libeay32.*
|
||||
..\\..\\..\\..\\..\\bin\\${CMAKE_CFG_INTDIR}
|
||||
)
|
||||
add_custom_command(
|
||||
TARGET ns
|
||||
POST_BUILD
|
||||
COMMAND xcopy /Y /Q
|
||||
..\\..\\..\\..\\..\\ext\\openssl\\out32dll\\ssleay32.*
|
||||
..\\..\\..\\..\\..\\ext\\${OPENSSL_PLAT_DIR}\\out32dll\\ssleay32.*
|
||||
..\\..\\..\\..\\..\\bin\\${CMAKE_CFG_INTDIR}
|
||||
)
|
||||
else()
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
<?define ProgramFilesFolder="ProgramFiles64Folder" ?>
|
||||
<?define PlatformSimpleName="64-bit" ?>
|
||||
<?define UpgradeGuid="$(var.UpgradeGuid64)" ?>
|
||||
<?define var.OpensslPath="openssl-win64" ?>
|
||||
<?else?>
|
||||
<?define ProgramFilesFolder="ProgramFilesFolder" ?>
|
||||
<?define PlatformSimpleName="32-bit" ?>
|
||||
<?define UpgradeGuid="$(var.UpgradeGuid32)" ?>
|
||||
<?define var.OpensslPath="openssl-win32" ?>
|
||||
<?endif?>
|
||||
|
||||
<?define CRT="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC100_CRT_$(var.Platform).msm" ?>
|
||||
|
||||
@@ -124,9 +124,9 @@
|
||||
|
||||
<ComponentGroup Id="OpenSslComponents" Directory="OpenSslDir">
|
||||
<Component Id="OpenSsl" Guid="92648F77-65A6-4B16-AC59-A1F37BD341B1">
|
||||
<File Source="$(var.ExtPath)/openssl/out32dll/libeay32.dll" Id="OpenSslDll1" />
|
||||
<File Source="$(var.ExtPath)/openssl/out32dll/ssleay32.dll" Id="OpenSslDll2" />
|
||||
<File Source="$(var.ExtPath)/openssl/out32dll/openssl.exe" />
|
||||
<File Source="$(var.ExtPath)/$(var.OpensslPath)/out32dll/libeay32.dll" Id="OpenSslDll1" />
|
||||
<File Source="$(var.ExtPath)/$(var.OpensslPath)/out32dll/ssleay32.dll" Id="OpenSslDll2" />
|
||||
<File Source="$(var.ExtPath)/$(var.OpensslPath)/out32dll/openssl.exe" />
|
||||
<File Source="$(var.ResPath)/openssl/synergy.conf" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
|
||||
Reference in New Issue
Block a user