mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[cmake] unify common options
This commit is contained in:
27
cmake/CommonConfigOptions.cmake
Normal file
27
cmake/CommonConfigOptions.cmake
Normal file
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user