diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-11-21 13:13:39 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-11-21 16:47:59 +0000 |
commit | 02fdea06de4590033a4997e19f6239efae6ea6ff (patch) | |
tree | 0065e4ee5401949a436d0108b8beed7d8fd6aaf6 | |
parent | d7adc4328c9be7802f7916fe64fffdc602189357 (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>
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | docbook/CMakeLists.txt | 18 |
2 files changed, 21 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore index 0b4efeb72e..5cd933b999 100644 --- a/.gitignore +++ b/.gitignore @@ -121,6 +121,16 @@ cmake_install.cmake CPackConfig.cmake CPackSourceConfig.cmake lib/ +WiresharkConfig.cmake +WiresharkConfigVersion.cmake +epan/_regc.tmp +wireshark.pc +run/ +tshark-tap-register-cache.pkl +build.ninja +rules.ninja +.ninja_deps +.ninja_log # Generated dir # 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") |