From e8b4017960e3a43a8e4a75ed7a9f2ccceef35b6c Mon Sep 17 00:00:00 2001 From: Adam Potolsky Date: Tue, 28 Apr 2015 11:55:59 -0700 Subject: [PATCH] Changing ns plugin to use new binaries instead of older source directory. #4587 --- src/lib/plugin/ns/CMakeLists.txt | 35 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/lib/plugin/ns/CMakeLists.txt b/src/lib/plugin/ns/CMakeLists.txt index 81a6da44..952ae76e 100644 --- a/src/lib/plugin/ns/CMakeLists.txt +++ b/src/lib/plugin/ns/CMakeLists.txt @@ -21,7 +21,12 @@ 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) @@ -37,21 +42,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/libssl.a + ${CMAKE_SOURCE_DIR}/ext/openssl/libcrypto.a + ) + else() + set(OPENSSL_LIBS ssl crypto) + endif() endif() target_link_libraries(ns @@ -69,14 +74,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()