PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/gr-uhd/swig/CMakeLists.txt

https://github.com/benreynwar/gnuradio-old
CMake | 60 lines | 30 code | 9 blank | 21 comment | 1 complexity | e4dd05aa00eb336b666766840ac12aad MD5 | raw file
  1. # Copyright 2011 Free Software Foundation, Inc.
  2. #
  3. # This file is part of GNU Radio
  4. #
  5. # GNU Radio is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3, or (at your option)
  8. # any later version.
  9. #
  10. # GNU Radio is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU Radio; see the file COPYING. If not, write to
  17. # the Free Software Foundation, Inc., 51 Franklin Street,
  18. # Boston, MA 02110-1301, USA.
  19. ########################################################################
  20. # Setup swig generation
  21. ########################################################################
  22. include(GrPython)
  23. include(GrSwig)
  24. set(GR_SWIG_FLAGS -DGR_HAVE_UHD) #needed to parse uhd_swig.i
  25. set(GR_SWIG_INCLUDE_DIRS
  26. ${GR_UHD_INCLUDE_DIRS}
  27. ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
  28. ${Boost_INCLUDE_DIRS}
  29. ${UHD_INCLUDE_DIRS}
  30. )
  31. if(ENABLE_GR_CTRLPORT)
  32. list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
  33. list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
  34. endif(ENABLE_GR_CTRLPORT)
  35. set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/uhd_swig_doc.i)
  36. set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/uhd)
  37. set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
  38. link_directories(${UHD_LIBRARY_DIRS})
  39. set(GR_SWIG_LIBRARIES gnuradio-uhd ${UHD_LIBRARIES})
  40. GR_SWIG_MAKE(uhd_swig uhd_swig.i)
  41. GR_SWIG_INSTALL(
  42. TARGETS uhd_swig
  43. DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
  44. COMPONENT "uhd_python"
  45. )
  46. install(
  47. FILES uhd_swig.i
  48. ${CMAKE_CURRENT_BINARY_DIR}/uhd_swig_doc.i
  49. DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
  50. COMPONENT "uhd_swig"
  51. )