channels/urbdrc: fix cmake scripts

This commit is contained in:
Marc-André Moreau 2014-04-26 13:44:58 -04:00
parent a2fa4eb6ed
commit f37c23b1a7
4 changed files with 26 additions and 16 deletions

View File

@ -17,6 +17,20 @@
define_channel("urbdrc")
if(NOT WIN32)
find_package(UDev)
find_package(UUID)
find_package(DbusGlib)
find_package(libusb-1.0)
endif()
if(UDEV_FOUND AND UUID_FOUND AND DBUS_GLIB_FOUND AND LIBUSB_1_FOUND)
set(URBDRC_DEPENDENCIES_FOUND TRUE)
message(STATUS "Found all URBDRC dependencies")
endif()
if(WITH_CLIENT_CHANNELS)
if(URBDRC_DEPENDENCIES_FOUND)
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()
endif()

View File

@ -31,10 +31,6 @@ set(${MODULE_PREFIX}_SRCS
include_directories(..)
find_package(UDev REQUIRED)
find_package(UUID REQUIRED)
find_package(DbusGlib REQUIRED)
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -27,8 +27,6 @@ set(${MODULE_PREFIX}_SRCS
include_directories(..)
find_package(libusb-1.0 REQUIRED)
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
@ -39,8 +37,7 @@ set(${MODULE_PREFIX}_LIBS
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${DBUS_GLIB_LIBRARIES}
${UUID_LIBRARIES}
${LIBUSB_1_LIBRARIES}
)
${LIBUSB_1_LIBRARIES})
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
@ -49,6 +46,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
if(NOT STATIC_CHANNELS)
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH})
endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_ADDIN_PATH} EXPORT FreeRDPTargets)

View File

@ -35,4 +35,8 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(dbus-glib DEFAULT_MSG
DBUS_GLIB_LIBRARY DBUS_GLIB_INCLUDE_DIR)
if(DBUS_GLIB_LIBRARIES AND DBUS_GLIB_INCLUDE_DIRS)
set(DBUS_GLIB_FOUND TRUE)
endif()
mark_as_advanced(DBUS_GLIB_INCLUDE_DIR DBUS_GLIB_LIBRARY)