diff options
author | Maarten Bezemer <maarten.bezemer@gmail.com> | 2014-11-16 16:07:45 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-12-18 07:42:39 +0000 |
commit | cb345eb4bd0149b4a71d6069f957600a83cc3417 (patch) | |
tree | 34b53f01e4f6f894a9ab59d2479e5d997e01aeac /cmake/modules/UseMakeDissectorReg.cmake | |
parent | 0885d2945103236f7f475963f66048291f0b18f1 (diff) |
Use LocatePythonModule to find make-dissector-reg.py in order to make UseMakeDissectorReg.cmake more generally (out-of-source) usable.
Add make-dissector-reg.py to the Debian packages.
Making it possible to generate out-of-source wireshark plugins.
Change-Id: I0bbe5b46205d39e229d31812341540b26a7336d6
Reviewed-on: https://code.wireshark.org/review/5802
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake/modules/UseMakeDissectorReg.cmake')
-rw-r--r-- | cmake/modules/UseMakeDissectorReg.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/modules/UseMakeDissectorReg.cmake b/cmake/modules/UseMakeDissectorReg.cmake index 6c1cda5cba..d805ef20e1 100644 --- a/cmake/modules/UseMakeDissectorReg.cmake +++ b/cmake/modules/UseMakeDissectorReg.cmake @@ -1,5 +1,8 @@ # MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype ) + include(LocatePythonModule) + locate_python_module(make-dissector-reg REQUIRED PATHS ${CMAKE_SOURCE_DIR}/tools) + if(${_registertype} STREQUAL "dissectors" ) set( _makeregistertype "dissectorsinfile" ) set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" ) @@ -18,13 +21,12 @@ MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype ) OUTPUT ${_outputfile} COMMAND ${PYTHON_EXECUTABLE} - ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py + ${PY_MAKE-DISSECTOR-REG} ${CMAKE_CURRENT_SOURCE_DIR} ${_makeregistertype} ${_sources} DEPENDS ${_depends} - ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py + ${PY_MAKE-DISSECTOR-REG} ) ENDMACRO(REGISTER_DISSECTOR_FILES) - |