aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-10-01 17:18:31 -0700
committerGerald Combs <gerald@wireshark.org>2014-10-02 22:50:06 +0000
commit242a1e501262000446d07f6b661489a8b9d8869c (patch)
tree1a8b67d3e2d27450673c0de60f24fd7e06880b8f /CMakeLists.txt
parentff7b51f920e1b3ef6ccc3c9eb771d3ca67c8aee1 (diff)
CMake: Don't assume we have a "cat" command.
Use "copy /B" on Windows to create wireshark.pod, similar to doc/Makefile.nmake. Change-Id: I454afca0bd3497cca795ca18256dd7c4e2f224d4 Reviewed-on: https://code.wireshark.org/review/4415 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 25 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f9345d80f..608da82113 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1464,23 +1464,42 @@ ADD_CUSTOM_COMMAND(
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
- ${CMAKE_BINARY_DIR}/wireshark.pod
COMMAND ${PERL_EXECUTABLE}
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
< ${CMAKE_BINARY_DIR}/AUTHORS-SHORT
> ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
- COMMAND cat
- ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
- ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
- > ${CMAKE_BINARY_DIR}/wireshark.pod
DEPENDS
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
- ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
)
+if(WIN32)
+FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template WPT_WIN_PATH)
+FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT ASF_WIN_PATH)
+FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/wireshark.pod WP_WIN_PATH)
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
+ COMMAND copy /B ${WPT_WIN_PATH} + ${ASF_WIN_PATH} ${WP_WIN_PATH}
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
+ ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
+)
+else()
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
+ COMMAND cat
+ ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
+ ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
+ > ${CMAKE_BINARY_DIR}/wireshark.pod
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
+ ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
+)
+endif()
+
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/capinfos 1 )
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/captype 1 )
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/dftest 1 )