#5628 Link Synergy core against OpenSSL

This commit is contained in:
Andrew Nelless 2016-09-27 15:01:58 +01:00
parent 52c8763d97
commit 5db78acab4
9 changed files with 40 additions and 7 deletions

View File

@ -14,6 +14,38 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
if (WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(OPENSSL_PLAT_DIR openssl-win64)
else()
set(OPENSSL_PLAT_DIR openssl-win32)
endif()
set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/inc32)
endif()
if (APPLE)
set(OPENSSL_PLAT_DIR openssl-osx)
set(OPENSSL_INCLUDE ${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/include)
endif()
if (WIN32)
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_PLAT_DIR}/libssl.a
${CMAKE_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libcrypto.a
)
else()
set(OPENSSL_LIBS ssl crypto)
endif()
endif()
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(cmd) add_subdirectory(cmd)
add_subdirectory(micro) add_subdirectory(micro)

View File

@ -58,7 +58,7 @@ endif()
add_executable(synergyc ${sources}) add_executable(synergyc ${sources})
target_link_libraries(synergyc target_link_libraries(synergyc
arch base client common io mt net ipc platform server synergy ${libs}) arch base client common io mt net ipc platform server synergy ${libs} ${OPENSSL_LIBS})
if (CONF_CPACK) if (CONF_CPACK)
install(TARGETS install(TARGETS

View File

@ -35,7 +35,7 @@ else()
endif() endif()
target_link_libraries(synergyd target_link_libraries(synergyd
arch base common io ipc mt net platform synergy ${libs}) arch base common io ipc mt net platform synergy ${libs} ${OPENSSL_LIBS})
if (CONF_CPACK) if (CONF_CPACK)
install(TARGETS install(TARGETS

View File

@ -63,7 +63,7 @@ else()
endif() endif()
target_link_libraries(synergyp target_link_libraries(synergyp
arch base client common io mt net ipc platform server synergy client ${libs}) arch base client common io mt net ipc platform server synergy client ${libs} ${OPENSSL_LIBS})
if (CONF_CPACK) if (CONF_CPACK)
install(TARGETS install(TARGETS

View File

@ -58,7 +58,7 @@ endif()
add_executable(synergys ${sources}) add_executable(synergys ${sources})
target_link_libraries(synergys target_link_libraries(synergys
arch base client common io mt net ipc platform server synergy ${libs}) arch base client common io mt net ipc platform server synergy ${libs} ${OPENSSL_LIBS})
if (CONF_CPACK) if (CONF_CPACK)
install(TARGETS install(TARGETS

View File

@ -29,7 +29,7 @@ endif()
add_executable(syntool ${sources}) add_executable(syntool ${sources})
target_link_libraries(syntool target_link_libraries(syntool
synergy arch base client common io ipc mt net platform server ${libs}) synergy arch base client common io ipc mt net platform server ${libs} ${OPENSSL_LIBS})
if (CONF_CPACK) if (CONF_CPACK)
install(TARGETS install(TARGETS

View File

@ -23,6 +23,7 @@ endif()
include_directories( include_directories(
../ ../
${OPENSSL_INCLUDE}
) )
if (UNIX) if (UNIX)

View File

@ -68,4 +68,4 @@ endif()
add_executable(integtests ${sources}) add_executable(integtests ${sources})
target_link_libraries(integtests target_link_libraries(integtests
arch base client common io ipc mt net platform server synergy gtest gmock ${libs}) arch base client common io ipc mt net platform server synergy gtest gmock ${libs} ${OPENSSL_LIBS})

View File

@ -68,4 +68,4 @@ endif()
add_executable(unittests ${sources}) add_executable(unittests ${sources})
target_link_libraries(unittests target_link_libraries(unittests
arch base client server common io net platform server synergy mt ipc gtest gmock ${libs}) arch base client server common io net platform server synergy mt ipc gtest gmock ${libs} ${OPENSSL_LIBS})