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()