cmake: started simplifying monolithic build option

This commit is contained in:
Marc-André Moreau 2012-10-13 15:20:39 -04:00
parent 5b1a7104a0
commit 639bb0d79d
12 changed files with 145 additions and 107 deletions

View File

@ -37,6 +37,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(AutoVersioning) include(AutoVersioning)
include(ConfigOptions) include(ConfigOptions)
include(ComplexLibrary)
include(BuildFeatureCheck) include(BuildFeatureCheck)
include(FindOptionalPackage) include(FindOptionalPackage)
include(CheckCCompilerFlag) include(CheckCCompilerFlag)

View File

@ -96,17 +96,9 @@ include_directories(${CMAKE_SOURCE_DIR}/resources)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client)
if(MONOLITHIC_BUILD) set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD}
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp) MODULE freerdp
else() MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-rail freerdp-channels freerdp-utils)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-gdi
freerdp-locale
freerdp-rail
freerdp-channels
freerdp-utils)
endif()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -0,0 +1,48 @@
include(CMakeParseArguments)
macro(set_complex_link_libraries)
set(PREFIX "COMPLEX_LIBRARY")
cmake_parse_arguments(${PREFIX}
"INTERNAL"
"MODULE;VARIABLE;MONOLITHIC"
"MODULES"
${ARGN})
if(NOT DEFINED ${PREFIX}_MONOLITHIC)
set(${PREFIX}_MONOLITHIC FALSE)
endif()
if(${${PREFIX}_MONOLITHIC})
if(${${PREFIX}_INTERNAL})
set(${PREFIX}_LIBS)
else()
set(${PREFIX}_LIBS ${${PREFIX}_MODULE})
endif()
else()
set(${PREFIX}_LIBS ${${PREFIX}_MODULES})
endif()
set(${${PREFIX}_VARIABLE} ${${${PREFIX}_VARIABLE}} ${${PREFIX}_LIBS})
endmacro(set_complex_link_libraries)
macro(add_complex_library)
set(PREFIX "COMPLEX_LIBRARY")
cmake_parse_arguments(${PREFIX}
""
"MODULE;TYPE;MONOLITHIC"
"SOURCES"
${ARGN})
if(${${PREFIX}_MONOLITHIC})
add_library(${${PREFIX}_MODULE} ${${PREFIX}_TYPE} ${${PREFIX}_SOURCES})
else()
add_library(${${PREFIX}_MODULE} ${${PREFIX}_SOURCES})
endif()
endmacro(add_complex_library)

View File

@ -28,21 +28,20 @@ set(${MODULE_PREFIX}_SRCS
glyph.c glyph.c
cache.c) cache.c)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-core freerdp-utils)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -24,26 +24,25 @@ set(${MODULE_PREFIX}_SRCS
wtsvc.c wtsvc.c
wtsvc.h) wtsvc.h)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-utils)
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
MODULE winpr
MODULES winpr-crt winpr-synch winpr-interlocked)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-utils)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
winpr-crt
winpr-synch
winpr-interlocked)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -78,23 +78,23 @@ if(WITH_JPEG)
set(FREERDP_JPEG_LIBS jpeg) set(FREERDP_JPEG_LIBS jpeg)
endif() endif()
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set(${MODULE_PREFIX}_LIBS set(${MODULE_PREFIX}_LIBS
${FREERDP_JPEG_LIBS}) ${FREERDP_JPEG_LIBS})
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-utils)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -92,11 +92,9 @@ set(${MODULE_PREFIX}_SRCS
peer.c peer.c
peer.h) peer.h)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
@ -104,12 +102,10 @@ if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS winpr) set(${MODULE_PREFIX}_LIBS winpr)
else() else()
set(${MODULE_PREFIX}_LIBS set(${MODULE_PREFIX}_LIBS
winpr-registry
winpr-utils winpr-utils
winpr-sspi winpr-sspi
winpr-crt) winpr-crt)
if (NOT WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-registry)
endif()
endif() endif()
if(WIN32) if(WIN32)
@ -120,15 +116,14 @@ endif()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${OPENSSL_LIBRARIES})
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-core freerdp-crypto freerdp-codec freerdp-locale freerdp-utils)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-utils
freerdp-codec
freerdp-crypto
freerdp-locale)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -28,11 +28,9 @@ set(${MODULE_PREFIX}_SRCS
crypto.c crypto.c
tls.c) tls.c)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS})
@ -45,11 +43,7 @@ set(${MODULE_PREFIX}_LIBS
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-sspi) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-sspi winpr-library)
if(NOT WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-library)
endif()
endif() endif()
if(WIN32) if(WIN32)
@ -58,13 +52,19 @@ else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ZLIB_LIBRARIES})
endif() endif()
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-utils)
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
MODULE winpr
MODULES winpr-crt)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -39,22 +39,20 @@ set(${MODULE_PREFIX}_SRCS
gdi.c gdi.c
gdi.h) gdi.h)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-core freerdp-cache freerdp-codec)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
freerdp-core
freerdp-cache
freerdp-codec)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -72,21 +72,25 @@ if(NOT WIN32)
endif() endif()
endif() endif()
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-utils)
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
MODULE winpr
MODULES winpr-crt)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -25,19 +25,20 @@ set(${MODULE_PREFIX}_SRCS
rail.c rail.c
librail.h) librail.h)
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
MODULE freerdp
MODULES freerdp-utils)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(FREERDP_RAIL_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-utils)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()

View File

@ -52,11 +52,9 @@ if(NOT WIN32)
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} msusb.c) set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} msusb.c)
endif() endif()
if(MONOLITHIC_BUILD) add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) MONOLITHIC ${MONOLITHIC_BUILD}
else() SOURCES ${${MODULE_PREFIX}_SRCS})
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
@ -72,11 +70,14 @@ if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt)
endif() endif()
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}
MODULE winpr
MODULES winpr-crt winpr-synch)
if(MONOLITHIC_BUILD) if(MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE) set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else() else()
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr-crt winpr-synch)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()