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>
This commit is contained in:
Peter Wu 2015-11-21 13:13:39 +01:00
parent d7adc4328c
commit 02fdea06de
2 changed files with 21 additions and 7 deletions

10
.gitignore vendored
View File

@ -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 #

View File

@ -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")