diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 72e508e6f..a5475c1a6 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -160,8 +160,3 @@ endif(ANDROID) if (IOS) include(ConfigOptionsiOS) endif(IOS) - -if (WITH_SERVER) - # Proxy Options - option(WITH_PROXY_MODULES "Compile proxy modules" OFF) -endif() diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 327b52297..2f6eebc68 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -16,10 +16,19 @@ # limitations under the License. # Servers +include(CMakeDependentOption) + +CMAKE_DEPENDENT_OPTION(WITH_SHADOW "Compile with shadow server" ON "WITH_SERVER" OFF) +CMAKE_DEPENDENT_OPTION(WITH_PROXY "Compile with proxy server" ON "WITH_SERVER" OFF) +CMAKE_DEPENDENT_OPTION(WITH_PROXY_MODULES "Compile proxy modules" ON "WITH_PROXY" OFF) add_subdirectory(common) -add_subdirectory(shadow) -add_subdirectory(proxy) +if (WITH_SHADOW) + add_subdirectory(shadow) +endif() +if (WITH_PROXY) + add_subdirectory(proxy) +endif() if(FREERDP_VENDOR) if(WITH_SAMPLE)