From ab0453d081ce7938c072b1a8207a39e93af1d312 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Fri, 18 Oct 2013 13:44:38 +0200 Subject: [PATCH] compile on osx --- CMakeLists.txt | 2 +- lib/CMakeLists.txt | 5 +++-- lib/ofdm_mac.cc | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e57367a..a530c4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,7 +80,7 @@ set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks) ######################################################################## # Find gnuradio build dependencies ######################################################################## -set(GR_REQUIRED_COMPONENTS RUNTIME FILTER FFT) +set(GR_REQUIRED_COMPONENTS RUNTIME FILTER FFT PMT) find_package(Gnuradio) find_package(CppUnit) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7a29a82..32e1d56 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -119,13 +119,14 @@ list(APPEND gr_ieee802_11_sources list(APPEND gr_ieee802_11_libs ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} - ${GNURADIO_FFT_LIBRARIES} + ${GNURADIO_FFT_LIBRARIES} + ${GNURADIO_PMT_LIBRARIES} ${GNURADIO_FILTER_LIBRARIES} ) add_library(gnuradio-ieee802_11 SHARED ${gr_ieee802_11_sources}) add_dependencies(gnuradio-ieee802_11 ieee802_11_generated_includes) -target_link_libraries(gnuradio-ieee802_11 ${gr_ieee802_11_libs} itpp) +target_link_libraries(gnuradio-ieee802_11 ${gr_ieee802_11_libs} itpp log4cpp) set_target_properties(gnuradio-ieee802_11 PROPERTIES DEFINE_SYMBOL "gnuradio_ieee802_11_EXPORTS") ######################################################################## diff --git a/lib/ofdm_mac.cc b/lib/ofdm_mac.cc index 3063089..aa62a93 100644 --- a/lib/ofdm_mac.cc +++ b/lib/ofdm_mac.cc @@ -21,7 +21,12 @@ #include "utils.h" +#if defined(__APPLE__) +#include +#define htole16(x) OSSwapHostToLittleInt16(x) +#else #include +#endif #include #include