diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 3f1b29780..07f162386 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -18,9 +18,6 @@ set(MODULE_NAME "freerdp-client") set(MODULE_PREFIX "FREERDP_CLIENT") -include_directories(${OPENSSL_INCLUDE_DIR}) -include_directories(${ZLIB_INCLUDE_DIRS}) - set(${MODULE_PREFIX}_SRCS client.c cmdline.c @@ -40,6 +37,9 @@ endif() add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) +include_directories(${OPENSSL_INCLUDE_DIR}) +include_directories(${ZLIB_INCLUDE_DIRS}) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib") set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} @@ -53,7 +53,10 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHI MODULE winpr MODULES winpr-crt winpr-utils) -set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "") +if(NOT WIN32) + set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "") + set_target_properties(${MODULE_NAME} PROPERTIES INTERFACE_LINK_LIBRARIES "") +endif() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/cmake/FindOpenSSL.cmake b/cmake/FindOpenSSL.cmake index 450a6329d..ee446f6e1 100644 --- a/cmake/FindOpenSSL.cmake +++ b/cmake/FindOpenSSL.cmake @@ -143,14 +143,10 @@ IF(WIN32 AND NOT CYGWIN) "lib/VC" ) - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( OPENSSL_LIBRARIES - optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG} - optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG} - ) - else() - set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ) - endif() + set( OPENSSL_DEBUG_LIBRARIES ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG} ) + set( OPENSSL_RELEASE_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ) + set( OPENSSL_LIBRARIES ${OPENSSL_RELEASE_LIBRARIES} ) + MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) ELSEIF(MINGW) @@ -322,4 +318,4 @@ else (OPENSSL_VERSION) ) endif (OPENSSL_VERSION) -MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES OPENSSL_DEBUG_LIBRARIES OPENSSL_RELEASE_LIBRARIES) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index c20a307c6..7430d3570 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -91,8 +91,6 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") set(WINPR_INCLUDE_DIR "include") set(WINPR_MONOLITHIC_BUILD ${MONOLITHIC_BUILD}) - message(STATUS "WINPR_VERSION: ${WINPR_VERSION}") - configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR} PATH_VARS WINPR_INCLUDE_DIR WINPR_MONOLITHIC_BUILD) diff --git a/winpr/libwinpr/crypto/CMakeLists.txt b/winpr/libwinpr/crypto/CMakeLists.txt index e63aefea4..7f0947f8d 100644 --- a/winpr/libwinpr/crypto/CMakeLists.txt +++ b/winpr/libwinpr/crypto/CMakeLists.txt @@ -45,12 +45,14 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MODULE winpr MODULES winpr-crt winpr-utils) +message(STATUS "OPENSSL_LIBRARIES: ${OPENSSL_LIBRARIES} ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}") + if(WIN32) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} crypt32) endif() if(MONOLITHIC_BUILD) - + set(WINPR_LIBS ${WINPR_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) else() install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT WinPRTargets) endif() diff --git a/winpr/libwinpr/sspi/CMakeLists.txt b/winpr/libwinpr/sspi/CMakeLists.txt index 7bfe934f3..c9eac6a6d 100644 --- a/winpr/libwinpr/sspi/CMakeLists.txt +++ b/winpr/libwinpr/sspi/CMakeLists.txt @@ -74,8 +74,6 @@ set(${MODULE_PREFIX}_LIBS if(WIN32) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32) -else() - set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) endif() set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS