diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index 7e761e8dc..334b65a0b 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -25,7 +25,13 @@ add_executable(wfreerdp-server wfreerdp.c wfreerdp.h) -target_link_libraries(wfreerdp-server freerdp-core) -target_link_libraries(wfreerdp-server freerdp-utils) -target_link_libraries(wfreerdp-server freerdp-codec) -target_link_libraries(wfreerdp-server freerdp-channels) +if(WITH_MONOLITHIC_BUILD) + target_link_libraries(wfreerdp-server freerdp) +else() + target_link_libraries(wfreerdp-server + freerdp-core + freerdp-utils + freerdp-codec + freerdp-channels) +endif() + diff --git a/server/X11/CMakeLists.txt b/server/X11/CMakeLists.txt index 11a4202f3..dbfa392e9 100644 --- a/server/X11/CMakeLists.txt +++ b/server/X11/CMakeLists.txt @@ -60,11 +60,17 @@ if(WITH_XTEST) target_link_libraries(xfreerdp-server ${XTEST_LIBRARIES}) endif() -target_link_libraries(xfreerdp-server freerdp-core) -target_link_libraries(xfreerdp-server freerdp-codec) -target_link_libraries(xfreerdp-server freerdp-utils) -target_link_libraries(xfreerdp-server freerdp-gdi) -target_link_libraries(xfreerdp-server freerdp-crypto) -target_link_libraries(xfreerdp-server freerdp-locale) +if(WITH_MONOLITHIC_BUILD) + target_link_libraries(xfreerdp-server freerdp) +else() + target_link_libraries(xfreerdp-server + freerdp-core + freerdp-codec + freerdp-utils + freerdp-gdi + freerdp-crypto + freerdp-locale) +endif() + target_link_libraries(xfreerdp-server ${X11_LIBRARIES}) target_link_libraries(xfreerdp-server winpr-sspi) diff --git a/server/channels/CMakeLists.txt b/server/channels/CMakeLists.txt index b4cd4cb4f..2ee9473e5 100644 --- a/server/channels/CMakeLists.txt +++ b/server/channels/CMakeLists.txt @@ -19,13 +19,16 @@ set(FREERDP_SERVER_CHANNELS_SRCS audin.c - rdpsnd.c -) + rdpsnd.c) add_library(freerdp-server-channels ${FREERDP_SERVER_CHANNELS_SRCS}) set_target_properties(freerdp-server-channels PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -target_link_libraries(freerdp-server-channels freerdp-channels freerdp-utils) + +if(WITH_MONOLITHIC_BUILD) + target_link_libraries(freerdp-server-channels freerdp) +else() + target_link_libraries(freerdp-server-channels freerdp-channels freerdp-utils) +endif() install(TARGETS freerdp-server-channels DESTINATION ${CMAKE_INSTALL_LIBDIR}) - diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt index 368d4d976..fbf0d72ce 100644 --- a/server/test/CMakeLists.txt +++ b/server/test/CMakeLists.txt @@ -20,8 +20,15 @@ add_executable(tfreerdp-server tfreerdp.c) -target_link_libraries(tfreerdp-server freerdp-core) -target_link_libraries(tfreerdp-server freerdp-utils) -target_link_libraries(tfreerdp-server freerdp-codec) -target_link_libraries(tfreerdp-server freerdp-channels) -target_link_libraries(tfreerdp-server freerdp-server-channels) +if(WITH_MONOLITHIC_BUILD) + target_link_libraries(tfreerdp-server + freerdp + freerdp-server-channels) +else() + target_link_libraries(tfreerdp-server + freerdp-core + freerdp-utils + freerdp-codec + freerdp-channels + freerdp-server-channels) +endif()