[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

@@ -60,6 +60,7 @@ function(cleaning_configure_file RSRC RDST)
# Create a target to recreate the configuration file if something changes.
string(SHA256 DST_HASH "${DST}")
string(SUBSTRING "${DST_HASH}" 0 8 DST_HASH)
if(NOT TARGET ct-${DST_HASH})
add_custom_target(
ct-${DST_HASH} COMMAND ${CMAKE_COMMAND} "-E" "make_directory" "${DST_DIR}"