From d1e4798372699f17913db3eccd1a383742749a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 29 Apr 2013 19:53:56 -0400 Subject: [PATCH] cmake: fix default server interface option --- CMakeLists.txt | 24 ++++++++---------------- cmake/ConfigOptions.cmake | 3 ++- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1e369aff..52e3dbd7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,15 +76,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Default to release build type if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") -endif() - -if(NOT DEFINED WITH_CLIENT_INTERFACE) - set(WITH_CLIENT_INTERFACE ON) -endif() - -if(NOT DEFINED WITH_SERVER_INTERFACE) - set(WITH_SERVER_INTERFACE ON) + set(CMAKE_BUILD_TYPE "Release") endif() if(NOT DEFINED BUILD_SHARED_LIBS) @@ -245,6 +237,7 @@ if(ANDROID) endif() set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + if(NOT IOS AND NOT ANDROID) find_package(Threads REQUIRED) endif() @@ -443,9 +436,10 @@ if(WITH_CHANNELS) endif() if (IOS) -set(CMAKE_OSX_DEPLOYMENT_TARGET "") -set(CMAKE_OSX_SYSROOT "iphoneos") + set(CMAKE_OSX_DEPLOYMENT_TARGET "") + set(CMAKE_OSX_SYSROOT "iphoneos") endif() + if(WITH_CLIENT) add_subdirectory(client) endif() @@ -477,7 +471,6 @@ if(NOT WIN32) endif() endif() - endif() set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") @@ -556,10 +549,9 @@ set(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Development") # problems when compiling freerdp/jni. To prevent this problem # we set the macros to "". if (ANDROID AND CMAKE_EXTRA_GENERATOR STREQUAL "Eclipse CDT4") - set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "") - message(STATUS "Disabled CXX system defines for eclipse (workaround).") + set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "") + message(STATUS "Disabled CXX system defines for eclipse (workaround).") endif() - - include(CPack) + diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake index 07dfdc823..84032718f 100644 --- a/cmake/ConfigOptions.cmake +++ b/cmake/ConfigOptions.cmake @@ -76,7 +76,8 @@ endif() option(WITH_THIRD_PARTY "Build third-party components" OFF) -option(WITH_SERVER_INTERFACE "Build server as a library with an interface" OFF) +option(WITH_CLIENT_INTERFACE "Build clients as a library with an interface" ON) +option(WITH_SERVER_INTERFACE "Build servers as a library with an interface" ON) option(WITH_DEBUG_ALL "Print all debug messages." OFF)