summaryrefslogtreecommitdiff
blob: d69d1cd2f6541ad523fe2d2ef51221baa73f7f61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 5e8024c683891be677075d74cedfbf424e36bc31 Mon Sep 17 00:00:00 2001
From: mirabilos <tg@debian.org>
Date: Sun, 4 Mar 2018 16:38:21 +0100
Subject: [PATCH] Fix numerous reports of missing all.h during compilation

When disabling PCH, the all.h copying code is no longer run before
AUTOMOC=caused *_autogen targets, so we must run it earlier.

From Debian
---
 CMakeLists.txt | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66b0ddfce8..7fdfffcc9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -553,11 +553,8 @@ endif (NOT MINGW AND NOT APPLE)
 #
 
 # all.h is expected in PROJECT_BINARY_DIR by subdirs
-add_custom_command(
-    OUTPUT ${PROJECT_BINARY_DIR}/all.h
-    COMMAND ${CMAKE_COMMAND}
-    ARGS -E copy ${PROJECT_SOURCE_DIR}/all.h ${PROJECT_BINARY_DIR}/all.h
-    DEPENDS ${PROJECT_SOURCE_DIR}/all.h
+execute_process(
+    COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/all.h ${PROJECT_BINARY_DIR}/all.h
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
     )