diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-07-20 16:30:51 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-07-21 00:18:43 +0000 |
commit | 66935d8baadfe7dd62b4e8d4412a47f311ead7f5 (patch) | |
tree | 3aa4c4c15bf0f15f6410979229dadac04592f68b /docbook/CMakeLists.txt | |
parent | 1ec79c84f01aa3faaff3172f49135992ec929686 (diff) |
CMake: Add tools help checks.
Generate help for dumpcap and rawshark only if PCAP_FOUND is true. Note
that we should generate all of the tools help conditionally.
Change-Id: I2145717dee8d8a1ac3d4fd328240f58dbdd07e6c
Reviewed-on: https://code.wireshark.org/review/28785
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'docbook/CMakeLists.txt')
-rw-r--r-- | docbook/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt index 0fdcbbd6d2..7d0edc9126 100644 --- a/docbook/CMakeLists.txt +++ b/docbook/CMakeLists.txt @@ -63,15 +63,20 @@ set(COMMON_GRAPHICS set(WSUG_TOOLS_HELP_COMMANDS capinfos - dumpcap editcap mergecap - rawshark reordercap text2pcap tshark ) +if (PCAP_FOUND) + list(APPEND WSUG_TOOLS_HELP_COMMANDS + dumpcap + rawshark + ) +endif(PCAP_FOUND) + # We want the wsug_* targets to depend on the tools help files. # We want update_tools_help to be an independent target. # We don't necessarily want to depend on building our executables before @@ -80,6 +85,11 @@ set(WSUG_TOOLS_HELP_FILES) set(GUIDE_INSTALL_DIRS) # General help output +# XXX We should probably do this conditionally, e.g. based on +# if (TARGET ${th_command}) ... +# However, if we do so we'll have to make sure this is processed after +# our targets are created. + foreach(th_command ${WSUG_TOOLS_HELP_COMMANDS}) set(th_file ${CMAKE_CURRENT_SOURCE_DIR}/wsug_src/${th_command}-h.txt) list(APPEND WSUG_TOOLS_HELP_FILES ${th_file}) |