[build] use static libraries as intermediate
This commit is contained in:
parent
b4e9c8b39f
commit
273bb6a7a8
@ -173,8 +173,7 @@ macro(add_channel_client_library _module_prefix _module_name _channel_name _dyna
|
|||||||
set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE)
|
set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE)
|
||||||
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
||||||
|
|
||||||
add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS})
|
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
||||||
set_property(TARGET ${_module_name} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||||
|
|
||||||
if (${_module_prefix}_LIBS)
|
if (${_module_prefix}_LIBS)
|
||||||
@ -193,7 +192,6 @@ macro(add_channel_client_subsystem_library _module_prefix _module_name _channel_
|
|||||||
set(${_module_prefix}_TYPE ${_type} PARENT_SCOPE)
|
set(${_module_prefix}_TYPE ${_type} PARENT_SCOPE)
|
||||||
|
|
||||||
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
||||||
set_property(TARGET ${_module_name} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${_channel_name}/Client/Subsystem/${CHANNEL_SUBSYSTEM}")
|
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${_channel_name}/Client/Subsystem/${CHANNEL_SUBSYSTEM}")
|
||||||
|
|
||||||
if (${_module_prefix}_LIBS)
|
if (${_module_prefix}_LIBS)
|
||||||
@ -212,8 +210,7 @@ macro(add_channel_server_library _module_prefix _module_name _channel_name _dyna
|
|||||||
set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE)
|
set(${_module_prefix}_CHANNEL ${_channel_name} PARENT_SCOPE)
|
||||||
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
set(${_module_prefix}_ENTRY ${_entry} PARENT_SCOPE)
|
||||||
|
|
||||||
add_library(${_module_name} OBJECT ${${_module_prefix}_SRCS})
|
add_library(${_module_name} STATIC ${${_module_prefix}_SRCS})
|
||||||
set_property(TARGET ${_module_name} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
|
set_property(TARGET ${_module_name} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
|
||||||
|
|
||||||
if (${_module_prefix}_LIBS)
|
if (${_module_prefix}_LIBS)
|
||||||
|
@ -21,6 +21,5 @@ set(SRCS
|
|||||||
rdpsnd_common.c)
|
rdpsnd_common.c)
|
||||||
|
|
||||||
# Library currently header only
|
# Library currently header only
|
||||||
add_library(rdpsnd-common OBJECT ${SRCS})
|
add_library(rdpsnd-common STATIC ${SRCS})
|
||||||
set_property(TARGET rdpsnd-common PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ set(${MODULE_PREFIX}_SRCS
|
|||||||
|
|
||||||
set(${MODULE_PREFIX}_LIBS
|
set(${MODULE_PREFIX}_LIBS
|
||||||
winpr freerdp
|
winpr freerdp
|
||||||
$<TARGET_OBJECTS:urbdrc-common>
|
urbdrc-common
|
||||||
)
|
)
|
||||||
if (UDEV_FOUND AND UDEV_LIBRARIES)
|
if (UDEV_FOUND AND UDEV_LIBRARIES)
|
||||||
list(APPEND ${MODULE_PREFIX}_LIBS ${UDEV_LIBRARIES})
|
list(APPEND ${MODULE_PREFIX}_LIBS ${UDEV_LIBRARIES})
|
||||||
|
@ -23,6 +23,5 @@ set(SRCS
|
|||||||
msusb.h
|
msusb.h
|
||||||
msusb.c)
|
msusb.c)
|
||||||
|
|
||||||
add_library(urbdrc-common OBJECT ${SRCS})
|
add_library(urbdrc-common STATIC ${SRCS})
|
||||||
set_property(TARGET urbdrc-common PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
||||||
|
|
||||||
|
@ -107,6 +107,6 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfi
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfigVersion.cmake
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ClientConfigVersion.cmake
|
||||||
DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR})
|
DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR})
|
||||||
|
|
||||||
if (CMAKE_BUILD_SHARED)
|
if (CMAKE_BUILD_SHARED_LIBS)
|
||||||
install(EXPORT FreeRDP-ClientTargets DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR})
|
install(EXPORT FreeRDP-ClientTargets DESTINATION ${FREERDP_CLIENT_CMAKE_INSTALL_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -90,6 +90,6 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfi
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfigVersion.cmake
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ServerConfigVersion.cmake
|
||||||
DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
||||||
|
|
||||||
if (CMAKE_BUILD_SHARED)
|
if (CMAKE_BUILD_SHARED_LIBS)
|
||||||
install(EXPORT FreeRDP-ServerTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
install(EXPORT FreeRDP-ServerTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
@ -63,16 +63,20 @@ if (WIN32)
|
|||||||
list(APPEND PROXY_APP_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
list(APPEND PROXY_APP_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS} $<TARGET_OBJECTS:pf_channels>)
|
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||||
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
|
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
|
||||||
|
|
||||||
if (WITH_LIBRARY_VERSIONING)
|
if (WITH_LIBRARY_VERSIONING)
|
||||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-server)
|
set(${MODULE_PREFIX}_LIBS
|
||||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
winpr
|
||||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr freerdp)
|
freerdp
|
||||||
|
freerdp-client
|
||||||
|
freerdp-server
|
||||||
|
pf_channels
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ProxyTargets)
|
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ProxyTargets)
|
||||||
@ -96,7 +100,7 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfig
|
|||||||
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfigVersion.cmake
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ProxyConfigVersion.cmake
|
||||||
DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
||||||
if (CMAKE_BUILD_SHARED)
|
if (CMAKE_BUILD_SHARED_LIBS)
|
||||||
install(EXPORT FreeRDP-ProxyTargets DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
install(EXPORT FreeRDP-ProxyTargets DESTINATION ${FREERDP_PROXY_CMAKE_INSTALL_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@ if (WITH_PROXY_EMULATE_SMARTCARD)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${MODULE_NAME} OBJECT ${SOURCES})
|
add_library(${MODULE_NAME} STATIC ${SOURCES})
|
||||||
|
@ -377,6 +377,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfig.cmake
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/FreeRDP-ShadowConfigVersion.cmake
|
||||||
DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
||||||
|
|
||||||
if (CMAKE_BUILD_SHARED)
|
if (CMAKE_BUILD_SHARED_LIBS)
|
||||||
install(EXPORT FreeRDP-ShadowTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
install(EXPORT FreeRDP-ShadowTargets DESTINATION ${FREERDP_SERVER_CMAKE_INSTALL_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user