aboutsummaryrefslogtreecommitdiffstats
path: root/docbook
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-11-21 13:13:39 +0100
committerPeter Wu <peter@lekensteyn.nl>2015-11-21 16:47:59 +0000
commit02fdea06de4590033a4997e19f6239efae6ea6ff (patch)
tree0065e4ee5401949a436d0108b8beed7d8fd6aaf6 /docbook
parentd7adc4328c9be7802f7916fe64fffdc602189357 (diff)
cmake: do not remove ws.css; ignore auto-generated files
Do not remove "ws.css" when doing a build in the source tree. Ignore files that were automatically generated with cmake and the Ninja generator (cmake -GNinja). Change-Id: I24cae27eb8ae9664e3354ba646fd5503649349b1 Reviewed-on: https://code.wireshark.org/review/12007 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'docbook')
-rw-r--r--docbook/CMakeLists.txt18
1 files changed, 11 insertions, 7 deletions
diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt
index f4104ef37b..c99692ed68 100644
--- a/docbook/CMakeLists.txt
+++ b/docbook/CMakeLists.txt
@@ -232,12 +232,16 @@ set(WSUG_SOURCE
${WSUG_GRAPHICS}
)
-add_custom_command(
- OUTPUT ws.css
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${CMAKE_CURRENT_SOURCE_DIR}/ws.css
- ${CMAKE_CURRENT_BINARY_DIR}/ws.css
-)
+if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+ add_custom_command(
+ OUTPUT ws.css
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/ws.css
+ ${CMAKE_CURRENT_BINARY_DIR}/ws.css
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/ws.css
+ )
+endif()
set( WSUG_BUILT_DEPS ws.css )
@@ -496,7 +500,7 @@ add_custom_target(
${CMAKE_CURRENT_BINARY_DIR}/release-notes.txt
${CMAKE_SOURCE_DIR}/NEWS
DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/release-notes.txt
+ ${CMAKE_CURRENT_BINARY_DIR}/release-notes.txt
)
set_target_properties(news PROPERTIES FOLDER "Docbook")