diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:24:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:24:41 +0000 |
commit | a9bcc81f821d7c66f623779fa5147e728eb3c388 (patch) | |
tree | 98676963bcdd537ae5908a067a8eb110b93486a6 /cmake/CommonConfigOptions.cmake | |
parent | Initial commit. (diff) | |
download | freerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.tar.xz freerdp3-a9bcc81f821d7c66f623779fa5147e728eb3c388.zip |
Adding upstream version 3.3.0+dfsg1.upstream/3.3.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/CommonConfigOptions.cmake')
-rw-r--r-- | cmake/CommonConfigOptions.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cmake/CommonConfigOptions.cmake b/cmake/CommonConfigOptions.cmake new file mode 100644 index 0000000..8d7f485 --- /dev/null +++ b/cmake/CommonConfigOptions.cmake @@ -0,0 +1,36 @@ +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) + +# known issue on android, thus disabled until we support newer CMake +# https://github.com/android/ndk/issues/1444 +if (NOT ANDROID) + if(POLICY CMP0069) + cmake_policy(SET CMP0069 NEW) + endif() + if(POLICY CMP0138) + cmake_policy(SET CMP0138 NEW) + endif() + 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" ${supported}) +endif() + +# 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) +include(ClangTidy) + |