freerdp: add optional monolithic build option to FreeRDP libraries
This commit is contained in:
parent
6a49d43b4b
commit
c2d1541d25
@ -91,15 +91,15 @@ set(FREERDP_CORE_SRCS
|
||||
peer.c
|
||||
peer.h)
|
||||
|
||||
add_library(freerdp-core ${FREERDP_CORE_SRCS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-core OBJECT ${FREERDP_CORE_SRCS})
|
||||
else()
|
||||
add_library(freerdp-core ${FREERDP_CORE_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-core PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(FREERDP_CORE_LIBS
|
||||
freerdp-utils
|
||||
freerdp-codec
|
||||
freerdp-crypto
|
||||
freerdp-locale
|
||||
winpr-utils
|
||||
winpr-rpc
|
||||
winpr-sspi)
|
||||
@ -116,6 +116,15 @@ endif()
|
||||
|
||||
set(FREERDP_CORE_LIBS ${FREERDP_CORE_LIBS} ${OPENSSL_LIBRARIES})
|
||||
|
||||
target_link_libraries(freerdp-core ${FREERDP_CORE_LIBS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
set(FREERDP_CORE_LIBS ${FREERDP_CORE_LIBS}
|
||||
freerdp-utils
|
||||
freerdp-codec
|
||||
freerdp-crypto
|
||||
freerdp-locale)
|
||||
|
||||
target_link_libraries(freerdp-core ${FREERDP_CORE_LIBS})
|
||||
install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -27,23 +27,32 @@ set(FREERDP_CRYPTO_SRCS
|
||||
crypto.c
|
||||
tls.c)
|
||||
|
||||
add_library(freerdp-crypto ${FREERDP_CRYPTO_SRCS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-crypto OBJECT ${FREERDP_CRYPTO_SRCS})
|
||||
else()
|
||||
add_library(freerdp-crypto ${FREERDP_CRYPTO_SRCS})
|
||||
endif()
|
||||
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
set_target_properties(freerdp-crypto PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(FREERDP_CRYPTO_LIBS
|
||||
${OPENSSL_LIBRARIES}
|
||||
winpr-sspi)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(freerdp-crypto ws2_32)
|
||||
set(FREERDP_CRYPTO_LIBS ${FREERDP_CRYPTO_LIBS} ws2_32)
|
||||
else()
|
||||
target_link_libraries(freerdp-crypto ${ZLIB_LIBRARIES})
|
||||
target_link_libraries(freerdp-crypto winpr-library)
|
||||
set(FREERDP_CRYPTO_LIBS ${FREERDP_CRYPTO_LIBS} winpr-library)
|
||||
set(FREERDP_CRYPTO_LIBS ${FREERDP_CRYPTO_LIBS} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(freerdp-crypto winpr-sspi)
|
||||
target_link_libraries(freerdp-crypto freerdp-utils)
|
||||
target_link_libraries(freerdp-crypto ${OPENSSL_LIBRARIES})
|
||||
|
||||
install(TARGETS freerdp-crypto DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_CRYPTO_LIBS ${FREERDP_CRYPTO_LIBS} freerdp-utils)
|
||||
target_link_libraries(freerdp-crypto ${FREERDP_CRYPTO_LIBS})
|
||||
install(TARGETS freerdp-crypto DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -36,12 +36,24 @@ set(FREERDP_GDI_SRCS
|
||||
gdi.c
|
||||
gdi.h)
|
||||
|
||||
add_library(freerdp-gdi ${FREERDP_GDI_SRCS})
|
||||
|
||||
target_link_libraries(freerdp-gdi freerdp-core)
|
||||
target_link_libraries(freerdp-gdi freerdp-cache)
|
||||
target_link_libraries(freerdp-gdi freerdp-codec)
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-gdi OBJECT ${FREERDP_GDI_SRCS})
|
||||
else()
|
||||
add_library(freerdp-gdi ${FREERDP_GDI_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-gdi PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
install(TARGETS freerdp-gdi DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set(FREERDP_GDI_LIBS)
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_GDI_LIBS ${FREERDP_GDI_LIBS}
|
||||
freerdp-core
|
||||
freerdp-cache
|
||||
freerdp-codec)
|
||||
|
||||
target_link_libraries(freerdp-gdi ${FREERDP_GDI_LIBS})
|
||||
install(TARGETS freerdp-gdi DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -47,7 +47,7 @@ if(CMAKE_SYSTEM_NAME MATCHES Solaris)
|
||||
set(WITH_SUN true)
|
||||
endif()
|
||||
|
||||
set(FREERDP_LOCALE_LINK_LIBRARIES freerdp-utils)
|
||||
set(FREERDP_LOCALE_LIBS)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_suggested_package(X11)
|
||||
@ -55,7 +55,7 @@ if(NOT WIN32)
|
||||
add_definitions(-DWITH_X11)
|
||||
include_directories(${X11_INCLUDE_DIRS})
|
||||
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_X11_SRCS})
|
||||
set(FREERDP_LOCALE_LINK_LIBRARIES ${FREERDP_LOCALE_LINK_LIBRARIES} ${X11_LIBRARIES})
|
||||
set(FREERDP_LOCALE_LIBS ${FREERDP_LOCALE_LIBS} ${X11_LIBRARIES})
|
||||
if(WITH_SUN)
|
||||
add_definitions(-DWITH_SUN)
|
||||
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_SUN_SRCS})
|
||||
@ -66,17 +66,25 @@ if(NOT WIN32)
|
||||
add_definitions(-DWITH_XKBFILE)
|
||||
include_directories(${XKBFILE_INCLUDE_DIRS})
|
||||
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_XKBFILE_SRCS})
|
||||
set(FREERDP_LOCALE_LINK_LIBRARIES ${FREERDP_LOCALE_LINK_LIBRARIES} ${XKBFILE_LIBRARIES})
|
||||
set(FREERDP_LOCALE_LIBS ${FREERDP_LOCALE_LIBS} ${XKBFILE_LIBRARIES})
|
||||
else()
|
||||
set(FREERDP_LOCALE_SRCS ${FREERDP_LOCALE_SRCS} ${FREERDP_LOCALE_X11_KEYMAP_SRCS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(freerdp-locale ${FREERDP_LOCALE_SRCS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-locale OBJECT ${FREERDP_LOCALE_SRCS})
|
||||
else()
|
||||
add_library(freerdp-locale ${FREERDP_LOCALE_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-locale PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
target_link_libraries(freerdp-locale ${FREERDP_LOCALE_LINK_LIBRARIES})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
set(FREERDP_LOCALE_LIBS ${FREERDP_LOCALE_LIBS} freerdp-utils)
|
||||
target_link_libraries(freerdp-locale ${FREERDP_LOCALE_LIBS})
|
||||
install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -24,10 +24,20 @@ set(FREERDP_RAIL_SRCS
|
||||
rail.c
|
||||
librail.h)
|
||||
|
||||
add_library(freerdp-rail ${FREERDP_RAIL_SRCS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-rail OBJECT ${FREERDP_RAIL_SRCS})
|
||||
else()
|
||||
add_library(freerdp-rail ${FREERDP_RAIL_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-rail PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
target_link_libraries(freerdp-rail freerdp-utils)
|
||||
set(FREERDP_RAIL_LIBS)
|
||||
|
||||
install(TARGETS freerdp-rail DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_RAIL_LIBS ${FREERDP_RAIL_LIBS} freerdp-utils)
|
||||
target_link_libraries(freerdp-rail ${FREERDP_RAIL_LIBS})
|
||||
install(TARGETS freerdp-rail DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -51,7 +51,11 @@ set(FREERDP_UTILS_SRCS
|
||||
unicode.c
|
||||
wait_obj.c)
|
||||
|
||||
add_library(freerdp-utils ${FREERDP_UTILS_SRCS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-utils OBJECT ${FREERDP_UTILS_SRCS})
|
||||
else()
|
||||
add_library(freerdp-utils ${FREERDP_UTILS_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
@ -67,6 +71,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
|
||||
set(FREERDP_UTILS_LIBS ${FREERDP_UTILS_LIBS} rt)
|
||||
endif()
|
||||
|
||||
target_link_libraries(freerdp-utils ${FREERDP_UTILS_LIBS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
install(TARGETS freerdp-utils DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
else()
|
||||
target_link_libraries(freerdp-utils ${FREERDP_UTILS_LIBS})
|
||||
install(TARGETS freerdp-utils DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user