diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b96c177d..4178b710a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,17 +21,14 @@ cmake_minimum_required(VERSION 3.13) cmake_policy(SET CMP0091 NEW) -project(FreeRDP C) +project(FreeRDP + LANGUAGES C +) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) -# Default to release build type -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() - add_custom_target(fuzzers COMMENT "Build fuzzers" ) @@ -48,10 +45,6 @@ if(NOT DEFINED FREERDP_VENDOR) set(FREERDP_VENDOR 1) endif() -option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) -option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) -option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - if (NOT WIN32 AND NOT ANDROID) if (APPLE) set(OPT_DEFAULT_VAL OFF) @@ -63,7 +56,7 @@ endif() # Include our extra modules list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) if((CMAKE_SYSTEM_NAME MATCHES "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES "10.0")) set(UWP 1) @@ -92,24 +85,16 @@ include(ShowCMakeVars) include(ConfigOptions) include(FeatureSummary) include(CheckCCompilerFlag) -include(GNUInstallDirsWrapper) include(CMakePackageConfigHelpers) include(InstallFreeRDPMan) include(GetGitRevisionDescription) include(SetFreeRDPCMakeInstallDir) -include(CheckIPOSupported) -check_ipo_supported(RESULT supported OUTPUT error) -if (supported) - option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "Enable LTO linking" TRUE) -endif() - # Soname versioning set(BUILD_NUMBER 0) if ($ENV{BUILD_NUMBER}) set(BUILD_NUMBER $ENV{BUILD_NUMBER}) endif() -set(WITH_LIBRARY_VERSIONING "ON") set(VERSION_REGEX "^(.*)([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)") set(RAW_VERSION_STRING "3.0.1-dev0") @@ -208,12 +193,6 @@ endif(CMAKE_CROSSCOMPILING) # Turn on solution folders (2.8.4+) set_property(GLOBAL PROPERTY USE_FOLDERS ON) - -set(LIB_DEFAULT ON) -if (IOS) - set(LIB_DEFAULT OFF) -endif() -option(BUILD_SHARED_LIBS "Build shared libraries" ${LIB_DEFAULT}) option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF) if(BUILD_TESTING) @@ -234,9 +213,6 @@ if(FREEBSD) find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) endif() -# Configure MSVC Runtime -include(MSVCRuntime) - # Enable 64bit file support on linux and FreeBSD. if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR FREEBSD) add_definitions("-D_FILE_OFFSET_BITS=64") @@ -467,8 +443,6 @@ endif(APPLE) # Android if(ANDROID) - set(WITH_LIBRARY_VERSIONING "OFF") - set_property( GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ${ANDROID_LIBRARY_USE_LIB64_PATHS} ) if (${ANDROID_ABI} STREQUAL "armeabi") @@ -745,9 +719,6 @@ else() set(FREERDP_PROXY_PLUGINDIR "${PROXY_PLUGINDIR}") endif() -# RPATH configuration -include(ConfigureRPATH) - if (BUILD_SHARED_LIBS) set(CMAKE_MACOSX_RPATH ON) endif() diff --git a/ci/cmake-preloads/config-android.txt b/ci/cmake-preloads/config-android.txt index 61ce857a4..0832e8511 100644 --- a/ci/cmake-preloads/config-android.txt +++ b/ci/cmake-preloads/config-android.txt @@ -11,3 +11,4 @@ set (WITH_KRB5 OFF CACHE BOOL "Kerberos support") set (WITH_CLIENT_SDL OFF CACHE BOOL "SDL client") set (WITH_SERVER OFF CACHE BOOL "ci default") set (WITH_X11 OFF CACHE BOOL "ci default") +set (WITH_LIBRARY_VERSIONING OFF CACHE BOOL "ci default") diff --git a/ci/cmake-preloads/config-ios.txt b/ci/cmake-preloads/config-ios.txt index 24d3a7819..72be5ce7d 100644 --- a/ci/cmake-preloads/config-ios.txt +++ b/ci/cmake-preloads/config-ios.txt @@ -11,3 +11,4 @@ set (WITH_KRB5 OFF CACHE BOOL "Kerberos support") set (WITH_CLIENT_SDL OFF CACHE BOOL "SDL client") set (WITH_FFMPEG OFF CACHE BOOL "SDL client") set (WITH_SWSCALE OFF CACHE BOOL "SDL client") +set (BUILD_SHARED_LIBS OFF CACHE BOOL "SDL client") diff --git a/client/Mac/CMakeLists.txt b/client/Mac/CMakeLists.txt index b8171fbad..6b1d5f8eb 100644 --- a/client/Mac/CMakeLists.txt +++ b/client/Mac/CMakeLists.txt @@ -13,12 +13,8 @@ message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") cmake_policy(SET CMP0026 OLD) cmake_policy(SET CMP0045 OLD) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) find_library(FOUNDATION_LIBRARY Foundation REQUIRED) find_library(COCOA_LIBRARY Cocoa REQUIRED) diff --git a/client/Mac/cli/CMakeLists.txt b/client/Mac/cli/CMakeLists.txt index 2704fb13d..b8fc53ada 100644 --- a/client/Mac/cli/CMakeLists.txt +++ b/client/Mac/cli/CMakeLists.txt @@ -11,7 +11,7 @@ project(MacFreeRDP message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) # Import libraries find_library(FOUNDATION_LIBRARY Foundation REQUIRED) diff --git a/client/SDL/CMakeLists.txt b/client/SDL/CMakeLists.txt index 1dc32ae14..acc391505 100644 --- a/client/SDL/CMakeLists.txt +++ b/client/SDL/CMakeLists.txt @@ -33,32 +33,16 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) -option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) -option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) -option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) include(ConfigureFreeRDP) -include(GNUInstallDirsWrapper) - -# RPATH configuration -include(ConfigureRPATH) - option(WITH_DEBUG_SDL_EVENTS "[dangerous, not for release builds!] Debug SDL events" OFF) option(WITH_DEBUG_SDL_KBD_EVENTS "[dangerous, not for release builds!] Debug SDL keyboard events" OFF) option(WITH_WIN_CONSOLE "Build ${PROJECT_NAME} with console support" ON) option(WITH_SDL_LINK_SHARED "link SDL dynamic or static" ON) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() - -# Configure MSVC Runtime -include(MSVCRuntime) - if(WITH_WIN_CONSOLE) set(WIN32_GUI_FLAG "") else() diff --git a/client/Sample/CMakeLists.txt b/client/Sample/CMakeLists.txt index 9cd99a3d0..71436366a 100644 --- a/client/Sample/CMakeLists.txt +++ b/client/Sample/CMakeLists.txt @@ -32,26 +32,11 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) -option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) -option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) -option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/) -include(PreventInSourceBuilds) - -include(MSVCRuntime) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() +include(CommonConfigOptions) include(ConfigureFreeRDP) -include(GNUInstallDirsWrapper) - -# RPATH configuration -include(ConfigureRPATH) - set(SRCS tf_channels.c tf_channels.h diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index b14754935..099d00d42 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -32,24 +32,11 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) -option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) -option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) -option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/) -include(PreventInSourceBuilds) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() +include(CommonConfigOptions) include(ConfigureFreeRDP) -include(GNUInstallDirsWrapper) - -# RPATH configuration -include(ConfigureRPATH) - find_package(X11 REQUIRED) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../resources) diff --git a/client/iOS/CMakeLists.txt b/client/iOS/CMakeLists.txt index 163281e73..f7388b5c4 100644 --- a/client/iOS/CMakeLists.txt +++ b/client/iOS/CMakeLists.txt @@ -27,12 +27,8 @@ project(iFreeRDP message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() - list(APPEND CMAKE_MODULE_PATH ${PROJECT_CURRENT_SOURCE_DIR}/../../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) set(MODULE_NAME "iFreeRDP") set(MODULE_PREFIX "IFREERDP_CLIENT") diff --git a/cmake/CommonConfigOptions.cmake b/cmake/CommonConfigOptions.cmake new file mode 100644 index 000000000..0f767b93a --- /dev/null +++ b/cmake/CommonConfigOptions.cmake @@ -0,0 +1,27 @@ +option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) +option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) +option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) +option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON) +option(WITH_BINARY_VERSIONING "Use binary versioning" OFF) +option(BUILD_SHARED_LIBS "Build shared libraries" ON) + +# TODO: The detection does not properly work +# +#include(CheckIPOSupported) +#check_ipo_supported(RESULT supported OUTPUT error) +#if (NOT supported) +# message(WARNING "LTO not supported, got ${error}") +#endif() + +option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "build with link time optimization" OFF) + +# Default to release build type +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default") +endif() + +include(PreventInSourceBuilds) +include(GNUInstallDirsWrapper) +include(MSVCRuntime) +include(ConfigureRPATH) + diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt index d0e23590b..9ecafa1ba 100644 --- a/rdtk/CMakeLists.txt +++ b/rdtk/CMakeLists.txt @@ -31,27 +31,9 @@ if (NOT FREERDP_UNIFIED_BUILD) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) - include(CheckIPOSupported) - check_ipo_supported(RESULT supported OUTPUT error) - if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - endif() - - - option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) - option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) - option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - set(WINPR_VERSION_MAJOR 3) - option(BUILD_SHARED_LIBS "Build shared libraries" ON) - option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF) + option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF) option(BUILD_TESTING "Build library unit tests" ON) - option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON) - - # Default to release build type - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) - endif() if(CMAKE_COMPILER_IS_GNUCC) if(NOT EXPORT_ALL_SYMBOLS) @@ -65,7 +47,7 @@ endif() # Include our extra modules set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) # Include cmake modules include(CheckIncludeFiles) @@ -77,7 +59,6 @@ include(TestBigEndian) include(CheckCmakeCompat) include(FindFeature) include(CheckCCompilerFlag) -include(GNUInstallDirsWrapper) include(CMakePackageConfigHelpers) include (SetFreeRDPCMakeInstallDir) diff --git a/server/proxy/modules/bitmap-filter/CMakeLists.txt b/server/proxy/modules/bitmap-filter/CMakeLists.txt index 056126c50..2616c2bb3 100644 --- a/server/proxy/modules/bitmap-filter/CMakeLists.txt +++ b/server/proxy/modules/bitmap-filter/CMakeLists.txt @@ -33,11 +33,19 @@ project(proxy-bitmap-filter-plugin message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") +project(proxy-bitmap-filter-plugin + VERSION ${FREERDP_DEFAULT_PROJECT_VERSION} + LANGUAGES CXX +) + +message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/) +include(CommonConfigOptions) + set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -include(MSVCRuntime) - add_library(${PROJECT_NAME} SHARED bitmap-filter.cpp ) diff --git a/server/proxy/modules/capture/CMakeLists.txt b/server/proxy/modules/capture/CMakeLists.txt index 09cb11137..1e7f79477 100644 --- a/server/proxy/modules/capture/CMakeLists.txt +++ b/server/proxy/modules/capture/CMakeLists.txt @@ -37,13 +37,8 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) -include(CheckIPOSupported) -check_ipo_supported(RESULT supported OUTPUT error) -if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -endif() - -include(MSVCRuntime) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/) +include(CommonConfigOptions) add_library(${PROJECT_NAME} SHARED cap_main.c diff --git a/server/proxy/modules/demo/CMakeLists.txt b/server/proxy/modules/demo/CMakeLists.txt index 59232c5ff..22fb64b28 100644 --- a/server/proxy/modules/demo/CMakeLists.txt +++ b/server/proxy/modules/demo/CMakeLists.txt @@ -33,17 +33,12 @@ project(proxy-demo-plugin message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") -include(CheckIPOSupported) -check_ipo_supported(RESULT supported OUTPUT error) -if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -endif() +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/) +include(CommonConfigOptions) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -include(MSVCRuntime) - add_library(${PROJECT_NAME} SHARED demo.cpp ) diff --git a/server/proxy/modules/dyn-channel-dump/CMakeLists.txt b/server/proxy/modules/dyn-channel-dump/CMakeLists.txt index 9973caec8..500e308c0 100644 --- a/server/proxy/modules/dyn-channel-dump/CMakeLists.txt +++ b/server/proxy/modules/dyn-channel-dump/CMakeLists.txt @@ -32,17 +32,12 @@ project(proxy-dyn-channel-dump-plugin message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}") -include(CheckIPOSupported) -check_ipo_supported(RESULT supported OUTPUT error) -if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -endif() +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/) +include(CommonConfigOptions) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -include(MSVCRuntime) - add_library(${PROJECT_NAME} SHARED dyn-channel-dump.cpp ) diff --git a/uwac/CMakeLists.txt b/uwac/CMakeLists.txt index 73a03612e..6e66c8b1f 100644 --- a/uwac/CMakeLists.txt +++ b/uwac/CMakeLists.txt @@ -31,20 +31,8 @@ if (NOT FREERDP_UNIFIED_BUILD) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) - include(CheckIPOSupported) - check_ipo_supported(RESULT supported OUTPUT error) - if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - endif() - - option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) - option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) - option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - - option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF) option(BUILD_TESTING "Build library unit tests" ON) - option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON) if(CMAKE_COMPILER_IS_GNUCC) if(NOT EXPORT_ALL_SYMBOLS) @@ -59,17 +47,10 @@ option(UWAC_HAVE_PIXMAN_REGION "Use PIXMAN or FreeRDP for region calculations" " # Include our extra modules set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/) -include(PreventInSourceBuilds) +include(CommonConfigOptions) # Check for cmake compatibility (enable/disable features) include(FindFeature) -include(SetFreeRDPCMakeInstallDir) -include(CMakePackageConfigHelpers) -include(GNUInstallDirsWrapper) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() if (UWAC_FORCE_STATIC_BUILD) set(BUILD_SHARED_LIBS OFF) diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 05ae08fa3..b5db3fae0 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -28,19 +28,10 @@ if (NOT FREERDP_UNIFIED_BUILD) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS ON) - include(CheckIPOSupported) - check_ipo_supported(RESULT supported OUTPUT error) - if (supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - endif() - - option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON) - option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON) - option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON) - option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON) + include(CommonConfigOptions) + include(ConfigOptions) # Default to build shared libs - option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF) if (EXPORT_ALL_SYMBOLS) @@ -54,8 +45,6 @@ if (NOT FREERDP_UNIFIED_BUILD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") endif() endif() - - include(MSVCRuntime) endif() set(DEFAULT_DEBUG_OPTION OFF) @@ -127,14 +116,11 @@ include(CheckSymbolExists) include(CheckStructHasMember) include(TestBigEndian) -include(PreventInSourceBuilds) - # Check for cmake compatibility (enable/disable features) include(CheckCmakeCompat) include(FindFeature) include(FeatureSummary) include(CheckCCompilerFlag) -include(GNUInstallDirsWrapper) include(InstallFreeRDPMan) include(SetFreeRDPCMakeInstallDir) include(CMakePackageConfigHelpers) @@ -325,11 +311,6 @@ if (WITH_PKCS11) add_definitions("-DWITH_PKCS11") endif() -# Default to release build type -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE) -endif() - if(BUILD_SHARED_LIBS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPR_DLL") endif()