1*e25b118aSDominic Spill# Copyright 2013 Dominic Spill 2*e25b118aSDominic Spill# 3*e25b118aSDominic Spill# This file is part of Libbtbb (pcapdump) 4*e25b118aSDominic Spill# 5*e25b118aSDominic Spill# GNU Radio is free software; you can redistribute it and/or modify 6*e25b118aSDominic Spill# it under the terms of the GNU General Public License as published by 7*e25b118aSDominic Spill# the Free Software Foundation; either version 2, or (at your option) 8*e25b118aSDominic Spill# any later version. 9*e25b118aSDominic Spill# 10*e25b118aSDominic Spill# GNU Radio is distributed in the hope that it will be useful, 11*e25b118aSDominic Spill# but WITHOUT ANY WARRANTY; without even the implied warranty of 12*e25b118aSDominic Spill# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*e25b118aSDominic Spill# GNU General Public License for more details. 14*e25b118aSDominic Spill# 15*e25b118aSDominic Spill# You should have received a copy of the GNU General Public License 16*e25b118aSDominic Spill# along with GNU Radio; see the file COPYING. If not, write to 17*e25b118aSDominic Spill# the Free Software Foundation, Inc., 51 Franklin Street, 18*e25b118aSDominic Spill# Boston, MA 02110-1301, USA. 19*e25b118aSDominic Spill 20*e25b118aSDominic Spillset(SETUP_PY_IN ${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in) 21*e25b118aSDominic Spillset(SETUP_PY ${CMAKE_CURRENT_BINARY_DIR}/setup.py) 22*e25b118aSDominic Spillset(DEPS ${CMAKE_CURRENT_SOURCE_DIR}/pcapdump/__init__.py 23*e25b118aSDominic Spill ${CMAKE_CURRENT_SOURCE_DIR}/pcapdump/pcapdump.py) 24*e25b118aSDominic Spillset(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/build) 25*e25b118aSDominic Spill 26*e25b118aSDominic Spillconfigure_file(${SETUP_PY_IN} ${SETUP_PY}) 27*e25b118aSDominic Spill 28*e25b118aSDominic Spilladd_custom_command(OUTPUT ${OUTPUT}/timestamp 29*e25b118aSDominic Spill COMMAND ${PYTHON_EXECUTABLE} setup.py build 30*e25b118aSDominic Spill COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}/timestamp 31*e25b118aSDominic Spill DEPENDS ${DEPS}) 32*e25b118aSDominic Spill 33*e25b118aSDominic Spilladd_custom_target(pcapdump ALL DEPENDS ${OUTPUT}/timestamp) 34*e25b118aSDominic Spillinstall(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build -b ${OUTPUT} install)") 35*e25b118aSDominic Spill 36*e25b118aSDominic Spilladd_custom_target(btaptap ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/btaptap) 37*e25b118aSDominic Spillinstall(PROGRAMS btaptap DESTINATION ${INSTALL_DEFAULT_BINDIR}) 38*e25b118aSDominic Spill 39