Merge pull request #3259 from bmiklautz/overlinking

Fix overlinking
This commit is contained in:
akallabeth 2016-03-30 15:20:53 +02:00
commit 445059b76e
39 changed files with 69 additions and 115 deletions

View File

@ -757,6 +757,14 @@ endif()
include_directories("${CMAKE_SOURCE_DIR}/winpr/include")
include_directories("${CMAKE_BINARY_DIR}/winpr/include")
if (${CMAKE_VERSION} VERSION_LESS 2.8.12)
set(PUBLIC_KEYWORD "")
set(PRIVATE_KEYWORD "")
else()
set(PUBLIC_KEYWORD "PUBLIC")
set(PRIVATE_KEYWORD "PRIVATE")
endif()
add_subdirectory(winpr)
# Sub-directories
@ -807,14 +815,6 @@ if(WITH_CHANNELS)
add_subdirectory(channels)
endif()
if (${CMAKE_VERSION} VERSION_LESS 2.8.12)
set(PUBLIC_KEYWORD "")
set(PRIVATE_KEYWORD "")
else()
set(PUBLIC_KEYWORD "PUBLIC")
set(PRIVATE_KEYWORD "PRIVATE")
endif()
if(WITH_CLIENT_COMMON OR WITH_CLIENT)
add_subdirectory(client)
endif()

View File

@ -27,7 +27,7 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})

View File

@ -25,11 +25,6 @@ include_directories(..)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
target_link_libraries(${MODULE_NAME} freerdp)
if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS)
install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols)
endif()

View File

@ -26,5 +26,4 @@ include_directories(${ALSA_INCLUDE_DIRS})
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
target_link_libraries(${MODULE_NAME} freerdp ${ALSA_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${ALSA_LIBRARIES})

View File

@ -59,7 +59,4 @@ set(${MODULE_PREFIX}_SRCS "${SRC}")
include_directories(..)
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
target_link_libraries(${MODULE_NAME} ${LIBS} freerdp)
target_link_libraries(${MODULE_NAME} ${LIBS})

View File

@ -25,6 +25,3 @@ include_directories(${OSS_INCLUDE_DIRS})
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
target_link_libraries(${MODULE_NAME} freerdp ${OSS_LIBRARIES})

View File

@ -24,7 +24,3 @@ include_directories(..)
include_directories(${PULSE_INCLUDE_DIR})
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
target_link_libraries(${MODULE_NAME} freerdp)

View File

@ -359,12 +359,10 @@ static void tsmf_pulse_free(ITSMFAudioDevice *audio)
}
#ifdef STATIC_CHANNELS
#define freerdp_tsmf_client_audio_subsystem_entry pulse_freerdp_tsmf_client_audio_subsystem_entry
ITSMFAudioDevice *pulse_freerdp_tsmf_client_audio_subsystem_entry(void)
#else
#define freerdp_tsmf_client_audio_subsystem_entry FREERDP_API freerdp_tsmf_client_audio_subsystem_entry
FREERDP_API ITSMFAudioDevice *freerdp_tsmf_client_audio_subsystem_entry(void)
#endif
ITSMFAudioDevice *freerdp_tsmf_client_audio_subsystem_entry(void)
{
TSMFPulseAudioDevice *pulse;

View File

@ -37,16 +37,14 @@ add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE
#set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} libusb-devman)
set(${MODULE_PREFIX}_LIBS
${DBUS_GLIB_LIBRARIES}
${UUID_LIBRARIES})
set(${MODULE_PREFIX}_LIBS)
if (UDEV_FOUND AND UDEV_LIBRARIES)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${UDEV_LIBRARIES})
endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWOARD} ${${MODULE_PREFIX}_LIBS})
if (WITH_DEBUG_SYMBOLS AND MSVC AND NOT STATIC_CHANNELS AND BUILD_SHARED_LIBS)
install(FILES ${CMAKE_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${FREERDP_ADDIN_PATH} COMPONENT symbols)

View File

@ -35,8 +35,6 @@ set(${MODULE_PREFIX}_LIBS
${CMAKE_THREAD_LIBS_INIT})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${DBUS_GLIB_LIBRARIES}
${UUID_LIBRARIES}
${LIBUSB_1_LIBRARIES})

View File

@ -31,7 +31,6 @@ set(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp uwac)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})

View File

@ -70,8 +70,7 @@ else()
endif()
set(${MODULE_PREFIX}_LIBS
${X11_LIBRARIES}
${CMAKE_DL_LIBS})
${X11_LIBRARIES})
if(WITH_MANPAGES)
find_program(XSLTPROC_EXECUTABLE NAMES xsltproc)
@ -203,11 +202,11 @@ endif()
include_directories(${CMAKE_SOURCE_DIR}/resources)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp freerdp-client)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
if(WITH_IPP)
target_link_libraries(${MODULE_NAME} ${IPP_LIBRARY_LIST})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${IPP_LIBRARY_LIST})
endif()
if(WITH_CLIENT_INTERFACE)

View File

@ -26,7 +26,7 @@ set(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "xfreerdp" RUNTIME_OUTPUT_DIRECTORY "..")
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} xfreerdp-client)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} xfreerdp-client freerdp-client)
if(OPENBSD)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ossaudio)

View File

@ -61,16 +61,11 @@ endif()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS})
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${FREERDP_CHANNELS_CLIENT_LIBS})
if(OPENBSD)

View File

@ -300,7 +300,7 @@ if (WITH_LIBRARY_VERSIONING)
endif()
target_link_libraries(${MODULE_NAME} ${LIBFREERDP_LIBS} winpr)
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${LIBFREERDP_LIBS} winpr)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT FreeRDPTargets)
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)

View File

@ -21,7 +21,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} freerdp)
target_link_libraries(${MODULE_NAME} freerdp winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")

View File

@ -25,10 +25,6 @@ set(${MODULE_PREFIX}_SRCS
freerdp_module_add(${${MODULE_PREFIX}_SRCS})
freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS})
freerdp_library_add(${ZLIB_LIBRARIES})
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -21,7 +21,6 @@ set(MODULE_PREFIX "FREERDP_CORE")
freerdp_definition_add(-DEXT_PATH="${FREERDP_EXTENSION_PATH}")
freerdp_include_directory_add(${OPENSSL_INCLUDE_DIR})
freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS})
set(${MODULE_PREFIX}_GATEWAY_DIR "gateway")
@ -135,8 +134,6 @@ freerdp_module_add(${${MODULE_PREFIX}_SRCS})
if(WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32)
freerdp_library_add(ws2_32)
else()
freerdp_library_add(${ZLIB_LIBRARIES})
endif()
freerdp_library_add(${OPENSSL_LIBRARIES})

View File

@ -25,7 +25,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
add_definitions(-DTESTING_OUTPUT_DIRECTORY="${CMAKE_BINARY_DIR}")
add_definitions(-DTESTING_SRC_DIRECTORY="${CMAKE_SOURCE_DIR}")
target_link_libraries(${MODULE_NAME} freerdp-client freerdp winpr)
target_link_libraries(${MODULE_NAME} freerdp winpr freerdp-client)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")

View File

@ -29,7 +29,6 @@ freerdp_module_add(
tls.c)
freerdp_include_directory_add(${OPENSSL_INCLUDE_DIR})
freerdp_include_directory_add(${ZLIB_INCLUDE_DIRS})
freerdp_library_add(${OPENSSL_LIBRARIES})
@ -40,8 +39,6 @@ endif()
if(WIN32)
freerdp_library_add(ws2_32)
else()
freerdp_library_add(${ZLIB_LIBRARIES})
endif()
if(BUILD_TESTING)

View File

@ -16,7 +16,7 @@ include_directories(${OPENSSL_INCLUDE_DIR})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} freerdp)
target_link_libraries(${MODULE_NAME} freerdp winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")

View File

@ -32,7 +32,7 @@ endif()
freerdp_module_add(${${MODULE_PREFIX}_SRCS})
freerdp_library_add(${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
freerdp_library_add(${CMAKE_THREAD_LIBS_INIT})
if(WIN32)
freerdp_library_add(ws2_32)

View File

@ -13,7 +13,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr freerdp)
target_link_libraries(${MODULE_NAME} freerdp)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")

View File

@ -62,7 +62,7 @@ if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${RDTK_VERSION} SOVERSION ${RDTK_API_VERSION})
endif()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT RdTkTargets)
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)

View File

@ -29,7 +29,7 @@ set(${MODULE_PREFIX}_LIBS rdtk)
list(APPEND ${MODULE_PREFIX}_LIBS ${X11_LIBRARIES})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} winpr)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "RdTk")

View File

@ -77,7 +77,7 @@ list(APPEND ${MODULE_PREFIX}_LIBS winpr)
list(APPEND ${MODULE_PREFIX}_LIBS winpr-makecert-tool)
list(APPEND ${MODULE_PREFIX}_LIBS rdtk)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
@ -174,10 +174,10 @@ if(WITH_SHADOW_X11)
find_feature(XShm ${XSHM_FEATURE_TYPE} ${XSHM_FEATURE_PURPOSE} ${XSHM_FEATURE_DESCRIPTION})
find_feature(XTest ${XTEST_FEATURE_TYPE} ${XTEST_FEATURE_PURPOSE} ${XTEST_FEATURE_DESCRIPTION})
find_feature(Xfixes ${XFIXES_FEATURE_TYPE} ${XFIXES_FEATURE_PURPOSE} ${XFIXES_FEATURE_DESCRIPTION})
find_feature(XRandR ${XRANDR_FEATURE_TYPE} ${XRANDR_FEATURE_PURPOSE} ${XRANDR_FEATURE_DESCRIPTION})
find_feature(Xdamage ${XDAMAGE_FEATURE_TYPE} ${XDAMAGE_FEATURE_PURPOSE} ${XDAMAGE_FEATURE_DESCRIPTION})
find_feature(Xcursor ${XCURSOR_FEATURE_TYPE} ${XCURSOR_FEATURE_PURPOSE} ${XCURSOR_FEATURE_DESCRIPTION})
find_feature(Xinerama ${XINERAMA_FEATURE_TYPE} ${XINERAMA_FEATURE_PURPOSE} ${XINERAMA_FEATURE_DESCRIPTION})
find_feature(XRandR ${XRANDR_FEATURE_TYPE} ${XRANDR_FEATURE_PURPOSE} ${XRANDR_FEATURE_DESCRIPTION})
find_feature(Xcursor ${XCURSOR_FEATURE_TYPE} ${XCURSOR_FEATURE_PURPOSE} ${XCURSOR_FEATURE_DESCRIPTION})
if(WITH_X11)
add_definitions(-DWITH_X11)
@ -203,12 +203,6 @@ if(WITH_SHADOW_X11)
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XINERAMA_LIBRARIES})
endif()
if(WITH_XCURSOR)
add_definitions(-DWITH_XCURSOR)
include_directories(${XCURSOR_INCLUDE_DIRS})
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XCURSOR_LIBRARIES})
endif()
if(WITH_XDAMAGE)
add_definitions(-DWITH_XDAMAGE)
include_directories(${XDAMAGE_INCLUDE_DIRS})
@ -227,18 +221,25 @@ if(WITH_SHADOW_X11)
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XTEST_LIBRARIES})
endif()
if(WITH_XRANDR)
add_definitions(-DWITH_XRANDR)
include_directories(${XRANDR_INCLUDE_DIRS})
list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XRANDR_LIBRARIES})
endif()
# XCursor and XRandr are currently not used so don't link them
#if(WITH_XCURSOR)
# add_definitions(-DWITH_XCURSOR)
# include_directories(${XCURSOR_INCLUDE_DIRS})
# list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XCURSOR_LIBRARIES})
#endif()
#if(WITH_XRANDR)
# add_definitions(-DWITH_XRANDR)
# include_directories(${XRANDR_INCLUDE_DIRS})
# list(APPEND ${MODULE_PREFIX}_X11_LIBS ${XRANDR_LIBRARIES})
#endif()
elseif(WITH_SHADOW_MAC)
find_library(IOKIT IOKit)
find_library(IOSURFACE IOSurface)
find_library(CARBON Carbon)
list(APPEND ${MODULE_PREFIX}_MAC_LIBS ${IOKIT} ${IOSURFACE} ${CARBON})
elseif(WITH_SHADOW_WIN)
list(APPEND ${MODULE_PREFIX}_WIN_LIBS freerdp-client)
list(APPEND ${MODULE_PREFIX}_WIN_LIBS freerdp-client freerdp)
endif()
set(${MODULE_PREFIX}_WIN_SRCS
@ -279,7 +280,7 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
@ -320,9 +321,9 @@ endif()
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow-subsystem)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-shadow-subsystem freerdp-shadow winpr)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
if (WITH_DEBUG_SYMBOLS AND MSVC)

View File

@ -68,7 +68,7 @@ if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION})
endif()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} freerdp)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} freerdp)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)

View File

@ -123,7 +123,11 @@ if (WITH_LIBRARY_VERSIONING)
endif()
add_definitions(${WINPR_DEFINITIONS})
target_link_libraries(${MODULE_NAME} ${WINPR_LIBS})
if (WIN32)
target_link_libraries(${MODULE_NAME} ${PUBLIC_KEYWORD} ${WINPR_LIBS})
else()
target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} ${WINPR_LIBS})
endif(WIN32)
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)
if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)

View File

@ -24,8 +24,6 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})

View File

@ -17,8 +17,4 @@
winpr_module_add(bcrypt.c)
winpr_include_directory_add(
${OPENSSL_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS})
winpr_library_add(${ZLIB_LIBRARIES})
winpr_include_directory_add(${OPENSSL_INCLUDE_DIR})

View File

@ -12,7 +12,6 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})

View File

@ -26,23 +26,23 @@
int TestFileGetStdHandle(int argc, char* argv[])
{
HANDLE stdout;
HANDLE so;
char *buf = "happy happy";
DWORD bytesWritten;
stdout = GetStdHandle(STD_OUTPUT_HANDLE);
if (stdout == INVALID_HANDLE_VALUE)
so = GetStdHandle(STD_OUTPUT_HANDLE);
if (so == INVALID_HANDLE_VALUE)
{
fprintf(stderr, "GetStdHandle failed ;(\n");
return -1;
}
WriteFile(stdout, buf, strlen(buf), &bytesWritten, FALSE);
WriteFile(so, buf, strlen(buf), &bytesWritten, FALSE);
if (bytesWritten != strlen(buf))
{
fprintf(stderr, "write failed\n");
return -1;
}
CloseHandle(stdout);
CloseHandle(so);
return 0;
}

View File

@ -13,8 +13,6 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})

View File

@ -13,8 +13,6 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})

View File

@ -38,13 +38,10 @@ winpr_module_add(
ndr_union.h
midl.c)
winpr_include_directory_add(${OPENSSL_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS})
winpr_include_directory_add(${OPENSSL_INCLUDE_DIR})
winpr_library_add(${OPENSSL_LIBRARIES})
if(WIN32)
winpr_library_add(ws2_32 rpcrt4)
else()
winpr_library_add(${ZLIB_LIBRARIES})
endif()

View File

@ -13,8 +13,6 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
target_link_libraries(${MODULE_NAME} winpr)
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
foreach(test ${${MODULE_PREFIX}_TESTS})

View File

@ -21,8 +21,6 @@ include_directories(${OPENSSL_INCLUDE_DIR})
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS ${OPENSSL_LIBRARIES})
if(WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} secur32 crypt32)
endif()

View File

@ -33,7 +33,13 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
set(${MODULE_PREFIX}_LIBS winpr)
if(OPENSSL_FOUND)
list(APPEND ${MODULE_PREFIX}_LIBS ${OPENSSL_LIBRARIES})
if(WIN32)
list(APPEND ${MODULE_PREFIX}_LIBS ${OPENSSL_LIBRARIES})
else()
# if ${OPENSSL_LIBRARIES} libssl and libcrypto is linked
# therefor explicitly link against libcrypto
list(APPEND ${MODULE_PREFIX}_LIBS crypto)
endif()
endif()
if(MBEDTLS_FOUND)

View File

@ -9,7 +9,7 @@ Description: WinPR: Windows Portable Runtime
URL: http://www.freerdp.com/
Version: @WINPR_VERSION@
Requires:
Requires.private: zlib libssl
Requires.private: libssl
Libs: -L${libdir} ${libs}
Libs.private: -ldl -lrt -lm -lpthread
Cflags: -I${includedir}