cmake: fix windows build

This commit is contained in:
Marc-André Moreau 2012-10-14 01:17:25 -04:00
parent 6a592b5720
commit 304b4c2d86
11 changed files with 29 additions and 3 deletions

View File

@ -52,9 +52,10 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked) MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked)
if(WITH_CUPS) if(WITH_CUPS)
target_link_libraries(${MODULE_NAME} ${CUPS_LIBRARIES}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CUPS_LIBRARIES})
endif() endif()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -39,6 +39,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULE freerdp MODULE freerdp
MODULES freerdp-utils) MODULES freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -48,5 +48,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULE winpr MODULE winpr
MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked) MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -37,6 +37,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULE freerdp MODULE freerdp
MODULES freerdp-utils) MODULES freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")

View File

@ -38,4 +38,6 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULE freerdp MODULE freerdp
MODULES freerdp-utils) MODULES freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL}/Server") set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL}/Server")

View File

@ -37,7 +37,9 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MODULE winpr MODULE winpr
MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked) MODULES winpr-crt winpr-synch winpr-thread winpr-interlocked)
target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
target_link_libraries(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PCSC_LIBRARIES})
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})

View File

@ -36,6 +36,9 @@
#include <freerdp/settings.h> #include <freerdp/settings.h>
#include <freerdp/utils/file.h> #include <freerdp/utils/file.h>
#pragma warning(push)
#pragma warning(disable: 4244)
static const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll"; static const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll";
#define REG_QUERY_DWORD_VALUE(_key, _subkey, _type, _value, _size, _result) \ #define REG_QUERY_DWORD_VALUE(_key, _subkey, _type, _value, _size, _result) \
@ -393,3 +396,5 @@ void settings_free(rdpSettings* settings)
free(settings); free(settings);
} }
} }
#pragma warning(pop)

View File

@ -53,6 +53,10 @@ if(NOT WITH_NATIVE_SSPI)
${${MODULE_PREFIX}_SRCS}) ${${MODULE_PREFIX}_SRCS})
endif() endif()
if(MSVC AND (NOT MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
MONOLITHIC ${MONOLITHIC_BUILD} MONOLITHIC ${MONOLITHIC_BUILD}
SOURCES ${${MODULE_PREFIX}_SRCS}) SOURCES ${${MODULE_PREFIX}_SRCS})

View File

@ -0,0 +1,3 @@
LIBRARY "libwinpr-sspi"
EXPORTS

View File

@ -21,6 +21,10 @@ set(MODULE_PREFIX "WINPR_SYSINFO")
set(${MODULE_PREFIX}_SRCS set(${MODULE_PREFIX}_SRCS
sysinfo.c) sysinfo.c)
if(MSVC AND (NOT MONOLITHIC_BUILD))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
MONOLITHIC ${MONOLITHIC_BUILD} MONOLITHIC ${MONOLITHIC_BUILD}
SOURCES ${${MODULE_PREFIX}_SRCS}) SOURCES ${${MODULE_PREFIX}_SRCS})

View File

@ -0,0 +1,3 @@
LIBRARY "libwinpr-sysinfo"
EXPORTS