mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Merge pull request #8641 from tomlankhorst/use-lto
Detect availability of LTO, apply when available
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# CMAKE project for openrct2-cli (CLI-only build of OpenRCT2)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
||||
endif ()
|
||||
@@ -14,6 +14,7 @@ file(GLOB_RECURSE OPENRCT2_CLI_SOURCES
|
||||
set (PROJECT openrct2-cli)
|
||||
project(${PROJECT} CXX)
|
||||
add_executable(${PROJECT} ${OPENRCT2_CLI_SOURCES})
|
||||
ipo_set_target_properties(${PROJECT})
|
||||
|
||||
target_link_libraries(${PROJECT} "libopenrct2")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# CMAKE project for openrct2-ui (UI build of OpenRCT2)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
||||
endif ()
|
||||
@@ -49,6 +49,8 @@ endif ()
|
||||
set (PROJECT openrct2)
|
||||
project(${PROJECT} CXX)
|
||||
add_executable(${PROJECT} ${OPENRCT2_UI_SOURCES} ${OPENRCT2_UI_MM_SOURCES})
|
||||
SET_CHECK_CXX_FLAGS(${PROJECT})
|
||||
ipo_set_target_properties(${PROJECT})
|
||||
|
||||
target_link_libraries(${PROJECT} "libopenrct2"
|
||||
${SDL2_LDFLAGS}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# CMAKE project for libopenrct2 (core OpenRCT2 component)
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
||||
endif ()
|
||||
@@ -74,6 +74,7 @@ set(PROJECT libopenrct2)
|
||||
project(${PROJECT} CXX)
|
||||
add_library(${PROJECT} ${OPENRCT2_CORE_SOURCES} ${OPENRCT2_CORE_MM_SOURCES} ${RCT2_SECTIONS})
|
||||
set_target_properties(${PROJECT} PROPERTIES PREFIX "")
|
||||
SET_CHECK_CXX_FLAGS(${PROJECT})
|
||||
|
||||
if (benchmark_FOUND)
|
||||
message("Found Google benchmark, enabling support")
|
||||
|
||||
Reference in New Issue
Block a user