libfreerdp-channels: refactoring of channels cmake scripts with macros

This commit is contained in:
Marc-André Moreau 2012-10-15 14:44:46 -04:00
parent b0f368b10e
commit 010761055e
32 changed files with 90 additions and 246 deletions

View File

@ -17,6 +17,60 @@
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
macro(add_channel_client _channel_prefix _channel_name)
add_subdirectory(client)
if(${_channel_prefix}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${_channel_prefix} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_NAME ${_channel_name} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_CHANNEL ${${_channel_prefix}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${_channel_prefix}_CLIENT_ENTRY ${${_channel_prefix}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
endmacro(add_channel_client)
macro(add_channel_server _channel_prefix _channel_name)
add_subdirectory(server)
if(${_channel_prefix}_SERVER_STATIC)
set(CHANNEL_STATIC_SERVER_MODULES ${CHANNEL_STATIC_SERVER_MODULES} ${_channel_prefix} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_NAME ${_channel_name} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_CHANNEL ${${_channel_prefix}_SERVER_CHANNEL} PARENT_SCOPE)
set(${_channel_prefix}_SERVER_ENTRY ${${_channel_prefix}_SERVER_ENTRY} PARENT_SCOPE)
endif()
endmacro(add_channel_server)
macro(add_channel_client_library _module_prefix _module_name _plugin _entry)
if(_plugin AND MSVC AND (NOT STATIC_CHANNELS))
set(${_module_prefix}_SRCS ${${_module_prefix}_SRCS} module.def)
endif()
if(_plugin AND (NOT STATIC_CHANNELS))
add_library(${_module_name} ${${_module_prefix}_SRCS})
else()
set(${_module_prefix}_STATIC ON PARENT_SCOPE)
set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE)
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
endif()
endmacro(add_channel_client_library)
macro(add_channel_server_library _module_prefix _module_name _plugin _entry)
if(_plugin AND MSVC AND (NOT STATIC_CHANNELS))
set(${_module_prefix}_SRCS ${${_module_prefix}_SRCS} module.def)
endif()
if(_plugin AND (NOT STATIC_CHANNELS))
add_library(${_module_name} ${${_module_prefix}_SRCS})
else()
set(${_module_prefix}_STATIC ON PARENT_SCOPE)
set(${_module_prefix}_NAME ${_module_name} PARENT_SCOPE)
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
endif()
endmacro(add_channel_server_library)
set(FILENAME "ChannelOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")

View File

@ -17,24 +17,12 @@
set(CHANNEL_NAME "audin")
set(MODULE_NAME ${CHANNEL_NAME})
set(MODULE_PREFIX "CHANNEL_AUDIN")
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${${MODULE_PREFIX}_CLIENT_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()
if(WITH_SERVER_CHANNELS)
add_subdirectory(server)
if(${MODULE_PREFIX}_SERVER_STATIC)
set(CHANNEL_STATIC_SERVER_MODULES ${CHANNEL_STATIC_SERVER_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_NAME ${${MODULE_PREFIX}_SERVER_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_CHANNEL ${${MODULE_PREFIX}_SERVER_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_ENTRY ${${MODULE_PREFIX}_SERVER_ENTRY} PARENT_SCOPE)
endif()
add_channel_server(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -24,14 +24,7 @@ set(${MODULE_PREFIX}_SRCS
include_directories(..)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -22,14 +22,7 @@ set(MODULE_PREFIX "CHANNEL_AUDIN_SERVER")
set(${MODULE_PREFIX}_SRCS
audin.c)
# audin-server is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CHANNEL ${CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -28,6 +28,8 @@ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
set(STATIC_MODULE_NAME ${${STATIC_MODULE}_CLIENT_NAME})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${STATIC_MODULE_NAME})
message(STATUS "StaticModuleName: ${STATIC_MODULE_NAME}")
if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry")
set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}")
set(ENTRY_POINT_IMPORT "extern int ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS pEntryPoints);")

View File

@ -20,12 +20,6 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -25,13 +25,7 @@ set(${MODULE_PREFIX}_SRCS
cliprdr_main.c
cliprdr_main.h)
# cliprdr is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,6 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -30,18 +30,7 @@ if(WIN32)
dirent.h)
endif()
if(MSVC AND (NOT STATIC_CHANNELS))
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
endif()
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DeviceServiceEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DeviceServiceEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,6 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -25,13 +25,7 @@ set(${MODULE_PREFIX}_SRCS
dvcman.c
dvcman.h)
# drdynvc is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,5 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -21,14 +21,7 @@ set(MODULE_PREFIX "CHANNEL_RDPDR_PARALLEL_CLIENT")
set(${MODULE_PREFIX}_SRCS
parallel_main.c)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,5 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -37,14 +37,7 @@ if(WIN32)
printer_win.h)
endif()
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,5 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -24,13 +24,7 @@ set(${MODULE_PREFIX}_SRCS
rail_orders.c
rail_orders.h)
# rail is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "VirtualChannelEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,5 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -28,13 +28,7 @@ set(${MODULE_PREFIX}_SRCS
rdpdr_capabilities.c
rdpdr_capabilities.h)
# rdpdr is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "VirtualChannelEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,21 +20,9 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()
if(WITH_SERVER_CHANNELS)
add_subdirectory(server)
if(${MODULE_PREFIX}_SERVER_STATIC)
set(CHANNEL_STATIC_SERVER_MODULES ${CHANNEL_STATIC_SERVER_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_NAME ${${MODULE_PREFIX}_SERVER_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_CHANNEL ${${MODULE_PREFIX}_SERVER_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_SERVER_ENTRY ${${MODULE_PREFIX}_SERVER_ENTRY} PARENT_SCOPE)
endif()
add_channel_server(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -22,13 +22,7 @@ set(${MODULE_PREFIX}_SRCS
rdpsnd_main.c
rdpsnd_main.h)
# rdpsnd is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "VirtualChannelEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -22,14 +22,7 @@ set(MODULE_PREFIX "CHANNEL_RDPSND_SERVER")
set(${MODULE_PREFIX}_SRCS
rdpsnd.c)
# rdpsnd-server is always built-in
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CHANNEL ${CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "VirtualChannelEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
add_channel_server_library(${MODULE_PREFIX} ${MODULE_NAME} FALSE "VirtualChannelEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,6 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -22,14 +22,7 @@ set(${MODULE_PREFIX}_SRCS
skel_main.c
skel_main.h)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,12 +20,6 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -24,14 +24,7 @@ set(${MODULE_PREFIX}_SRCS
serial_constants.h
serial_main.c)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DeviceServiceEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DeviceServiceEntry")
set_target_properties(serial PROPERTIES PREFIX "")

View File

@ -20,12 +20,5 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -24,14 +24,7 @@ set(${MODULE_PREFIX}_SRCS
include_directories(${PCSC_INCLUDE_DIRS})
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -20,13 +20,7 @@ set(MODULE_NAME ${CHANNEL_NAME})
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -37,14 +37,7 @@ set(${MODULE_PREFIX}_SRCS
include_directories(..)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")

View File

@ -22,11 +22,5 @@ string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
add_subdirectory(libusb)
if(WITH_CLIENT_CHANNELS)
add_subdirectory(client)
if(${MODULE_PREFIX}_CLIENT_STATIC)
set(CHANNEL_STATIC_CLIENT_MODULES ${CHANNEL_STATIC_CLIENT_MODULES} ${MODULE_PREFIX} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_NAME ${CHANNEL_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_CHANNEL ${${MODULE_PREFIX}_CLIENT_CHANNEL} PARENT_SCOPE)
set(${MODULE_PREFIX}_CLIENT_ENTRY ${${MODULE_PREFIX}_CLIENT_ENTRY} PARENT_SCOPE)
endif()
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
endif()

View File

@ -32,14 +32,7 @@ set(${MODULE_PREFIX}_SRCS
include_directories(..)
if(NOT STATIC_CHANNELS)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
else()
set(${MODULE_PREFIX}_STATIC ON PARENT_SCOPE)
set(${MODULE_PREFIX}_NAME ${MODULE_NAME} PARENT_SCOPE)
set(${MODULE_PREFIX}_ENTRY "DVCPluginEntry" PARENT_SCOPE)
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
endif()
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} TRUE "DVCPluginEntry")
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")