diff --git CMakeLists.txt CMakeLists.txt index 78d0408..ef1bfd8 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -52,7 +52,7 @@ endif() ######################################################################## # Compiler specific setup ######################################################################## -if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) +if(NOT WIN32) #http://gcc.gnu.org/wiki/Visibility add_definitions(-fvisibility=hidden) endif() @@ -118,19 +118,41 @@ endif(APPLE) ######################################################################## # Find gnuradio build dependencies ######################################################################## -find_package(CppUnit) -find_package(Doxygen) - # Search for GNU Radio and its components and versions. Add any # components required to the list of GR_REQUIRED_COMPONENTS (in all # caps such as FILTER or FFT) and change the version to the minimum # API compatible version required. set(GR_REQUIRED_COMPONENTS RUNTIME FFT FILTER DIGITAL) -find_package(Gnuradio "3.7.2" REQUIRED) -find_package(Volk "1.4") +find_package(Gnuradio) +if(NOT GNURADIO_RUNTIME_FOUND) + message(FATAL_ERROR "GNU Radio required to compile gfdm") +endif() + +find_package(CppUnit) +if(NOT CPPUNIT_FOUND) + message(FATAL_ERROR "CppUnit required to compile gr-ieee802-15-4") +endif() +find_package(PythonLibs 2) +if(NOT PYTHONLIBS_FOUND) + message(FATAL_ERROR "Python required to compile gr-ieee802-15-4") +endif() + +find_package(Volk) +if(NOT VOLK_FOUND) + message(FATAL_ERROR "Volk required to compile gr-ieee802-15-4") +endif() + +find_package(SWIG) +if(NOT SWIG_FOUND) + message(FATAL_ERROR "SWIG required to compile gr-ieee802-15-4") +endif() + +find_package(FFTW3f) +if(NOT FFTW3F_FOUND) + message(FATAL_ERROR "FFTW3 required to compile iqbalance") +endif() if(NOT CPPUNIT_FOUND) - message(FATAL_ERROR "CppUnit required to compile gfdm") endif() if(CMAKE_BUILD_TYPE) if(${CMAKE_BUILD_TYPE} STREQUAL "Coverage") @@ -142,7 +164,8 @@ endif() ######################################################################## # Setup doxygen option ######################################################################## -if(DOXYGEN_FOUND) +find_package(Doxygen) + if(DOXYGEN_FOUND) option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) else(DOXYGEN_FOUND) option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) @@ -159,6 +182,8 @@ include_directories( ${Boost_INCLUDE_DIRS} ${CPPUNIT_INCLUDE_DIRS} ${GNURADIO_ALL_INCLUDE_DIRS} + ${VOLK_INCLUDE_DIRS} + ${FFTW3F_INCLUDE_DIRS} ) link_directories( @@ -167,6 +192,8 @@ link_directories( ${GNURADIO_RUNTIME_LIBRARY_DIRS} ${GNURADIO_FFT_LIBRARY_DIRS} ${GNURADIO_FILTER_LIBRARY_DIRS} + ${VOLK_LIBRARY_DIRS} + ${FFTW3F_LIBRARY_DIRS} ) # Set component parameters diff --git lib/CMakeLists.txt lib/CMakeLists.txt index 2cf94f4..2782cbb 100644 --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -22,9 +22,6 @@ ######################################################################## include(GrPlatform) #define LIB_SUFFIX -include_directories(${Boost_INCLUDE_DIR}) -link_directories(${Boost_LIBRARY_DIRS}) - list(APPEND gfdm_sources gfdm_utils.cc receiver_kernel_cc.cc @@ -57,13 +54,16 @@ list(APPEND gfdm_sources short_burst_shaper_impl.cc) set(gfdm_sources "${gfdm_sources}" PARENT_SCOPE) -if(NOT gfdm_sources) - MESSAGE(STATUS "No C++ sources... skipping lib/") - return() -endif(NOT gfdm_sources) + +list(APPEND gfdm_libs + ${Boost_LIBRARIES} + ${GNURADIO_ALL_LIBRARIES} + ${VOLK_LIBRARIES} + ${FFTW3F_LIBRARIES} +) add_library(gnuradio-gfdm SHARED ${gfdm_sources}) -target_link_libraries(gnuradio-gfdm ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES}) +target_link_libraries(gnuradio-gfdm ${gfdm_libs}) set_target_properties(gnuradio-gfdm PROPERTIES DEFINE_SYMBOL "gnuradio_gfdm_EXPORTS") if(APPLE)