[hamradio-commits] [gnss-sdr] 203/251: Updating the driver building process

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Sep 2 00:22:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit 6b434777c320b9967433b400b83229e279edb57b
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sat Jul 18 11:57:16 2015 +0200

    Updating the driver building process
---
 drivers/gr-gn3s/CMakeLists.txt                     |   7 +-
 drivers/gr-gn3s/README                             |  93 ++++++++++-----
 .../cmake/Modules/FindGnuradioRuntime.cmake        | 131 ++++++++++++++++++++-
 drivers/gr-gn3s/cmake/Modules/FindUSB.cmake        |   2 +
 drivers/gr-gn3s/cmake/Modules/GrSwig.cmake         |  55 ++++++---
 drivers/gr-gn3s/cmake/Modules/GrTest.cmake         |   9 +-
 drivers/gr-gn3s/include/CMakeLists.txt             |  17 ++-
 drivers/gr-gn3s/lib/CMakeLists.txt                 |  22 ++--
 drivers/gr-gn3s/python/CMakeLists.txt              |  17 ++-
 drivers/gr-gn3s/swig/CMakeLists.txt                |  17 ++-
 10 files changed, 274 insertions(+), 96 deletions(-)

diff --git a/drivers/gr-gn3s/CMakeLists.txt b/drivers/gr-gn3s/CMakeLists.txt
index 348e491..83a9b98 100644
--- a/drivers/gr-gn3s/CMakeLists.txt
+++ b/drivers/gr-gn3s/CMakeLists.txt
@@ -20,7 +20,7 @@
 ########################################################################
 # Project setup
 ########################################################################
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 2.8)
 project(gr-gn3s CXX C)
 enable_testing()
 
@@ -70,10 +70,7 @@ if(NOT LIBUSB_FOUND)
     message(FATAL_ERROR "libusb required to compile gn3s")
 endif(NOT LIBUSB_FOUND)
 include_directories(${LIBUSB_INCLUDE_DIR})
-#message (" kjhkhkjh ${LIBUSB_INCLUDE_DIR}")
-if(APPLE)
-  include_directories(/usr/include/pcap)
-endif(APPLE)
+
 
 ########################################################################
 # Install directories
diff --git a/drivers/gr-gn3s/README b/drivers/gr-gn3s/README
index 5d82439..1b33495 100644
--- a/drivers/gr-gn3s/README
+++ b/drivers/gr-gn3s/README
@@ -1,8 +1,6 @@
-HOW TO BUILD GR-GN3S
-----------------------
-Source maintainer:
-Javier Arribas
-jarribas at cttc.es
+**How to build gr-gn3s **
+
+Source maintainer: Javier Arribas (jarribas at cttc.es)
 
 This document describes how to build the GN3S V2 GPS Sampler GNU Radio Source USB 2.0 driver. 
 
@@ -13,57 +11,98 @@ The driver core is based on Gregory W. Hecker driver available in http://github.
 GR-GN3S contains a GNU Radio fully compliant gr-block signal source intended to be used either with GNSS-SDR as a signal source or as 
 standalone signal source block instantiated from a GNU Radio flowgraph from C++ or using Python (Also includes a gnuradio-companion interface).
 
-It is based on the GNU Radio How-to-make-a-block cmake source v 3.6
+1. Install GNU Radio:
+
+You can install GNU Radio through a .deb package *or* by using pybombs. Please choose only one procedure.
+
+### In Ubuntu 12.10 and later:
+
+~~~~~~ 
+$ sudo apt-get install gnuradio-dev 
+~~~~~~
+
+
+
+### Semi-automatic installation of GNU Radio
+
+Downloading, building and installing [GNU Radio](http://gnuradio.org/redmine/projects/gnuradio/wiki "GNU Radio's Homepage") and all its dependencies is not a simple task. We recommend to use [PyBOMBS](http://gnuradio.org/redmine/projects/pybombs/wiki "Python Build Overlay Managed Bundle System wiki") (Python Build Overlay Managed Bundle System), the GNU Radio install management system that automatically does all the work for you. In a terminal, type:
 
-Installation in Ubuntu 11.04, 11.10, 12.04 (32 and 64 bits)
------------------------------------------------------------
 
-1. Install CMake through your OS's package manager or by some other means.
+~~~~~~ 
+$ git clone git://github.com/pybombs/pybombs 
+$ cd pybombs
+~~~~~~
 
-2. Install GNU Radio:
+Configure PyBOMBS:
 
-- Downloading, building and installing GNU Radio and all its dependencies is not a simple task. We recommend to use Marcus Leech's build-gnuradio script, which automatically does all the work for you. In a terminal, do:
+~~~~~~
+$ ./pybombs config 
+~~~~~~
 
-$ wget http://www.sbrac.org/files/build-gnuradio
-$ chmod a+x build-gnuradio
-$ ./build-gnuradio
+You can safely accept the default options but for ```prefix```. We recommend to put ```/usr/local``` there. After the configuration, you should get something similar to:
 
-This can take a while (up to two hours to complete, depending on your system), and installs the latest versions of UHD and GNU Radio in your system, including all their dependencies. In case you do not want to use the script and prefer to build and install GNU Radio manually from source, follow instructions in http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide
+~~~~~~
+gituser = username
+prefix = /usr/local
+satisfy_order = deb,src  # For Debian/Ubuntu/LinuxMint
+satisfy_order = rpm,src  # For Fedora/CentOS/RHEL/openSUSE
+forcepkgs =
+forcebuild = gnuradio,uhd,gr-osmosdr,rtl-sdr,...
+timeout = 30
+cmakebuildtype = RelWithDebInfo
+builddocs = OFF
+cc = gcc
+cxx = g++
+makewidth = 4
+~~~~~~
 
 
-3. Install Subversion
+Then, you are ready to download and install GNU Radio and all their required dependencies by doing:
 
-$ sudo apt-get install subversion
+~~~~~~
+$ sudo ./pybombs install gnuradio
+~~~~~~
 
-4. Check out the latest version of GNSS-SDR
+This can take some time (up to two hours to complete, depending on your system), and downloads, builds and installs the latest versions of the Universal Hardware Driver (UHD) and GNU Radio in your system, including all their dependencies. 
+In case you do not want to use PyBOMBS and prefer to build and install GNU Radio step by step, follow instructions at the [GNU Radio Build Guide](http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide).
 
-$ svn co http://svn.code.sf.net/p/gnss-sdr/code/trunk gnss-sdr
 
-5. Build GR-GN3S
+2. Get the latest version of GNSS-SDR
+
+$ git clone git://github.com/gnss-sdr/gnss-sdr
+$ git checkout next
+
+
+3. Build GR-GN3S
 
 - Go to GR-GN3S root directory and compile the driver:
 
+~~~~~~
 $ cd gnss-sdr/drivers/gr-gn3s
 $ cd build
 $ cmake ../
 $ make
+~~~~~~
 
-6. If everything went fine, install the driver as root
+- If everything went fine, install the driver as root
 
+~~~~~~
 $ sudo make install
 $ sudo ldconfig
+~~~~~~
 
-7. Open gnuradio-companion and check the gn3s_source module under the GN3S tab. 
+4. Open gnuradio-companion and check the gn3s_source module under the GN3S tab. 
 In order to gain access to USB ports, gnuradio-companion should be used as root.
 In addition, the driver requires access to the GN3S firmware binary file. 
 It should be available in the same path where the application is called.
 GNSS-SDR comes with a pre-compiled custom GN3S firmware available at gnss-sdr/firmware/GN3S_v2/bin/gn3s_firmware.ihx. 
 Please copy this file to the application path.
 
-8- Once the GR-GN3S driver is installed, you can add this Signal Source at gnss-sdr by doing:
-
-$ export GN3S_DRIVER=1
-$ bjam release
-
+5- Once the GR-GN3S driver is installed, you can add this Signal Source at gnss-sdr by doing:
 
+~~~~~~
+$ cmake -DENABLE_GN3S=ON ../
+$ make
+$ sudo make install
+~~~~~~
 
diff --git a/drivers/gr-gn3s/cmake/Modules/FindGnuradioRuntime.cmake b/drivers/gr-gn3s/cmake/Modules/FindGnuradioRuntime.cmake
index 04031d3..08ee505 100644
--- a/drivers/gr-gn3s/cmake/Modules/FindGnuradioRuntime.cmake
+++ b/drivers/gr-gn3s/cmake/Modules/FindGnuradioRuntime.cmake
@@ -1,7 +1,130 @@
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(GNURADIO_RUNTIME gnuradio-runtime>=3.7)
+########################################################################
+# Find GNU Radio
+########################################################################
 
+INCLUDE(FindPkgConfig)
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS)
-MARK_AS_ADVANCED(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS)
 
+# if GR_REQUIRED_COMPONENTS is not defined, it will be set to the following list 
+if(NOT GR_REQUIRED_COMPONENTS)
+  set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS PMT)
+endif()
+
+
+# Allows us to use all .cmake files in this directory
+list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR})
+
+# Easily access all libraries and includes of GNU Radio
+set(GNURADIO_ALL_LIBRARIES "")
+set(GNURADIO_ALL_INCLUDE_DIRS "")
+
+MACRO(LIST_CONTAINS var value)
+  SET(${var})
+  FOREACH(value2 ${ARGN})
+    IF (${value} STREQUAL ${value2})
+      SET(${var} TRUE)
+    ENDIF(${value} STREQUAL ${value2})
+  ENDFOREACH(value2)
+ENDMACRO(LIST_CONTAINS)
+
+function(GR_MODULE EXTVAR PCNAME INCFILE LIBFILE)
+
+    LIST_CONTAINS(REQUIRED_MODULE ${EXTVAR} ${GR_REQUIRED_COMPONENTS})
+    if(NOT REQUIRED_MODULE)
+        #message("Ignoring GNU Radio Module ${EXTVAR}")
+        return()
+    endif()
+
+    message(STATUS "Checking for GNU Radio Module: ${EXTVAR}")
+
+    # check for .pc hints
+    PKG_CHECK_MODULES(PC_GNURADIO_${EXTVAR} ${PCNAME})
+
+    if(NOT PC_GNURADIO_${EXTVAR}_FOUND)
+        set(PC_GNURADIO_${EXTVAR}_LIBRARIES ${LIBFILE})
+    endif()
+
+    set(INCVAR_NAME "GNURADIO_${EXTVAR}_INCLUDE_DIRS")
+    set(LIBVAR_NAME "GNURADIO_${EXTVAR}_LIBRARIES")
+    set(PC_INCDIR ${PC_GNURADIO_${EXTVAR}_INCLUDEDIR})
+    set(PC_LIBDIR ${PC_GNURADIO_${EXTVAR}_LIBDIR})
+
+    # look for include files
+    FIND_PATH(
+        ${INCVAR_NAME}
+        NAMES ${INCFILE}
+        HINTS $ENV{GNURADIO_RUNTIME_DIR}/include
+            ${PC_INCDIR}
+            ${CMAKE_INSTALL_PREFIX}/include
+            ${GNURADIO_INSTALL_PREFIX}/include
+        PATHS /usr/local/include
+              /usr/include
+              ${GNURADIO_INSTALL_PREFIX}/include
+    )
+
+    # look for libs
+    foreach(libname ${PC_GNURADIO_${EXTVAR}_LIBRARIES})
+        FIND_LIBRARY(
+            ${LIBVAR_NAME}_${libname}
+            NAMES ${libname}
+            HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
+                ${PC_LIBDIR}
+                ${CMAKE_INSTALL_PREFIX}/lib/
+                ${CMAKE_INSTALL_PREFIX}/lib64/
+                ${GNURADIO_INSTALL_PREFIX}/lib/
+                 ${GNURADIO_INSTALL_PREFIX}/lib64
+            PATHS /usr/local/lib
+                  /usr/local/lib64
+                  /usr/lib
+                  /usr/lib64
+                  ${GNURADIO_INSTALL_PREFIX}/lib
+        )
+	list(APPEND ${LIBVAR_NAME} ${${LIBVAR_NAME}_${libname}})
+    endforeach(libname)
+
+    set(${LIBVAR_NAME} ${${LIBVAR_NAME}} PARENT_SCOPE)
+
+    # show results
+    # message(STATUS " * INCLUDES=${GNURADIO_${EXTVAR}_INCLUDE_DIRS}")
+    # message(STATUS " * LIBS=${GNURADIO_${EXTVAR}_LIBRARIES}")
+
+    # append to all includes and libs list
+    set(GNURADIO_ALL_INCLUDE_DIRS ${GNURADIO_ALL_INCLUDE_DIRS} ${GNURADIO_${EXTVAR}_INCLUDE_DIRS} PARENT_SCOPE)
+    set(GNURADIO_ALL_LIBRARIES    ${GNURADIO_ALL_LIBRARIES}    ${GNURADIO_${EXTVAR}_LIBRARIES}    PARENT_SCOPE)
+
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_${EXTVAR} DEFAULT_MSG GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
+    message(STATUS "GNURADIO_${EXTVAR}_FOUND = ${GNURADIO_${EXTVAR}_FOUND}")
+    set(GNURADIO_${EXTVAR}_FOUND ${GNURADIO_${EXTVAR}_FOUND} PARENT_SCOPE)
+
+    # generate an error if the module is missing
+    if(NOT GNURADIO_${EXTVAR}_FOUND)
+       message(STATUS "Required GNU Radio Component: ${EXTVAR} missing!")
+    endif()
+
+    MARK_AS_ADVANCED(GNURADIO_${EXTVAR}_LIBRARIES GNURADIO_${EXTVAR}_INCLUDE_DIRS)
+
+endfunction()
+
+GR_MODULE(RUNTIME gnuradio-runtime gnuradio/top_block.h gnuradio-runtime)
+GR_MODULE(ANALOG gnuradio-analog gnuradio/analog/api.h gnuradio-analog)
+GR_MODULE(ATSC gnuradio-atsc gnuradio/atsc/api.h gnuradio-atsc)
+GR_MODULE(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
+GR_MODULE(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
+GR_MODULE(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
+GR_MODULE(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
+GR_MODULE(FCD gnuradio-fcd gnuradio/fcd_api.h gnuradio-fcd)
+GR_MODULE(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
+GR_MODULE(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
+GR_MODULE(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
+GR_MODULE(NOAA gnuradio-noaa gnuradio/noaa/api.h gnuradio-noaa)
+GR_MODULE(PAGER gnuradio-pager gnuradio/pager/api.h gnuradio-pager)
+GR_MODULE(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
+GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
+GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
+GR_MODULE(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
+GR_MODULE(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
+GR_MODULE(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
+GR_MODULE(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
+
+list(REMOVE_DUPLICATES GNURADIO_ALL_INCLUDE_DIRS)
+list(REMOVE_DUPLICATES GNURADIO_ALL_LIBRARIES)
diff --git a/drivers/gr-gn3s/cmake/Modules/FindUSB.cmake b/drivers/gr-gn3s/cmake/Modules/FindUSB.cmake
index 0cfefba..43d170d 100644
--- a/drivers/gr-gn3s/cmake/Modules/FindUSB.cmake
+++ b/drivers/gr-gn3s/cmake/Modules/FindUSB.cmake
@@ -7,6 +7,7 @@ if(NOT LIBUSB_FOUND)
     /usr/include/libusb-1.0
     /usr/include
     /usr/local/include
+    /opt/local/include/libusb-1.0
   )
 
   find_library(LIBUSB_LIBRARIES NAMES usb-1.0
@@ -14,6 +15,7 @@ if(NOT LIBUSB_FOUND)
     ${LIBUSB_PKG_LIBRARY_DIRS}
     /usr/lib
     /usr/local/lib
+    /opt/local/lib
   )
 
 if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
diff --git a/drivers/gr-gn3s/cmake/Modules/GrSwig.cmake b/drivers/gr-gn3s/cmake/Modules/GrSwig.cmake
index 8cf1265..c5cbc5f 100644
--- a/drivers/gr-gn3s/cmake/Modules/GrSwig.cmake
+++ b/drivers/gr-gn3s/cmake/Modules/GrSwig.cmake
@@ -39,7 +39,7 @@ function(GR_SWIG_MAKE_DOCS output_file)
         set(input_files)
         unset(INPUT_PATHS)
         foreach(input_path ${ARGN})
-            if (IS_DIRECTORY ${input_path}) #when input path is a directory
+            if(IS_DIRECTORY ${input_path}) #when input path is a directory
                 file(GLOB input_path_h_files ${input_path}/*.h)
             else() #otherwise its just a file, no glob
                 set(input_path_h_files ${input_path})
@@ -105,20 +105,39 @@ endfunction(GR_SWIG_MAKE_DOCS)
 macro(GR_SWIG_MAKE name)
     set(ifiles ${ARGN})
 
-    # Shimming this in here to take care of a SWIG bug with handling
-    # vector<size_t> and vector<unsigned int> (on 32-bit machines) and
-    # vector<long unsigned int> (on 64-bit machines). Use this to test
-    # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine
-    # or not if it's 64-bit. The logic in gr_type.i handles the rest.
-    INCLUDE (CheckTypeSize)
-    CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
-    CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT)
-    if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
-      list(APPEND GR_SWIG_FLAGS -DSIZE_T_32)
-    endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
+    # Take care of a SWIG < 3.0 bug with handling std::vector<size_t>,
+    # by mapping to the correct sized type on the runtime system, one
+    # of "unsigned int", "unsigned long", or "unsigned long long".
+    # Compare the sizeof(size_t) with the sizeof the other types, and
+    # pick the first one in the list with the same sizeof. The logic
+    # in gnuradio-runtime/swig/gr_types.i handles the rest. It is
+    # probably not necessary to do this assignment all of the time,
+    # but it's easier to do it this way than to figure out the
+    # conditions when it is necessary -- and doing it this way won't
+    # hurt.  This bug seems to have been fixed with SWIG >= 3.0, and
+    # mostly happens when not doing a native build (e.g., on Mac OS X
+    # when using a 64-bit CPU but building for 32-bit).
+
+    if(SWIG_VERSION VERSION_LESS "3.0.0")
+        include(CheckTypeSize)
+        check_type_size("size_t" SIZEOF_SIZE_T)
+        check_type_size("unsigned int" SIZEOF_UINT)
+        check_type_size("unsigned long" SIZEOF_UL)
+        check_type_size("unsigned long long" SIZEOF_ULL)
+
+        if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT})
+            list(APPEND GR_SWIG_FLAGS -DSIZE_T_UINT)
+        elseif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UL})
+            list(APPEND GR_SWIG_FLAGS -DSIZE_T_UL)
+        elseif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_ULL})
+            list(APPEND GR_SWIG_FLAGS -DSIZE_T_ULL)
+        else()
+            message(FATAL_ERROR "GrSwig: Unable to find replace for std::vector<size_t>; this should never happen!")
+        endif()
+    endif()
 
     #do swig doc generation if specified
-    if (GR_SWIG_DOC_FILE)
+    if(GR_SWIG_DOC_FILE)
         set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS})
         list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS})
         GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS})
@@ -127,7 +146,7 @@ macro(GR_SWIG_MAKE name)
     endif()
 
     #append additional include directories
-    find_package(PythonLibs)
+    find_package(PythonLibs 2)
     list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs)
     list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
 
@@ -172,6 +191,9 @@ macro(GR_SWIG_MAKE name)
     include(UseSWIG)
     SWIG_ADD_MODULE(${name} python ${ifiles})
     SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES})
+    if(${name} STREQUAL "runtime_swig")
+        SET_TARGET_PROPERTIES(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS")
+    endif(${name} STREQUAL "runtime_swig")
 
 endmacro(GR_SWIG_MAKE)
 
@@ -216,19 +238,15 @@ endmacro(GR_SWIG_INSTALL)
 # This code essentially performs that logic for swig includes.
 ########################################################################
 file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py "
-
 import os, sys, re
-
 i_include_matcher = re.compile('%(include|import)\\s*[<|\"](.*)[>|\"]')
 h_include_matcher = re.compile('#(include)\\s*[<|\"](.*)[>|\"]')
 include_dirs = sys.argv[2].split(';')
-
 def get_swig_incs(file_path):
     if file_path.endswith('.i'): matcher = i_include_matcher
     else: matcher = h_include_matcher
     file_contents = open(file_path, 'r').read()
     return matcher.findall(file_contents, re.MULTILINE)
-
 def get_swig_deps(file_path, level):
     deps = [file_path]
     if level == 0: return deps
@@ -239,7 +257,6 @@ def get_swig_deps(file_path, level):
             deps.extend(get_swig_deps(inc_path, level-1))
             break #found, we dont search in lower prio inc dirs
     return deps
-
 if __name__ == '__main__':
     ifiles = sys.argv[1].split(';')
     deps = sum([get_swig_deps(ifile, 3) for ifile in ifiles], [])
diff --git a/drivers/gr-gn3s/cmake/Modules/GrTest.cmake b/drivers/gr-gn3s/cmake/Modules/GrTest.cmake
index bb045dc..ff78ed2 100644
--- a/drivers/gr-gn3s/cmake/Modules/GrTest.cmake
+++ b/drivers/gr-gn3s/cmake/Modules/GrTest.cmake
@@ -66,7 +66,8 @@ function(GR_ADD_TEST test_name)
     file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list?
     file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list?
 
-    set(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}")
+    set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}"
+        "GR_CONF_CONTROLPORT_ON=False")
     list(APPEND environs ${GR_TEST_ENVIRONS})
 
     #http://www.cmake.org/pipermail/cmake/2009-May/029464.html
@@ -91,7 +92,11 @@ function(GR_ADD_TEST test_name)
         list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}")
 
         #generate a bat file that sets the environment and runs the test
-        find_program(SHELL sh)
+	if (CMAKE_CROSSCOMPILING)
+                set(SHELL "/bin/sh")
+        else(CMAKE_CROSSCOMPILING)
+                find_program(SHELL sh)
+        endif(CMAKE_CROSSCOMPILING)
         set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh)
         file(WRITE ${sh_file} "#!${SHELL}\n")
         #each line sets an environment variable
diff --git a/drivers/gr-gn3s/include/CMakeLists.txt b/drivers/gr-gn3s/include/CMakeLists.txt
index b682e85..67fb11d 100644
--- a/drivers/gr-gn3s/include/CMakeLists.txt
+++ b/drivers/gr-gn3s/include/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015  (see AUTHORS file for a list of contributors)
 #
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
 #
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR 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, or (at your option)
-# any later version.
+# 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,
+# GNSS-SDR 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.
+# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
+#
 
 ########################################################################
 # Install public header files
diff --git a/drivers/gr-gn3s/lib/CMakeLists.txt b/drivers/gr-gn3s/lib/CMakeLists.txt
index 0657360..1982a6d 100644
--- a/drivers/gr-gn3s/lib/CMakeLists.txt
+++ b/drivers/gr-gn3s/lib/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015  (see AUTHORS file for a list of contributors)
 #
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
 #
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR 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, or (at your option)
-# any later version.
+# 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,
+# GNSS-SDR 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.
+# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
+#
 
 ########################################################################
 # Setup library
@@ -30,9 +29,8 @@ set_target_properties(gr-gn3s PROPERTIES DEFINE_SYMBOL "gr_gn3s_EXPORTS")
 # Install built library files
 ########################################################################
 install(TARGETS gr-gn3s
-    LIBRARY DESTINATION lib${LIB_SUFFIX} # .so/.dylib file
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
-    RUNTIME DESTINATION bin              # .dll file
+    LIBRARY DESTINATION lib${LIB_SUFFIX}
+    COMPONENT "gr-gn3s"
 )
 
 ########################################################################
diff --git a/drivers/gr-gn3s/python/CMakeLists.txt b/drivers/gr-gn3s/python/CMakeLists.txt
index f042f8d..ad0bf37 100644
--- a/drivers/gr-gn3s/python/CMakeLists.txt
+++ b/drivers/gr-gn3s/python/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015  (see AUTHORS file for a list of contributors)
 #
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
 #
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR 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, or (at your option)
-# any later version.
+# 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,
+# GNSS-SDR 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.
+# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
+#
 
 ########################################################################
 # Include python install macros
diff --git a/drivers/gr-gn3s/swig/CMakeLists.txt b/drivers/gr-gn3s/swig/CMakeLists.txt
index 5fe2117..e200eb3 100644
--- a/drivers/gr-gn3s/swig/CMakeLists.txt
+++ b/drivers/gr-gn3s/swig/CMakeLists.txt
@@ -1,21 +1,20 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015  (see AUTHORS file for a list of contributors)
 #
-# This file is part of GNU Radio
+# This file is part of GNSS-SDR.
 #
-# GNU Radio is free software; you can redistribute it and/or modify
+# GNSS-SDR 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, or (at your option)
-# any later version.
+# 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,
+# GNSS-SDR 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.
+# along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
+#
 
 ########################################################################
 # Include swig generation macros

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list