From 5d829a516819f8065f67119fba26afe7ac55e0d0 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 8 Feb 2021 16:57:15 +0100 Subject: [PATCH] devilutionX: fix build with ninja --- ...6fe89ea1977aa296277694a6e94314aca0a8.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 srcpkgs/devilutionX/patches/201c6fe89ea1977aa296277694a6e94314aca0a8.patch diff --git a/srcpkgs/devilutionX/patches/201c6fe89ea1977aa296277694a6e94314aca0a8.patch b/srcpkgs/devilutionX/patches/201c6fe89ea1977aa296277694a6e94314aca0a8.patch new file mode 100644 index 00000000000..9dfe2413e72 --- /dev/null +++ b/srcpkgs/devilutionX/patches/201c6fe89ea1977aa296277694a6e94314aca0a8.patch @@ -0,0 +1,30 @@ +From 201c6fe89ea1977aa296277694a6e94314aca0a8 Mon Sep 17 00:00:00 2001 +From: Alex Sweet +Date: Mon, 23 Mar 2020 01:59:33 -0700 +Subject: [PATCH] Fix ninja-build build error + +--- + CMakeLists.txt | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a8f0c4492..89051b7bc 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -502,8 +502,14 @@ endif() + + if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Change __FILE__ to only show the path relative to the project folder +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-builtin-macro-redefined -D'__FILE__=\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(abspath $<))\"'") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-builtin-macro-redefined -D'__FILE__=\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(abspath $<))\"'") ++ get_target_property(devilution_SRCS devilution SOURCES) ++ foreach(SOURCE_FILE ${devilution_SRCS} ${devilutionx_SRCS}) ++ set_source_files_properties(${SOURCE_FILE} PROPERTIES ++ COMPILE_DEFINITIONS __FILE__="${SOURCE_FILE}" ++ ) ++ endforeach(SOURCE_FILE) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-builtin-macro-redefined") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-builtin-macro-redefined") + + if(DEBUG) + # Note: For Valgrind suppor.