aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/UseMakeDissectorReg.cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-11-29 19:57:00 +0000
committerJörg Mayer <jmayer@loplof.de>2013-11-29 19:57:00 +0000
commitfb22ecce8dd4bced5f34440066d3590d1e31075a (patch)
treee66dd32f0308d02d7bab71446cbbf6ae64012c1a /cmake/modules/UseMakeDissectorReg.cmake
parentd99fdfda639e78feffa3d9a1a6c758ae90539442 (diff)
Graham Bloice
I've now got tshark to build from a VS solution file, had to do some hacks to get there though, patch files attached for others to peruse, as I'm not sure if they are the optimal solutions: 3. As mentioned in my previous message, the VS solution chops out every 8192nd byte from the command line passed to make-dissector-reg.py. My patch (make-reg.patch) gets CMake to write out the required source file list to a file and modifies the python script to read in the file. The python changes *should* be backwards compatible. Me: Small fix to UseMakeDissectorReg.cmake (elseif() -> else()) svn path=/trunk/; revision=53654
Diffstat (limited to 'cmake/modules/UseMakeDissectorReg.cmake')
-rw-r--r--cmake/modules/UseMakeDissectorReg.cmake15
1 files changed, 13 insertions, 2 deletions
diff --git a/cmake/modules/UseMakeDissectorReg.cmake b/cmake/modules/UseMakeDissectorReg.cmake
index 384030b125..ab6df9a0ff 100644
--- a/cmake/modules/UseMakeDissectorReg.cmake
+++ b/cmake/modules/UseMakeDissectorReg.cmake
@@ -2,14 +2,25 @@
# $Id$
#
MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype )
- set( _sources ${ARGN} )
+ if(${_registertype} STREQUAL "dissectors" )
+ set( _makeregistertype "dissectorsinfile" )
+ set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" )
+ file(REMOVE ${_ftmp})
+ foreach(f ${ARGN})
+ file(APPEND ${_ftmp} "${f}\n")
+ endforeach()
+ set( _sources ${_ftmp} )
+ else()
+ set( _makeregistertype ${_registertype} )
+ set( _sources ${ARGN} )
+ endif()
ADD_CUSTOM_COMMAND(
OUTPUT
${_outputfile}
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
${CMAKE_CURRENT_SOURCE_DIR}
- ${_registertype}
+ ${_makeregistertype}
${_sources}
DEPENDS
${_sources}