cmake: started monolithic build option
This commit is contained in:
parent
822242e86f
commit
6a49d43b4b
@ -14,6 +14,10 @@ if(MSVC)
|
||||
option(WITH_NATIVE_SSPI "Use native SSPI modules" ON)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 2.8.7)
|
||||
option(WITH_MONOLITHIC_BUILD "Use monolithic build" OFF)
|
||||
endif()
|
||||
|
||||
option(WITH_CLIENT "Build client binaries" ON)
|
||||
option(WITH_SERVER "Build server binaries" OFF)
|
||||
option(WITH_CHANNELS "Build virtual channel plugins" ON)
|
||||
|
@ -27,14 +27,23 @@ set(FREERDP_CACHE_SRCS
|
||||
glyph.c
|
||||
cache.c)
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-cache OBJECT ${FREERDP_CACHE_SRCS})
|
||||
else()
|
||||
add_library(freerdp-cache ${FREERDP_CACHE_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-cache PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(FREERDP_CACHE_LIBS
|
||||
set(FREERDP_CACHE_LIBS)
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_CACHE_LIBS ${FREERDP_CACHE_LIBS}
|
||||
freerdp-core
|
||||
freerdp-utils)
|
||||
|
||||
target_link_libraries(freerdp-cache ${FREERDP_CACHE_LIBS})
|
||||
|
||||
install(TARGETS freerdp-cache DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -23,13 +23,22 @@ set(FREERDP_CHANNELS_SRCS
|
||||
wtsvc.c
|
||||
wtsvc.h)
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-channels OBJECT ${FREERDP_CHANNELS_SRCS})
|
||||
else()
|
||||
add_library(freerdp-channels ${FREERDP_CHANNELS_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-channels PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(FREERDP_CHANNELS_LIBS
|
||||
set(FREERDP_CHANNELS_LIBS)
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_CHANNELS_LIBS ${FREERDP_CHANNELS_LIBS}
|
||||
freerdp-utils)
|
||||
|
||||
target_link_libraries(freerdp-channels ${FREERDP_CHANNELS_LIBS})
|
||||
|
||||
install(TARGETS freerdp-channels DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -77,14 +77,23 @@ if(WITH_JPEG)
|
||||
set(FREERDP_JPEG_LIBS jpeg)
|
||||
endif()
|
||||
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
add_library(freerdp-codec OBJECT ${FREERDP_CODEC_SRCS})
|
||||
else()
|
||||
add_library(freerdp-codec ${FREERDP_CODEC_SRCS})
|
||||
endif()
|
||||
|
||||
set_target_properties(freerdp-codec PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(FREERDP_CODEC_LIBS
|
||||
freerdp-utils
|
||||
${FREERDP_JPEG_LIBS})
|
||||
|
||||
target_link_libraries(freerdp-codec ${FREERDP_CODEC_LIBS})
|
||||
if(WITH_MONOLITHIC_BUILD)
|
||||
|
||||
else()
|
||||
set(FREERDP_CODEC_LIBS ${FREERDP_CODEC_LIBS}
|
||||
freerdp-utils)
|
||||
|
||||
target_link_libraries(freerdp-codec ${FREERDP_CODEC_LIBS})
|
||||
install(TARGETS freerdp-codec DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
@ -119,4 +119,3 @@ set(FREERDP_CORE_LIBS ${FREERDP_CORE_LIBS} ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(freerdp-core ${FREERDP_CORE_LIBS})
|
||||
|
||||
install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
|
@ -55,13 +55,18 @@ add_library(freerdp-utils ${FREERDP_UTILS_SRCS})
|
||||
|
||||
set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
set(FREERDP_UTILS_LIBS
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${CMAKE_DL_LIBS})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(freerdp-utils ws2_32)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
|
||||
target_link_libraries(freerdp-utils rt)
|
||||
set(FREERDP_UTILS_LIBS ${FREERDP_UTILS_LIBS} ws2_32)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
|
||||
set(FREERDP_UTILS_LIBS ${FREERDP_UTILS_LIBS} rt)
|
||||
endif()
|
||||
|
||||
target_link_libraries(freerdp-utils ${FREERDP_UTILS_LIBS})
|
||||
|
||||
install(TARGETS freerdp-utils DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
Loading…
Reference in New Issue
Block a user