CMake options to compile without proxy or shadow
authorArmin Novak <armin.novak@thincast.com>
Mon, 9 Mar 2020 07:48:57 +0000 (08:48 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 9 Mar 2020 07:50:40 +0000 (08:50 +0100)
* Added WITH_SHADOW (default ON) to compile without shadow server
* Added WITH_PROXY (default ON) to compile without proxy server

cmake/ConfigOptions.cmake
server/CMakeLists.txt

index 72e508e..a5475c1 100644 (file)
@@ -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()
index 327b522..2f6eebc 100644 (file)
 # 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)