[cmake] refactor configuration

* Split common stuff to reusable files
* Disable INTERPROCEDURAL_OPTIMIZATION for SDL2/3 resource targets
This commit is contained in:
akallabeth
2024-11-12 09:36:25 +01:00
parent 2bb75c195b
commit 0ae7c4b52d
19 changed files with 181 additions and 277 deletions

View File

@@ -31,18 +31,12 @@ if(NOT FREERDP_UNIFIED_BUILD)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF)
option(BUILD_TESTING_INTERNAL "Build library unit tests" ON)
if(CMAKE_COMPILER_IS_GNUCC)
if(NOT EXPORT_ALL_SYMBOLS)
message(STATUS "GCC default symbol visibility: hidden")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif()
endif()
include(ExportAllSymbols)
endif()
option(UWAC_FORCE_STATIC_BUILD "Force UWAC to be built as static library (recommended)" OFF)
option(UWAC_FORCE_STATIC_BUILD "Force UWAC to be build as static library (recommended)" OFF)
option(UWAC_HAVE_PIXMAN_REGION "Use PIXMAN or FreeRDP for region calculations" "NOT FREERDP_UNIFIED_BUILD")
# Include our extra modules