Add LTO settings

This commit is contained in:
akallabeth 2022-05-25 13:44:30 +02:00 committed by akallabeth
parent 35f575a753
commit a0ca2b4a6e
6 changed files with 44 additions and 6 deletions

View File

@ -18,7 +18,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(FreeRDP C)
@ -26,6 +26,12 @@ set(CMAKE_C_STANDARD 99)
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()
if(NOT DEFINED VENDOR)
set(VENDOR "FreeRDP" CACHE STRING "FreeRDP package vendor")
endif()

View File

@ -24,13 +24,20 @@ set(RDTK_VERSION_FULL "${RDTK_VERSION}")
set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}")
if (NOT FREERDP_UNIFIED_BUILD)
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(RdTk VERSION ${RDTK_VERSION} LANGUAGES C)
set(CMAKE_C_STANDARD 99)
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()
set(CMAKE_COLOR_MAKEFILE ON)
set(WINPR_VERSION_MAJOR 3)

View File

@ -19,10 +19,16 @@
# limitations under the License.
#
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(proxy-capture-plugin VERSION 1.0.0 LANGUAGES C)
include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT error)
if (supported)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
add_library(${PROJECT_NAME} MODULE
cap_main.c
cap_config.c

View File

@ -19,10 +19,16 @@
# limitations under the License.
#
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(proxy-demo-plugin VERSION 1.0.0 LANGUAGES CXX)
include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT error)
if (supported)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

View File

@ -24,13 +24,19 @@ set(UWAC_VERSION_FULL "${UWAC_VERSION}")
set(UWAC_API_VERSION "${UWAC_VERSION_MAJOR}")
if (NOT FREERDP_UNIFIED_BUILD)
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(uwac VERSION ${UWAC_VERSION} LANGUAGES C)
set(CMAKE_C_STANDARD 99)
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()
set(CMAKE_COLOR_MAKEFILE ON)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

View File

@ -16,13 +16,20 @@
# limitations under the License.
if (NOT FREERDP_UNIFIED_BUILD)
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.9)
project(WinPR LANGUAGES C)
set(CMAKE_C_STANDARD 99)
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()
set(CMAKE_COLOR_MAKEFILE ON)
option(WITH_LIBRARY_VERSIONING "Use library version triplet" ON)