artfib.com
It Was Like Christ
It Smells Like Suc
That's a bald-face
It Is Not a High W
It Is Game Time Ki
It Hit Everyone Pr
It Don't Take a Sm
It Could All Backf
This bread ain't gfoxbum.com
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
if(USE_PYTHON)
find_package(PythonLibs 2.7 REQUIRED)
if(NOT PYTHONLIBS_FOUND)
# we need to link against the Python libraries in order to
# dynamically load modules containing Python callbacks:
message(FATAL_ERROR "PythonLibs not found, please install it or set USE_PYTHON=OFF")
endif()
endif()
if(USE_FAST_MATH)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ffast-math")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse")
endif()
message(STATUS "PyBOMBS version ${BOOMBS_VERSION}")
# Python module which implements an interface
# interface
# add_handler() : creates a pybombs python method with one argument
# :
# get_target() : returns a reference to the instance of the pybombs object which was passed in to add_handler()
# :
# event_handler() : can be used to process events generated from other parts of the system
# :
# add_subscriber() : can be used to add an internal event source to be handled
#
# The main python module is called 'pybombs'
# add_subscriber and add_event source are in separate modules called 'add_pybombs_subscriber' and 'add_pybombs_event_source'
#
# The following python modules are used internally and provided for those who need them:
# logger: is used to log information
# event_handler: processes internal events (see below)
# signal_handler: handles events from the system by converting them to pybombs events
# threading: provides access to low-level threading functions
# time: provide a clock() function
set(PYBOMBS_EXTRA_DEPS lwt-log ${PYTHON_LIBRARY})
add_library(${PROJECT_NAME}_python MODULE
event_handler.cpp
event_subscribe.cpp
logger.cpp
pybombs.cpp
pybombs.h)
target_link_libraries(${PROJECT_NAME}_python PUBLIC
${PYBOMBS_EXTRA_DEPS}
${PYTHON_LIBRARY})
target_include_directories(${PROJECT_NAME}_python
INTERFACE
$
$
$)
add_subdirectory(docs)
add_custom_command(TARGET ${PROJECT_NAME}_python POST_BUILD COMMAND ${PYTHON_EXECUTABLE} -m ${PROJECT_NAME}_python -o ${CMAKE_BINARY_DIR}/release/${PROJECT_NAME}_python.py --ignore-dependencies)
if(CMAKE_BUILD_TYPE)
set_target_properties(${PROJECT_NAME}_python PROPERTIES EXCLUDE_FROM_ALL TRUE)
set(EXTRA_ARGS -D BUILD_WITH_EXTRA_ARGS=ON)
else()
set_target_properties(${PROJECT_NAME}_python PROPERTIES EXCLUDE_FROM_ALL FALSE)
endif()
add_subdirectory(test)
add_subdirectory(tools)
if(USE_PYBOMBS)
include(PythonPackage)
endif()