From c6e974ab21441d2ea2a480dfe2368891e6abc113 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 24 Dec 2012 02:33:50 +0000 Subject: [PATCH] Starting CMake support. In the root directory of gnss-sdr, type: $ mkdir build && cd build && cmake ../ && make && make install git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@290 64b25241-fba3-4117-9849-534c7e92360d --- CMakeLists.txt | 225 +++++++++++++++++ cmake/Modules/CMakeParseArgumentsCopy.cmake | 138 +++++++++++ cmake/Modules/FindGFlags.cmake | 98 ++++++++ cmake/Modules/FindGLOG.cmake | 103 ++++++++ cmake/Modules/FindGPSTK.cmake | 87 +++++++ cmake/Modules/FindGTest.cmake | 187 ++++++++++++++ cmake/Modules/FindGnuradioCore.cmake | 26 ++ cmake/Modules/FindGnuradioUHD.cmake | 34 +++ cmake/Modules/FindGperftools.cmake | 0 cmake/Modules/FindGruel.cmake | 26 ++ cmake/Modules/FindUHD.cmake | 28 +++ cmake/Modules/FindVolk.cmake | 26 ++ cmake/Modules/GrMiscUtils.cmake | 210 ++++++++++++++++ cmake/Modules/GrPlatform.cmake | 46 ++++ cmake/Modules/GrPython.cmake | 227 +++++++++++++++++ cmake/Modules/GrSwig.cmake | 229 ++++++++++++++++++ src/CMakeLists.txt | 24 ++ src/algorithms/CMakeLists.txt | 31 +++ src/algorithms/PVT/CMakeLists.txt | 21 ++ src/algorithms/PVT/adapters/CMakeLists.txt | 33 +++ .../PVT/gnuradio_blocks/CMakeLists.txt | 32 +++ src/algorithms/PVT/libs/CMakeLists.txt | 40 +++ src/algorithms/acquisition/CMakeLists.txt | 21 ++ .../acquisition/adapters/CMakeLists.txt | 36 +++ .../gnuradio_blocks/CMakeLists.txt | 34 +++ src/algorithms/channel/CMakeLists.txt | 20 ++ .../channel/adapters/CMakeLists.txt | 32 +++ src/algorithms/channel/libs/CMakeLists.txt | 31 +++ src/algorithms/conditioner/CMakeLists.txt | 20 ++ .../conditioner/adapters/CMakeLists.txt | 33 +++ .../data_type_adapter/CMakeLists.txt | 19 ++ .../data_type_adapter/adapters/CMakeLists.txt | 32 +++ src/algorithms/input_filter/CMakeLists.txt | 19 ++ .../input_filter/adapters/CMakeLists.txt | 34 +++ src/algorithms/libs/CMakeLists.txt | 35 +++ src/algorithms/observables/CMakeLists.txt | 20 ++ .../observables/adapters/CMakeLists.txt | 33 +++ .../gnuradio_blocks/CMakeLists.txt | 32 +++ src/algorithms/output_filter/CMakeLists.txt | 19 ++ .../output_filter/adapters/CMakeLists.txt | 32 +++ src/algorithms/resampler/CMakeLists.txt | 20 ++ .../resampler/adapters/CMakeLists.txt | 30 +++ .../resampler/gnuradio_blocks/CMakeLists.txt | 31 +++ src/algorithms/signal_source/CMakeLists.txt | 20 ++ .../signal_source/adapters/CMakeLists.txt | 51 ++++ .../telemetry_decoder/CMakeLists.txt | 21 ++ .../telemetry_decoder/adapters/CMakeLists.txt | 33 +++ .../gnuradio_blocks/CMakeLists.txt | 34 +++ .../telemetry_decoder/libs/CMakeLists.txt | 33 +++ src/algorithms/tracking/CMakeLists.txt | 21 ++ .../tracking/adapters/CMakeLists.txt | 42 ++++ .../tracking/gnuradio_blocks/CMakeLists.txt | 40 +++ src/algorithms/tracking/libs/CMakeLists.txt | 42 ++++ src/core/CMakeLists.txt | 22 ++ src/core/libs/CMakeLists.txt | 20 ++ src/core/receiver/CMakeLists.txt | 61 +++++ src/core/system_parameters/CMakeLists.txt | 34 +++ src/main/CMakeLists.txt | 40 +++ 58 files changed, 2968 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 cmake/Modules/CMakeParseArgumentsCopy.cmake create mode 100644 cmake/Modules/FindGFlags.cmake create mode 100644 cmake/Modules/FindGLOG.cmake create mode 100644 cmake/Modules/FindGPSTK.cmake create mode 100644 cmake/Modules/FindGTest.cmake create mode 100644 cmake/Modules/FindGnuradioCore.cmake create mode 100644 cmake/Modules/FindGnuradioUHD.cmake create mode 100644 cmake/Modules/FindGperftools.cmake create mode 100644 cmake/Modules/FindGruel.cmake create mode 100644 cmake/Modules/FindUHD.cmake create mode 100644 cmake/Modules/FindVolk.cmake create mode 100644 cmake/Modules/GrMiscUtils.cmake create mode 100644 cmake/Modules/GrPlatform.cmake create mode 100644 cmake/Modules/GrPython.cmake create mode 100644 cmake/Modules/GrSwig.cmake create mode 100644 src/CMakeLists.txt create mode 100644 src/algorithms/CMakeLists.txt create mode 100644 src/algorithms/PVT/CMakeLists.txt create mode 100644 src/algorithms/PVT/adapters/CMakeLists.txt create mode 100644 src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/PVT/libs/CMakeLists.txt create mode 100644 src/algorithms/acquisition/CMakeLists.txt create mode 100644 src/algorithms/acquisition/adapters/CMakeLists.txt create mode 100644 src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/channel/CMakeLists.txt create mode 100644 src/algorithms/channel/adapters/CMakeLists.txt create mode 100644 src/algorithms/channel/libs/CMakeLists.txt create mode 100644 src/algorithms/conditioner/CMakeLists.txt create mode 100644 src/algorithms/conditioner/adapters/CMakeLists.txt create mode 100644 src/algorithms/data_type_adapter/CMakeLists.txt create mode 100644 src/algorithms/data_type_adapter/adapters/CMakeLists.txt create mode 100644 src/algorithms/input_filter/CMakeLists.txt create mode 100644 src/algorithms/input_filter/adapters/CMakeLists.txt create mode 100644 src/algorithms/libs/CMakeLists.txt create mode 100644 src/algorithms/observables/CMakeLists.txt create mode 100644 src/algorithms/observables/adapters/CMakeLists.txt create mode 100644 src/algorithms/observables/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/output_filter/CMakeLists.txt create mode 100644 src/algorithms/output_filter/adapters/CMakeLists.txt create mode 100644 src/algorithms/resampler/CMakeLists.txt create mode 100644 src/algorithms/resampler/adapters/CMakeLists.txt create mode 100644 src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/signal_source/CMakeLists.txt create mode 100644 src/algorithms/signal_source/adapters/CMakeLists.txt create mode 100644 src/algorithms/telemetry_decoder/CMakeLists.txt create mode 100644 src/algorithms/telemetry_decoder/adapters/CMakeLists.txt create mode 100644 src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/telemetry_decoder/libs/CMakeLists.txt create mode 100644 src/algorithms/tracking/CMakeLists.txt create mode 100644 src/algorithms/tracking/adapters/CMakeLists.txt create mode 100644 src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt create mode 100644 src/algorithms/tracking/libs/CMakeLists.txt create mode 100644 src/core/CMakeLists.txt create mode 100644 src/core/libs/CMakeLists.txt create mode 100644 src/core/receiver/CMakeLists.txt create mode 100644 src/core/system_parameters/CMakeLists.txt create mode 100644 src/main/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..c5e960149 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,225 @@ +# Copyright (C) 2010-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +######################################################################## +if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "Prevented in-tree build. This is bad practice.") +endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + +######################################################################## +# Project setup +######################################################################## +cmake_minimum_required(VERSION 2.6) +project(gnss-sdr CXX) + +################################################################################ +# GTest - http://code.google.com/p/googletest/ +################################################################################ +set(GTEST_DIR $ENV{GTEST_DIR}) +set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src) +include_directories(${GTEST_INCLUDE_DIRECTORIES}) +message("GTEST found at ${GTEST_DIR}") +add_library(gtest ${GTEST_DIR}/src/gtest-all.cc ${GTEST_DIR}/src/gtest_main.cc) +enable_testing(true) +#enable_testing() ? + +#select the release build type by default to get optimization flags +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") +endif(NOT CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) +list(APPEND CMAKE_MODULE_PATH ${gnss-sdr_project_SOURCE_DIR}/cmake/Modules) + +# Set the version information here +set(VERSION_INFO_MAJOR_VERSION 0) +#set(VERSION_INFO_API_COMPAT 7) +set(VERSION_INFO_MINOR_VERSION 1) + + +# Append -O2 optimization flag for Debug builds +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2") +#SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O2") + + +######################################################################## +# Environment setup +######################################################################## + +################################################################################ +# Boost - http://www.boost.org +################################################################################ + +if(UNIX AND EXISTS "/usr/lib64") + list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix +endif(UNIX AND EXISTS "/usr/lib64") +set(Boost_ADDITIONAL_VERSIONS + "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" + "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" + "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" + "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" + "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" +) +find_package(Boost "1.45") + +if(NOT Boost_FOUND) + message(FATAL_ERROR "Boost required to compile gnss-sdr") +endif() +set(Boost_USE_MULTITHREAD ON) +set(Boost_USE_STATIC_LIBS OFF) +FIND_PACKAGE ( Boost COMPONENTS date_time filesystem system thread) + +#if ( NOT BOOST_DATE_TIME_FOUND ) +# message(FATAL_ERROR "Boost date_time library not found " ) +#endif() + + +################################################################################ +# GLog - http://code.google.com/p/google-glog/ +################################################################################ + +find_package(GLOG REQUIRED) +if ( NOT GLOG_FOUND ) + message(FATAL_ERROR "GLOG library not found!") +else( NOT GLOG_FOUND ) + message ( "GLOG library found at ${GLOG_LIBRARIES}" ) +endif( NOT GLOG_FOUND ) +include_directories(${GLOG_INCLUDE_DIRS}) + +################################################################################ +# GFlags - http://code.google.com/p/gflags/ +################################################################################ + +find_package(GFlags REQUIRED) +if ( NOT GFlags_FOUND ) + message(FATAL_ERROR "GFLAGS library not found!") +else() + message ( "GFLAGS library found" ) +endif( NOT GFlags_FOUND ) +include_directories(${GFlags_INCLUDE_DIRS}) + +################################################################################ +# GPerftools - http://code.google.com/p/gperftools/ +################################################################################ + +find_package(Gperftools) +if ( NOT Gperftools_FOUND ) + message("GPerftools library not found!") +else() + message ( "GPerftools library found" ) +endif( NOT Gperftools_FOUND ) + + + +################################################################################ +# Doxygen - http://www.stack.nl/~dimitri/doxygen/index.html +################################################################################ +include(FindDoxygen) +IF (DOXYGEN_EXECUTABLE) + message( STATUS "Setting Doxygen Generator" ) + add_custom_target(docs + COMMAND ${DOXYGEN_EXECUTABLE} VERBATIM) +ENDIF(DOXYGEN_EXECUTABLE) + + + +################################################################################ +# GNURadio - http://gnuradio.org/redmine/projects/gnuradio/wiki +################################################################################ + +find_package(Gruel) +if(NOT GRUEL_FOUND) + message(FATAL_ERROR "Gruel required to build gnss-sdr") +endif() + + +find_package(GnuradioCore) +if(NOT GNURADIO_CORE_FOUND) + message(FATAL_ERROR "GnuRadio Core required to build gnss-sdr") +endif() + + +find_package(UHD) +if(NOT UHD_FOUND) + message(FATAL_ERROR "UHD required to build gnss-sdr") +endif() + +find_package(GnuradioUHD) +if(NOT GNURADIO_UHD_FOUND) + message(FATAL_ERROR "Gnuradio UHD required to build gnss-sdr") +endif() + +find_package(Volk) +if(NOT VOLK_FOUND) + message(FATAL_ERROR "Volk required to build gnss-sdr") +endif() + + +################################################################################ +# Armadillo - http://arma.sourceforge.net/ +################################################################################ + +find_package(Armadillo) +if(NOT ARMADILLO_FOUND) + message(FATAL_ERROR "Armadillo required to build gnss-sdr") +endif() + + +# Setup of optional drivers +if( $ENV{GN3S_DRIVER} ) + message( "GN3S_DRIVER variable found" ) +endif($ENV{GN3S_DRIVER} ) + + +######################################################################## +# Setup the include and linker paths +######################################################################## +include_directories( + ${Boost_INCLUDE_DIRS} + ${GRUEL_INCLUDE_DIRS} + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GLOG_INCLUDE_DIRS} + ${GFLAGS_INCLUDE_DIRS} + ${UHD_INCLUDE_DIRS} +) + +link_directories( + ${Boost_LIBRARY_DIRS} + ${GRUEL_LIBRARY_DIRS} + ${GNURADIO_CORE_LIBRARY_DIRS} + ${GLOG_LIBRARY_DIRS} + ${GFLAGS_LIBRARY_DIRS} +) + + +list(APPEND CMAKE_CXX_FLAGS "-msse2 -msse3 -mfpmath=sse -Wall -std=c++0x") + + +######################################################################## +# Add subdirectories (in order of deps) +######################################################################## +add_subdirectory(src) + +add_subdirectory(drivers) +#add_subdirectory(firmware) +#add_subdirectory($OSMOSDR_ROOT/include/osmosdr) +#add_subdirectory(${GTEST_DIR}/include) + + diff --git a/cmake/Modules/CMakeParseArgumentsCopy.cmake b/cmake/Modules/CMakeParseArgumentsCopy.cmake new file mode 100644 index 000000000..7ce4c49ae --- /dev/null +++ b/cmake/Modules/CMakeParseArgumentsCopy.cmake @@ -0,0 +1,138 @@ +# CMAKE_PARSE_ARGUMENTS( args...) +# +# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for +# parsing the arguments given to that macro or function. +# It processes the arguments and defines a set of variables which hold the +# values of the respective options. +# +# The argument contains all options for the respective macro, +# i.e. keywords which can be used when calling the macro without any value +# following, like e.g. the OPTIONAL keyword of the install() command. +# +# The argument contains all keywords for this macro +# which are followed by one value, like e.g. DESTINATION keyword of the +# install() command. +# +# The argument contains all keywords for this macro +# which can be followed by more than one value, like e.g. the TARGETS or +# FILES keywords of the install() command. +# +# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the +# keywords listed in , and +# a variable composed of the given +# followed by "_" and the name of the respective keyword. +# These variables will then hold the respective value from the argument list. +# For the keywords this will be TRUE or FALSE. +# +# All remaining arguments are collected in a variable +# _UNPARSED_ARGUMENTS, this can be checked afterwards to see whether +# your macro was called with unrecognized parameters. +# +# As an example here a my_install() macro, which takes similar arguments as the +# real install() command: +# +# function(MY_INSTALL) +# set(options OPTIONAL FAST) +# set(oneValueArgs DESTINATION RENAME) +# set(multiValueArgs TARGETS CONFIGURATIONS) +# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) +# ... +# +# Assume my_install() has been called like this: +# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) +# +# After the cmake_parse_arguments() call the macro will have set the following +# variables: +# MY_INSTALL_OPTIONAL = TRUE +# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() +# MY_INSTALL_DESTINATION = "bin" +# MY_INSTALL_RENAME = "" (was not used) +# MY_INSTALL_TARGETS = "foo;bar" +# MY_INSTALL_CONFIGURATIONS = "" (was not used) +# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" +# +# You can the continue and process these variables. +# +# Keywords terminate lists of values, e.g. if directly after a one_value_keyword +# another recognized keyword follows, this is interpreted as the beginning of +# the new option. +# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in +# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would +# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. + +#============================================================================= +# Copyright 2010 Alexander Neundorf +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + + +if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) + return() +endif() +set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) + + +function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) + # first set all result variables to empty/FALSE + foreach(arg_name ${_singleArgNames} ${_multiArgNames}) + set(${prefix}_${arg_name}) + endforeach(arg_name) + + foreach(option ${_optionNames}) + set(${prefix}_${option} FALSE) + endforeach(option) + + set(${prefix}_UNPARSED_ARGUMENTS) + + set(insideValues FALSE) + set(currentArgName) + + # now iterate over all arguments and fill the result variables + foreach(currentArg ${ARGN}) + list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword + list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword + list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword + + if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) + if(insideValues) + if("${insideValues}" STREQUAL "SINGLE") + set(${prefix}_${currentArgName} ${currentArg}) + set(insideValues FALSE) + elseif("${insideValues}" STREQUAL "MULTI") + list(APPEND ${prefix}_${currentArgName} ${currentArg}) + endif() + else(insideValues) + list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) + endif(insideValues) + else() + if(NOT ${optionIndex} EQUAL -1) + set(${prefix}_${currentArg} TRUE) + set(insideValues FALSE) + elseif(NOT ${singleArgIndex} EQUAL -1) + set(currentArgName ${currentArg}) + set(${prefix}_${currentArgName}) + set(insideValues "SINGLE") + elseif(NOT ${multiArgIndex} EQUAL -1) + set(currentArgName ${currentArg}) + set(${prefix}_${currentArgName}) + set(insideValues "MULTI") + endif() + endif() + + endforeach(currentArg) + + # propagate the result variables to the caller: + foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) + set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) + endforeach(arg_name) + set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) + +endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs) diff --git a/cmake/Modules/FindGFlags.cmake b/cmake/Modules/FindGFlags.cmake new file mode 100644 index 000000000..99c006f54 --- /dev/null +++ b/cmake/Modules/FindGFlags.cmake @@ -0,0 +1,98 @@ +# - Try to find GFlags +# +# The following variables are optionally searched for defaults +# GFlags_ROOT_DIR: Base directory where all GFlags components are found +# +# The following are set after configuration is done: +# GFlags_FOUND +# GFlags_INCLUDE_DIRS +# GFlags_LIBS +# GFlags_MODEL_DIRS +# GFlags_LIBRARY_DIRS +cmake_minimum_required(VERSION 2.6) +cmake_policy(SET CMP0011 OLD) + +if (WIN32) +FIND_PATH(GFlags_ROOT_DIR +src/gflags.cc +HINTS +$ENV{GFLAGS_ROOT}) +else (WIN32) +FIND_PATH(GFlags_ROOT_DIR +libgflags.dylib +HINTS +/usr/local/lib +) +endif (WIN32) + +if (UNIX) +FIND_PATH(GFlags_ROOT_DIR +libgflags.so +HINTS +/usr/local/lib +) +endif (UNIX) + +IF(GFlags_ROOT_DIR) +# We are testing only a couple of files in the include directories +if (WIN32) +FIND_PATH(GFlags_INCLUDE_DIRS +gflags/gflags.h +HINTS +${GFlags_ROOT_DIR}/src/windows +) +else (WIN32) +FIND_PATH(GFlags_INCLUDE_DIRS +gflags/gflags.h +HINTS +/usr/local/include +${GFlags_ROOT_DIR}/src +) +endif (WIN32) + +# Find the libraries +SET(GFlags_LIBRARY_DIRS ${GFlags_ROOT_DIR}) + +# TODO: This can use some per-component linking +if(MSVC) +SET(_gflags_libpath_suffixes /Release /Debug) +FIND_LIBRARY(GFlags_lib_release +NAMES libgflags +HINTS +${GFlags_LIBRARY_DIRS} +PATH_SUFFIXES ${_gflags_libpath_suffixes}) +FIND_LIBRARY(GFlags_lib_debug +NAMES libgflags-debug +HINTS +${GFlags_LIBRARY_DIRS} +PATH_SUFFIXES ${_gflags_libpath_suffixes}) +SET(GFlags_lib optimized ${GFlags_lib_release} debug ${GFlags_lib_debug}) +else() +FIND_LIBRARY(GFlags_lib gflags ${GFlags_LIBRARY_DIRS}) +endif() + + + +# set up include and link directory +include_directories( +${GFlags_INCLUDE_DIRS} +) +link_directories(${GFlags_LIBRARY_DIRS}) + +SET(GFlags_LIBS +${GFlags_lib} +) + +SET(GFlags_FOUND true) + +MARK_AS_ADVANCED( +GFlags_INCLUDE_DIRS +) +ELSE(GFlags_ROOT_DIR) +FIND_PATH(GFlags_ROOT_DIR +src +) +MARK_AS_ADVANCED(GFlags_ROOT_DIR) +MESSAGE(SEND_ERROR "Cannot find Root directory of Google Flags") +SET(GFlags_FOUND false) +ENDIF(GFlags_ROOT_DIR) diff --git a/cmake/Modules/FindGLOG.cmake b/cmake/Modules/FindGLOG.cmake new file mode 100644 index 000000000..c4ddbe28a --- /dev/null +++ b/cmake/Modules/FindGLOG.cmake @@ -0,0 +1,103 @@ +# - Try to find the Google Glog library +# +# This module defines the following variables +# +# GLOG_FOUND - Was Glog found +# GLOG_INCLUDE_DIRS - the Glog include directories +# GLOG_LIBRARIES - Link to this +# +# This module accepts the following variables +# +# GLOG_ROOT - Can be set to Glog install path or Windows build path +# +#============================================================================= +# FindGlog.cmake, adapted from FindBullet.cmake which has the following +# copyright - +#----------------------------------------------------------------------------- +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if (NOT DEFINED GLOG_ROOT) +set (GLOG_ROOT /usr /usr/local) +endif (NOT DEFINED GLOG_ROOT) + +if(MSVC) +set(LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/Release) +else(MSVC) +set (LIB_PATHS ${GLOG_ROOT} ${GLOG_ROOT}/lib) +endif(MSVC) + +macro(_FIND_GLOG_LIBRARIES _var) +find_library(${_var} +NAMES +${ARGN} +PATHS +${LIB_PATHS} +PATH_SUFFIXES lib +) +mark_as_advanced(${_var}) +endmacro() + +macro(_GLOG_APPEND_LIBRARIES _list _release) +set(_debug ${_release}_DEBUG) +if(${_debug}) +set(${_list} ${${_list}} optimized ${${_release}} debug ${${_debug}}) +else() +set(${_list} ${${_list}} ${${_release}}) +endif() +endmacro() + +if(MSVC) +find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h +PATHS +${GLOG_ROOT}/src/windows +${GLOG_ROOT}/src/windows/glog +) +else(MSVC) +# Linux/OS X builds +find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h +PATHS +${GLOG_ROOT}/include/glog +) +endif(MSVC) + +# Find the libraries +if(MSVC) +_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.lib) +else(MSVC) +# Linux/OS X builds +_FIND_GLOG_LIBRARIES(GLOG_LIBRARIES libglog.so) +endif(MSVC) + +message("glog library = " ${GLOG_LIBRARIES}) + +# handle the QUIETLY and REQUIRED arguments and set GLOG_FOUND to TRUE if +# all listed variables are TRUE +include("${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake") +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glog DEFAULT_MSG +GLOG_LIBRARIES) + +if(MSVC) +string(REGEX REPLACE "/glog$" "" VAR_WITHOUT ${GLOG_INCLUDE_DIR}) +string(REGEX REPLACE "/windows$" "" VAR_WITHOUT ${VAR_WITHOUT}) +set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS} "${VAR_WITHOUT}") +string(REGEX REPLACE "/libglog.lib" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES}) +else(MSVC) +# Linux/OS X builds +set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR}) +string(REGEX REPLACE "/libglog.so" "" GLOG_LIBRARIES_DIR ${GLOG_LIBRARIES}) +endif(MSVC) + +if(GLOG_FOUND) +# _GLOG_APPEND_LIBRARIES(GLOG GLOG_LIBRARIES) +endif() diff --git a/cmake/Modules/FindGPSTK.cmake b/cmake/Modules/FindGPSTK.cmake new file mode 100644 index 000000000..9529154f9 --- /dev/null +++ b/cmake/Modules/FindGPSTK.cmake @@ -0,0 +1,87 @@ +# - Find gpstk library +# Find the native gpstk includes and library +# This module defines +# GPSTK_INCLUDE_DIR, where to find tiff.h, etc. +# GPSTK_LIBRARIES, libraries to link against to use GPSTK. +# GPSTK_FOUND, If false, do not try to use GPSTK. +# also defined, but not for general use are +# GPSTK_LIBRARY, where to find the GPSTK library. + +FIND_PATH(GPSTK_INCLUDE_DIR gpstk/Matrix.hpp) +FIND_PATH(GEOMATICS_INCLUDE_DIR gpstk/random.hpp) +FIND_PATH(PROCFRAME_INCLUDE_DIR gpstk/SolverWMS.hpp) +FIND_PATH(VDRAW_INCLUDE_DIR gpstk/Layout.hpp) +FIND_PATH(VPLOT_INCLUDE_DIR gpstk/ScatterPlot.hpp) +FIND_PATH(RXIO_INCLUDE_DIR gpstk/EphReader.hpp) + +SET(GPSTK_NAMES ${GPSTK_NAMES} gpstk libgpstk) +FIND_LIBRARY(GPSTK_LIBRARY NAMES ${GPSTK_NAMES} ) + +SET(GEOMATICS_NAMES ${GEOMATICS_NAMES} geomatics libgeomatics) +FIND_LIBRARY(GEOMATICS_LIBRARY NAMES ${GEOMATICS_NAMES} ) + +SET(PROCFRAME_NAMES ${PROCFRAME_NAMES} procframe libprocframe) +FIND_LIBRARY(PROCFRAME_LIBRARY NAMES ${PROCFRAME_NAMES} ) + +SET(VDRAW_NAMES ${VDRAW_NAMES} vdraw libvdraw) +FIND_LIBRARY(VDRAW_LIBRARY NAMES ${VDRAW_NAMES} ) + +SET(VPLOT_NAMES ${VPLOT_NAMES} vplot libvplot) +FIND_LIBRARY(VPLOT_LIBRARY NAMES ${VPLOT_NAMES} ) + +SET(RXIO_NAMES ${RXIO_NAMES} rxio librxio) +FIND_LIBRARY(RXIO_LIBRARY NAMES ${RXIO_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set GPSTK_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPSTK DEFAULT_MSG GPSTK_LIBRARY GPSTK_INCLUDE_DIR) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOMATICS DEFAULT_MSG GEOMATICS_LIBRARY GEOMATICS_INCLUDE_DIR) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROCFRAME DEFAULT_MSG PROCFRAME_LIBRARY PROCFRAME_INCLUDE_DIR) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(VDRAW DEFAULT_MSG VDRAW_LIBRARY VDRAW_INCLUDE_DIR) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(VPLOT DEFAULT_MSG VPLOT_LIBRARY VPLOT_INCLUDE_DIR) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(RXIO DEFAULT_MSG RXIO_LIBRARY RXIO_INCLUDE_DIR) + +IF(GPSTK_FOUND) + SET( GPSTK_LIBRARIES ${GPSTK_LIBRARY} ) +ENDIF(GPSTK_FOUND) + +IF(GEOMATICS_FOUND) + SET( GEOMATICS_LIBRARIES ${GEOMATICS_LIBRARY} ) +ENDIF(GEOMATICS_FOUND) + +IF(PROCFRAME_FOUND) + SET( PROCFRAME_LIBRARIES ${PROCFRAME_LIBRARY} ) +ENDIF(PROCFRAME_FOUND) + +IF(VDRAW_FOUND) + SET( VDRAW_LIBRARIES ${VDRAW_LIBRARY} ) +ENDIF(VDRAW_FOUND) + +IF(VPLOT_FOUND) + SET( VPLOT_LIBRARIES ${VPLOT_LIBRARY} ) +ENDIF(VPLOT_FOUND) + +IF(RXIO_FOUND) + SET( RXIO_LIBRARIES ${RXIO_LIBRARY} ) +ENDIF(RXIO_FOUND) + +MARK_AS_ADVANCED(GPSTK_INCLUDE_DIR GPSTK_LIBRARY) + +MARK_AS_ADVANCED(GEOMATICS_INCLUDE_DIR GEOMATICS_LIBRARY) + +MARK_AS_ADVANCED(PROCFRAME_INCLUDE_DIR PROCFRAME_LIBRARY) + +MARK_AS_ADVANCED(VDRAW_INCLUDE_DIR VDRAW_LIBRARY) + +MARK_AS_ADVANCED(VPLOT_INCLUDE_DIR VPLOT_LIBRARY) + +MARK_AS_ADVANCED(RXIO_INCLUDE_DIR RXIO_LIBRARY) + + diff --git a/cmake/Modules/FindGTest.cmake b/cmake/Modules/FindGTest.cmake new file mode 100644 index 000000000..5930043ef --- /dev/null +++ b/cmake/Modules/FindGTest.cmake @@ -0,0 +1,187 @@ +############################################################################## +00002 # @file FindGTest.cmake +00003 # @brief Find Google Test package. +00004 # +00005 # @par Input variables: +00006 # +00007 # +00008 # @tp @b GTest_DIR @endtp +00009 # +00013 # +00014 # +00015 # @tp @b GTEST_DIR @endtp +00016 # +00017 # +00018 # +00019 # @tp @b GTest_SHARED_LIBRARIES @endtp +00020 # +00022 # +00023 #
The Google Test package files are searched under the specified +00010 # root directory. If they are not found there, the default search +00011 # paths are considered. +00012 # This variable can also be set as environment variable.
Alternative environment variable for @p GTest_DIR.
Forces this module to search for shared libraries. +00021 # Otherwise, static libraries are preferred.
+00024 # +00025 # @par Output variables: +00026 # +00027 # +00028 # @tp @b GTest_FOUND @endtp +00029 # +00030 # +00031 # +00032 # @tp @b GTest_INCLUDE_DIR @endtp +00033 # +00034 # +00035 # +00036 # @tp @b GTest_INCLUDES @endtp +00037 # +00038 # +00039 # +00040 # @tp @b GTest_LIBRARY @endtp +00041 # +00042 # +00043 # +00044 # @tp @b GTest_main_LIBRARY @endtp +00045 # +00046 # +00047 # +00048 # @tp @b GTest_LIBRARIES @endtp +00049 # +00050 # +00051 #
Whether the package was found and the following CMake variables are valid.
Package include directories.
Include directories including prerequisite libraries.
Path of @c gtest library.
Path of @c gtest_main library (optional).
Package libraries and prerequisite libraries.
+00052 # +00053 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.
+00054 # See http://www.rad.upenn.edu/sbia/software/license.html or COPYING file. +00055 # +00056 # Contact: SBIA Group +00057 # +00058 # @ingroup CMakeFindModules +00059 ############################################################################## +00060 +00061 # ---------------------------------------------------------------------------- +00062 # initialize search +00063 if (NOT GTest_DIR) +00064 if ($ENV{GTEST_DIR}) +00065 set (GTest_DIR "$ENV{GTEST_DIR}" CACHE PATH "Installation prefix for Google Test") +00066 else () +00067 set (GTest_DIR "$ENV{GTest_DIR}" CACHE PATH "Installation prefix for Google Test") +00068 endif () +00069 endif () +00070 +00071 set (GTest_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) +00072 +00073 if (GTest_SHARED_LIBRARIES) +00074 if (WIN32) +00075 set (CMAKE_FIND_LIBRARY_SUFFIXES .dll) +00076 else () +00077 set (CMAKE_FIND_LIBRARY_SUFFIXES .so) +00078 endif() +00079 else () +00080 if (WIN32) +00081 set (CMAKE_FIND_LIBRARY_SUFFIXES .lib) +00082 else () +00083 set (CMAKE_FIND_LIBRARY_SUFFIXES .a) +00084 endif() +00085 endif () +00086 +00087 # ---------------------------------------------------------------------------- +00088 # find paths/files +00089 if (GTest_DIR) +00090 +00091 find_path ( +00092 GTest_INCLUDE_DIR +00093 NAMES gtest.h +00094 HINTS "${GTest_DIR}" +00095 PATH_SUFFIXES "include/gtest" +00096 DOC "Include directory for Google Test." +00097 NO_DEFAULT_PATH +00098 ) +00099 +00100 find_library ( +00101 GTest_LIBRARY +00102 NAMES gtest +00103 HINTS "${GTest_DIR}" +00104 PATH_SUFFIXES "lib" +00105 DOC "Link library for Google Test (gtest)." +00106 NO_DEFAULT_PATH +00107 ) +00108 +00109 find_library ( +00110 GTest_main_LIBRARY +00111 NAMES gtest_main +00112 HINTS "${GTest_DIR}" +00113 PATH_SUFFIXES "lib" +00114 DOC "Link library for Google Test's automatic main () definition (gtest_main)." +00115 NO_DEFAULT_PATH +00116 ) +00117 +00118 else () +00119 +00120 find_path ( +00121 GTest_INCLUDE_DIR +00122 NAMES gtest.h +00123 HINTS ENV C_INCLUDE_PATH ENV CXX_INCLUDE_PATH +00124 DOC "Include directory for Google Test." +00125 ) +00126 +00127 find_library ( +00128 GTest_LIBRARY +00129 NAMES gtest +00130 HINTS ENV LD_LIBRARY_PATH +00131 DOC "Link library for Google Test (gtest)." +00132 ) +00133 +00134 find_library ( +00135 GTest_main_LIBRARY +00136 NAMES gtest_main +00137 HINTS ENV LD_LIBRARY_PATH +00138 DOC "Link library for Google Test's automatic main () definition (gtest_main)." +00139 ) +00140 +00141 endif () +00142 +00143 mark_as_advanced (GTest_INCLUDE_DIR) +00144 mark_as_advanced (GTest_LIBRARY) +00145 mark_as_advanced (GTest_main_LIBRARY) +00146 +00147 # ---------------------------------------------------------------------------- +00148 # add prerequisites +00149 set (GTest_INCLUDES "${GTest_INCLUDE_DIR}") +00150 +00151 set (GTest_LIBRARIES) +00152 if (GTest_LIBRARY) +00153 list (APPEND GTest_LIBRARIES "${GTest_LIBRARY}") +00154 endif () +00155 if (GTest_main_LIBRARY) +00156 list (APPEND GTest_LIBRARIES "${GTest_main_LIBRARY}") +00157 endif () +00158 +00159 # ---------------------------------------------------------------------------- +00160 # reset CMake variables +00161 set (CMAKE_FIND_LIBRARY_SUFFIXES ${GTest_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) +00162 +00163 # ---------------------------------------------------------------------------- +00164 # aliases / backwards compatibility +00165 set (GTest_INCLUDE_DIRS "${GTest_INCLUDES}") +00166 +00167 # ---------------------------------------------------------------------------- +00168 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE +00169 # if all listed variables are found or TRUE +00170 include (FindPackageHandleStandardArgs) +00171 +00172 find_package_handle_standard_args ( +00173 GTest +00174 REQUIRED_VARS +00175 GTest_INCLUDE_DIR +00176 GTest_LIBRARY +00177 ) +00178 +00179 set (GTest_FOUND "${GTEST_FOUND}") +00180 +00181 # ---------------------------------------------------------------------------- +00182 # set GTest_DIR +00183 if (NOT GTest_DIR AND GTest_FOUND) +00184 string (REGEX REPLACE "include(/gtest)?/?" "" GTest_PREFIX "${GTest_INCLUDE_DIR}") +00185 set (GTest_DIR "${GTest_PREFIX}" CACHE PATH "Installation prefix for GTest." FORCE) +00186 unset (GTest_PREFIX) +00187 endif () diff --git a/cmake/Modules/FindGnuradioCore.cmake b/cmake/Modules/FindGnuradioCore.cmake new file mode 100644 index 000000000..3773588a7 --- /dev/null +++ b/cmake/Modules/FindGnuradioCore.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_GNURADIO_CORE gnuradio-core) + +FIND_PATH( + GNURADIO_CORE_INCLUDE_DIRS + NAMES gr_random.h + HINTS $ENV{GNURADIO_CORE_DIR}/include/gnuradio + ${PC_GNURADIO_CORE_INCLUDEDIR} + PATHS /usr/local/include/gnuradio + /usr/include/gnuradio +) + +FIND_LIBRARY( + GNURADIO_CORE_LIBRARIES + NAMES gnuradio-core + HINTS $ENV{GNURADIO_CORE_DIR}/lib + ${PC_GNURADIO_CORE_LIBDIR} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_CORE DEFAULT_MSG GNURADIO_CORE_LIBRARIES GNURADIO_CORE_INCLUDE_DIRS) +MARK_AS_ADVANCED(GNURADIO_CORE_LIBRARIES GNURADIO_CORE_INCLUDE_DIRS) diff --git a/cmake/Modules/FindGnuradioUHD.cmake b/cmake/Modules/FindGnuradioUHD.cmake new file mode 100644 index 000000000..33c437d54 --- /dev/null +++ b/cmake/Modules/FindGnuradioUHD.cmake @@ -0,0 +1,34 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_GNURADIO_UHD gnuradio-uhd) + +FIND_PATH( + GNURADIO_UHD_INCLUDE_DIRS + NAMES gnuradio/gr_uhd_api.h + HINTS $ENV{GNURADIO_UHD_DIR}/include + ${PC_GNURADIO_UHD_INCLUDEDIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + GNURADIO_UHD_LIBRARIES + NAMES gnuradio-uhd + HINTS $ENV{GNURADIO_UHD_DIR}/lib + ${PC_GNURADIO_UHD_LIBDIR} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +if(GNURADIO_UHD_INCLUDE_DIRS AND GNURADIO_UHD_LIBRARIES) + set(GNURADIO_UHD_FOUND TRUE CACHE INTERNAL "gnuradio-uhd found") + message(STATUS "Found gnuradio-uhd: ${GNURADIO_UHD_INCLUDE_DIRS}, ${GNURADIO_UHD_LIBRARIES}") +else(GNURADIO_UHD_INCLUDE_DIRS AND GNURADIO_UHD_LIBRARIES) + set(GNURADIO_UHD_FOUND FALSE CACHE INTERNAL "gnuradio-uhd found") + message(STATUS "gnuradio-uhd not found.") +endif(GNURADIO_UHD_INCLUDE_DIRS AND GNURADIO_UHD_LIBRARIES) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_UHD DEFAULT_MSG GNURADIO_UHD_LIBRARIES GNURADIO_UHD_INCLUDE_DIRS) +MARK_AS_ADVANCED(GNURADIO_UHD_LIBRARIES GNURADIO_UHD_INCLUDE_DIRS) diff --git a/cmake/Modules/FindGperftools.cmake b/cmake/Modules/FindGperftools.cmake new file mode 100644 index 000000000..e69de29bb diff --git a/cmake/Modules/FindGruel.cmake b/cmake/Modules/FindGruel.cmake new file mode 100644 index 000000000..58dff7044 --- /dev/null +++ b/cmake/Modules/FindGruel.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_GRUEL gruel) + +FIND_PATH( + GRUEL_INCLUDE_DIRS + NAMES gruel/attributes.h + HINTS $ENV{GRUEL_DIR}/include + ${PC_GRUEL_INCLUDEDIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + GRUEL_LIBRARIES + NAMES gruel + HINTS $ENV{GRUEL_DIR}/lib + ${PC_GRUEL_LIBDIR} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GRUEL DEFAULT_MSG GRUEL_LIBRARIES GRUEL_INCLUDE_DIRS) +MARK_AS_ADVANCED(GRUEL_LIBRARIES GRUEL_INCLUDE_DIRS) diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake new file mode 100644 index 000000000..b4d12b6d7 --- /dev/null +++ b/cmake/Modules/FindUHD.cmake @@ -0,0 +1,28 @@ +######################################################################## +# Find the library for the USRP Hardware Driver +######################################################################## + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_UHD uhd) + +FIND_PATH( + UHD_INCLUDE_DIRS + NAMES uhd/config.hpp + HINTS $ENV{UHD_DIR}/include + ${PC_UHD_INCLUDEDIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + UHD_LIBRARIES + NAMES uhd + HINTS $ENV{UHD_DIR}/lib + ${PC_UHD_LIBDIR} + PATHS /usr/local/lib + /usr/lib +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(UHD DEFAULT_MSG UHD_LIBRARIES UHD_INCLUDE_DIRS) +MARK_AS_ADVANCED(UHD_LIBRARIES UHD_INCLUDE_DIRS) diff --git a/cmake/Modules/FindVolk.cmake b/cmake/Modules/FindVolk.cmake new file mode 100644 index 000000000..425eb010c --- /dev/null +++ b/cmake/Modules/FindVolk.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_VOLK volk) + +FIND_PATH( + VOLK_INCLUDE_DIRS + NAMES volk/volk.h + HINTS $ENV{VOLK_DIR}/include + ${PC_VOLK_INCLUDEDIR} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + VOLK_LIBRARIES + NAMES volk + HINTS $ENV{VOLK_DIR}/lib + ${PC_VOLK_LIBDIR} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(VOLK DEFAULT_MSG VOLK_LIBRARIES VOLK_INCLUDE_DIRS) +MARK_AS_ADVANCED(VOLK_LIBRARIES VOLK_INCLUDE_DIRS) diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake new file mode 100644 index 000000000..9331d5deb --- /dev/null +++ b/cmake/Modules/GrMiscUtils.cmake @@ -0,0 +1,210 @@ +# Copyright 2010-2011 Free Software Foundation, Inc. +# +# 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, 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(DEFINED __INCLUDED_GR_MISC_UTILS_CMAKE) + return() +endif() +set(__INCLUDED_GR_MISC_UTILS_CMAKE TRUE) + +######################################################################## +# Set global variable macro. +# Used for subdirectories to export settings. +# Example: include and library paths. +######################################################################## +function(GR_SET_GLOBAL var) + set(${var} ${ARGN} CACHE INTERNAL "" FORCE) +endfunction(GR_SET_GLOBAL) + +######################################################################## +# Set the pre-processor definition if the condition is true. +# - def the pre-processor definition to set and condition name +######################################################################## +function(GR_ADD_COND_DEF def) + if(${def}) + add_definitions(-D${def}) + endif(${def}) +endfunction(GR_ADD_COND_DEF) + +######################################################################## +# Check for a header and conditionally set a compile define. +# - hdr the relative path to the header file +# - def the pre-processor definition to set +######################################################################## +function(GR_CHECK_HDR_N_DEF hdr def) + include(CheckIncludeFileCXX) + CHECK_INCLUDE_FILE_CXX(${hdr} ${def}) + GR_ADD_COND_DEF(${def}) +endfunction(GR_CHECK_HDR_N_DEF) + +######################################################################## +# Include subdirectory macro. +# Sets the CMake directory variables, +# includes the subdirectory CMakeLists.txt, +# resets the CMake directory variables. +# +# This macro includes subdirectories rather than adding them +# so that the subdirectory can affect variables in the level above. +# This provides a work-around for the lack of convenience libraries. +# This way a subdirectory can append to the list of library sources. +######################################################################## +macro(GR_INCLUDE_SUBDIRECTORY subdir) + #insert the current directories on the front of the list + list(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR}) + list(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR}) + + #set the current directories to the names of the subdirs + set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}) + set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir}) + + #include the subdirectory CMakeLists to run it + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) + + #reset the value of the current directories + list(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR) + list(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR) + + #pop the subdir names of the front of the list + list(REMOVE_AT _cmake_source_dirs 0) + list(REMOVE_AT _cmake_binary_dirs 0) +endmacro(GR_INCLUDE_SUBDIRECTORY) + +######################################################################## +# Check if a compiler flag works and conditionally set a compile define. +# - flag the compiler flag to check for +# - have the variable to set with result +######################################################################## +macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have) + include(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG(${flag} ${have}) + if(${have}) + add_definitions(${flag}) + endif(${have}) +endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE) + +######################################################################## +# Generates the .la libtool file +# This appears to generate libtool files that cannot be used by auto*. +# Usage GR_LIBTOOL(TARGET [target] DESTINATION [dest]) +# Notice: there is not COMPONENT option, these will not get distributed. +######################################################################## +function(GR_LIBTOOL) + if(NOT DEFINED GENERATE_LIBTOOL) + set(GENERATE_LIBTOOL OFF) #disabled by default + endif() + + if(GENERATE_LIBTOOL) + include(CMakeParseArgumentsCopy) + CMAKE_PARSE_ARGUMENTS(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN}) + + find_program(LIBTOOL libtool) + if(LIBTOOL) + include(CMakeMacroLibtoolFile) + CREATE_LIBTOOL_FILE(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION}) + endif(LIBTOOL) + endif(GENERATE_LIBTOOL) + +endfunction(GR_LIBTOOL) + +######################################################################## +# Do standard things to the library target +# - set target properties +# - make install rules +# Also handle gnuradio custom naming conventions w/ extras mode. +######################################################################## +function(GR_LIBRARY_FOO target) + #parse the arguments for component names + include(CMakeParseArgumentsCopy) + CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN}) + + #set additional target properties + set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER}) + + #install the generated files like so... + install(TARGETS ${target} + LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file + ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT} # .lib file + RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file + ) + + #extras mode enabled automatically on linux + if(NOT DEFINED LIBRARY_EXTRAS) + set(LIBRARY_EXTRAS ${LINUX}) + endif() + + #special extras mode to enable alternative naming conventions + if(LIBRARY_EXTRAS) + + #create .la file before changing props + GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR}) + + #give the library a special name with ultra-zero soversion + set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") + set(target_name lib${target}-${LIBVER}.so.0.0.0) + + #custom command to generate symlinks + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so + COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 + COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install + ) + + #and install the extra symlinks + install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so + ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 + DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} + ) + + endif(LIBRARY_EXTRAS) +endfunction(GR_LIBRARY_FOO) + +######################################################################## +# Create a dummy custom command that depends on other targets. +# Usage: +# GR_GEN_TARGET_DEPS(unique_name target_deps ...) +# ADD_CUSTOM_COMMAND( ${target_deps}) +# +# Custom command cant depend on targets, but can depend on executables, +# and executables can depend on targets. So this is the process: +######################################################################## +function(GR_GEN_TARGET_DEPS name var) + file( + WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in + "int main(void){return 0;}\n" + ) + execute_process( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in + ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp + ) + add_executable(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp) + if(ARGN) + add_dependencies(${name} ${ARGN}) + endif(ARGN) + + if(CMAKE_CROSSCOMPILING) + set(${var} "DEPENDS;${name}" PARENT_SCOPE) #cant call command when cross + else() + set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE) + endif() +endfunction(GR_GEN_TARGET_DEPS) diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake new file mode 100644 index 000000000..a2e4f3b34 --- /dev/null +++ b/cmake/Modules/GrPlatform.cmake @@ -0,0 +1,46 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# 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, 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(DEFINED __INCLUDED_GR_PLATFORM_CMAKE) + return() +endif() +set(__INCLUDED_GR_PLATFORM_CMAKE TRUE) + +######################################################################## +# Setup additional defines for OS types +######################################################################## +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(LINUX TRUE) +endif() + +if(LINUX AND EXISTS "/etc/debian_version") + set(DEBIAN TRUE) +endif() + +if(LINUX AND EXISTS "/etc/redhat-release") + set(REDHAT TRUE) +endif() + +######################################################################## +# when the library suffix should be 64 (applies to redhat linux family) +######################################################################## +if(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") + set(LIB_SUFFIX 64) +endif() +set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake new file mode 100644 index 000000000..efdddf371 --- /dev/null +++ b/cmake/Modules/GrPython.cmake @@ -0,0 +1,227 @@ +# Copyright 2010-2011 Free Software Foundation, Inc. +# +# 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, 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(DEFINED __INCLUDED_GR_PYTHON_CMAKE) + return() +endif() +set(__INCLUDED_GR_PYTHON_CMAKE TRUE) + +######################################################################## +# Setup the python interpreter: +# This allows the user to specify a specific interpreter, +# or finds the interpreter via the built-in cmake module. +######################################################################## +#this allows the user to override PYTHON_EXECUTABLE +if(PYTHON_EXECUTABLE) + + set(PYTHONINTERP_FOUND TRUE) + +#otherwise if not set, try to automatically find it +else(PYTHON_EXECUTABLE) + + #use the built-in find script + find_package(PythonInterp) + + #and if that fails use the find program routine + if(NOT PYTHONINTERP_FOUND) + find_program(PYTHON_EXECUTABLE NAMES python python2.7 python2.6 python2.5) + if(PYTHON_EXECUTABLE) + set(PYTHONINTERP_FOUND TRUE) + endif(PYTHON_EXECUTABLE) + endif(NOT PYTHONINTERP_FOUND) + +endif(PYTHON_EXECUTABLE) + +#make the path to the executable appear in the cmake gui +set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter") + +#make sure we can use -B with python (introduced in 2.6) +if(PYTHON_EXECUTABLE) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -B -c "" + OUTPUT_QUIET ERROR_QUIET + RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT + ) + if(PYTHON_HAS_DASH_B_RESULT EQUAL 0) + set(PYTHON_DASH_B "-B") + endif() +endif(PYTHON_EXECUTABLE) + +######################################################################## +# Check for the existence of a python module: +# - desc a string description of the check +# - mod the name of the module to import +# - cmd an additional command to run +# - have the result variable to set +######################################################################## +macro(GR_PYTHON_CHECK_MODULE desc mod cmd have) + message(STATUS "") + message(STATUS "Python checking for ${desc}") + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -c " +######################################### +try: import ${mod} +except: exit(-1) +try: assert ${cmd} +except: exit(-1) +#########################################" + RESULT_VARIABLE ${have} + ) + if(${have} EQUAL 0) + message(STATUS "Python checking for ${desc} - found") + set(${have} TRUE) + else(${have} EQUAL 0) + message(STATUS "Python checking for ${desc} - not found") + set(${have} FALSE) + endif(${have} EQUAL 0) +endmacro(GR_PYTHON_CHECK_MODULE) + +######################################################################## +# Sets the python installation directory GR_PYTHON_DIR +######################################################################## +execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " +from distutils import sysconfig +print sysconfig.get_python_lib(plat_specific=True, prefix='') +" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE +) +file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR) + +######################################################################## +# Create an always-built target with a unique name +# Usage: GR_UNIQUE_TARGET( ) +######################################################################## +function(GR_UNIQUE_TARGET desc) + file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib +unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] +print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" + OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) + add_custom_target(${_target} ALL DEPENDS ${ARGN}) +endfunction(GR_UNIQUE_TARGET) + +######################################################################## +# Install python sources (also builds and installs byte-compiled python) +######################################################################## +function(GR_PYTHON_INSTALL) + include(CMakeParseArgumentsCopy) + CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN}) + + #################################################################### + if(GR_PYTHON_INSTALL_FILES) + #################################################################### + install(${ARGN}) #installs regular python files + + #create a list of all generated files + unset(pysrcfiles) + unset(pycfiles) + unset(pyofiles) + foreach(pyfile ${GR_PYTHON_INSTALL_FILES}) + get_filename_component(pyfile ${pyfile} ABSOLUTE) + list(APPEND pysrcfiles ${pyfile}) + + #determine if this file is in the source or binary directory + file(RELATIVE_PATH source_rel_path ${CMAKE_CURRENT_SOURCE_DIR} ${pyfile}) + string(LENGTH "${source_rel_path}" source_rel_path_len) + file(RELATIVE_PATH binary_rel_path ${CMAKE_CURRENT_BINARY_DIR} ${pyfile}) + string(LENGTH "${binary_rel_path}" binary_rel_path_len) + + #and set the generated path appropriately + if(${source_rel_path_len} GREATER ${binary_rel_path_len}) + set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${binary_rel_path}) + else() + set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${source_rel_path}) + endif() + list(APPEND pycfiles ${pygenfile}c) + list(APPEND pyofiles ${pygenfile}o) + + #ensure generation path exists + get_filename_component(pygen_path ${pygenfile} PATH) + file(MAKE_DIRECTORY ${pygen_path}) + + endforeach(pyfile) + + #the command to generate the pyc files + add_custom_command( + DEPENDS ${pysrcfiles} OUTPUT ${pycfiles} + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pycfiles} + ) + + #the command to generate the pyo files + add_custom_command( + DEPENDS ${pysrcfiles} OUTPUT ${pyofiles} + COMMAND ${PYTHON_EXECUTABLE} -O ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pyofiles} + ) + + #create install rule and add generated files to target list + set(python_install_gen_targets ${pycfiles} ${pyofiles}) + install(FILES ${python_install_gen_targets} + DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} + COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} + ) + + + #################################################################### + elseif(GR_PYTHON_INSTALL_PROGRAMS) + #################################################################### + file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native) + + foreach(pyfile ${GR_PYTHON_INSTALL_PROGRAMS}) + get_filename_component(pyfile_name ${pyfile} NAME) + get_filename_component(pyfile ${pyfile} ABSOLUTE) + string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pyexefile "${pyfile}.exe") + list(APPEND python_install_gen_targets ${pyexefile}) + + get_filename_component(pyexefile_path ${pyexefile} PATH) + file(MAKE_DIRECTORY ${pyexefile_path}) + + add_custom_command( + OUTPUT ${pyexefile} DEPENDS ${pyfile} + COMMAND ${PYTHON_EXECUTABLE} -c + \"open('${pyexefile}', 'w').write('\#!${pyexe_native}\\n'+open('${pyfile}').read())\" + COMMENT "Shebangin ${pyfile_name}" + ) + + #on windows, python files need an extension to execute + get_filename_component(pyfile_ext ${pyfile} EXT) + if(WIN32 AND NOT pyfile_ext) + set(pyfile_name "${pyfile_name}.py") + endif() + + install(PROGRAMS ${pyexefile} RENAME ${pyfile_name} + DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} + COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} + ) + endforeach(pyfile) + + endif() + + GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets}) + +endfunction(GR_PYTHON_INSTALL) + +######################################################################## +# Write the python helper script that generates byte code files +######################################################################## +file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py " +import sys, py_compile +files = sys.argv[1:] +srcs, gens = files[:len(files)/2], files[len(files)/2:] +for src, gen in zip(srcs, gens): + py_compile.compile(file=src, cfile=gen, doraise=True) +") diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake new file mode 100644 index 000000000..6ba5ee3a5 --- /dev/null +++ b/cmake/Modules/GrSwig.cmake @@ -0,0 +1,229 @@ +# Copyright 2010-2011 Free Software Foundation, Inc. +# +# 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, 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(DEFINED __INCLUDED_GR_SWIG_CMAKE) + return() +endif() +set(__INCLUDED_GR_SWIG_CMAKE TRUE) + +include(GrPython) + +######################################################################## +# Builds a swig documentation file to be generated into python docstrings +# Usage: GR_SWIG_MAKE_DOCS(output_file input_path input_path....) +# +# Set the following variable to specify extra dependent targets: +# - GR_SWIG_DOCS_SOURCE_DEPS +# - GR_SWIG_DOCS_TARGET_DEPS +######################################################################## +function(GR_SWIG_MAKE_DOCS output_file) + find_package(Doxygen) + if(DOXYGEN_FOUND) + + #setup the input files variable list, quote formated + set(input_files) + unset(INPUT_PATHS) + foreach(input_path ${ARGN}) + 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}) + endif() + list(APPEND input_files ${input_path_h_files}) + set(INPUT_PATHS "${INPUT_PATHS} \"${input_path}\"") + endforeach(input_path) + + #determine the output directory + get_filename_component(name ${output_file} NAME_WE) + get_filename_component(OUTPUT_DIRECTORY ${output_file} PATH) + set(OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY}/${name}_swig_docs) + make_directory(${OUTPUT_DIRECTORY}) + + #generate the Doxyfile used by doxygen + configure_file( + ${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.swig_doc.in + ${OUTPUT_DIRECTORY}/Doxyfile + @ONLY) + + #Create a dummy custom command that depends on other targets + include(GrMiscUtils) + GR_GEN_TARGET_DEPS(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS}) + + #call doxygen on the Doxyfile + input headers + add_custom_command( + OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml + DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps} + COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile + COMMENT "Generating doxygen xml for ${name} docs" + ) + + #call the swig_doc script on the xml files + add_custom_command( + OUTPUT ${output_file} + DEPENDS ${input_files} ${OUTPUT_DIRECTORY}/xml/index.xml + COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} + ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py + ${OUTPUT_DIRECTORY}/xml + ${output_file} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/doxygen + ) + + else(DOXYGEN_FOUND) + file(WRITE ${output_file} "\n") #no doxygen -> empty file + endif(DOXYGEN_FOUND) +endfunction(GR_SWIG_MAKE_DOCS) + +######################################################################## +# Build a swig target for the common gnuradio use case. Usage: +# GR_SWIG_MAKE(target ifile ifile ifile...) +# +# Set the following variables before calling: +# - GR_SWIG_FLAGS +# - GR_SWIG_INCLUDE_DIRS +# - GR_SWIG_LIBRARIES +# - GR_SWIG_SOURCE_DEPS +# - GR_SWIG_TARGET_DEPS +# - GR_SWIG_DOC_FILE +# - GR_SWIG_DOC_DIRS +######################################################################## +macro(GR_SWIG_MAKE name) + set(ifiles ${ARGN}) + + #do swig doc generation if specified + if (GR_SWIG_DOC_FILE) + set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS}) + set(GR_SWIG_DOCS_TAREGT_DEPS ${GR_SWIG_TARGET_DEPS}) + GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS}) + list(APPEND GR_SWIG_SOURCE_DEPS ${GR_SWIG_DOC_FILE}) + endif() + + #append additional include directories + find_package(PythonLibs) + list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs) + list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS}) + list(APPEND GR_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}) + list(APPEND GR_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}) + + #determine include dependencies for swig file + execute_process( + COMMAND ${PYTHON_EXECUTABLE} + ${CMAKE_BINARY_DIR}/get_swig_deps.py + "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}" + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE SWIG_MODULE_${name}_EXTRA_DEPS + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + + #Create a dummy custom command that depends on other targets + include(GrMiscUtils) + GR_GEN_TARGET_DEPS(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS}) + set(tag_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.tag) + add_custom_command( + OUTPUT ${tag_file} + DEPENDS ${GR_SWIG_SOURCE_DEPS} ${tag_deps} + COMMAND ${CMAKE_COMMAND} -E touch ${tag_file} + ) + + #append the specified include directories + include_directories(${GR_SWIG_INCLUDE_DIRS}) + list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file}) + + #setup the swig flags with flags and include directories + set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS}) + foreach(dir ${GR_SWIG_INCLUDE_DIRS}) + list(APPEND CMAKE_SWIG_FLAGS "-I${dir}") + endforeach(dir) + + #set the C++ property on the swig .i file so it builds + set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON) + + #setup the actual swig library target to be built + include(UseSWIG) + SWIG_ADD_MODULE(${name} python ${ifiles}) + SWIG_LINK_LIBRARIES(${name} ${PYTHON_LIBRARIES} ${GR_SWIG_LIBRARIES}) + +endmacro(GR_SWIG_MAKE) + +######################################################################## +# Install swig targets generated by GR_SWIG_MAKE. Usage: +# GR_SWIG_INSTALL( +# TARGETS target target target... +# [DESTINATION destination] +# [COMPONENT component] +# ) +######################################################################## +macro(GR_SWIG_INSTALL) + + include(CMakeParseArgumentsCopy) + CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN}) + + foreach(name ${GR_SWIG_INSTALL_TARGETS}) + install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME} + DESTINATION ${GR_SWIG_INSTALL_DESTINATION} + COMPONENT ${GR_SWIG_INSTALL_COMPONENT} + ) + + include(GrPython) + GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py + DESTINATION ${GR_SWIG_INSTALL_DESTINATION} + COMPONENT ${GR_SWIG_INSTALL_COMPONENT} + ) + + GR_LIBTOOL( + TARGET ${SWIG_MODULE_${name}_REAL_NAME} + DESTINATION ${GR_SWIG_INSTALL_DESTINATION} + ) + + endforeach(name) + +endmacro(GR_SWIG_INSTALL) + +######################################################################## +# Generate a python file that can determine swig dependencies. +# Used by the make macro above to determine extra dependencies. +# When you build C++, CMake figures out the header dependencies. +# This code essentially performs that logic for swig includes. +######################################################################## +file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py " + +import os, sys, re + +include_matcher = re.compile('[#|%]include\\s*[<|\"](.*)[>|\"]') +include_dirs = sys.argv[2].split(';') + +def get_swig_incs(file_path): + file_contents = open(file_path, 'r').read() + return include_matcher.findall(file_contents, re.MULTILINE) + +def get_swig_deps(file_path, level): + deps = [file_path] + if level == 0: return deps + for inc_file in get_swig_incs(file_path): + for inc_dir in include_dirs: + inc_path = os.path.join(inc_dir, inc_file) + if not os.path.exists(inc_path): continue + deps.extend(get_swig_deps(inc_path, level-1)) + return deps + +if __name__ == '__main__': + ifiles = sys.argv[1].split(';') + deps = sum([get_swig_deps(ifile, 3) for ifile in ifiles], []) + #sys.stderr.write(';'.join(set(deps)) + '\\n\\n') + print(';'.join(set(deps))) +") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 000000000..1e86bf6b6 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (C) 2010-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(algorithms) +add_subdirectory(core) +add_subdirectory(main) + +#add_subdirectory(tests) +#add_subdirectory(utils) diff --git a/src/algorithms/CMakeLists.txt b/src/algorithms/CMakeLists.txt new file mode 100644 index 000000000..720fbb9eb --- /dev/null +++ b/src/algorithms/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(acquisition) +add_subdirectory(channel) +add_subdirectory(libs) +add_subdirectory(conditioner) +add_subdirectory(data_type_adapter) +add_subdirectory(observables) +add_subdirectory(telemetry_decoder) +add_subdirectory(output_filter) +add_subdirectory(resampler) +add_subdirectory(signal_source) +add_subdirectory(input_filter) +add_subdirectory(tracking) +add_subdirectory(PVT) diff --git a/src/algorithms/PVT/CMakeLists.txt b/src/algorithms/PVT/CMakeLists.txt new file mode 100644 index 000000000..ccdfafe49 --- /dev/null +++ b/src/algorithms/PVT/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) +add_subdirectory(libs) diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt new file mode 100644 index 000000000..6c1cb502a --- /dev/null +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(PVT_ADAPTER_SOURCES gps_l1_ca_pvt.cc) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(pvt_adapters ${PVT_ADAPTER_SOURCES}) +target_link_libraries(pvt_adapters pvt_gr_blocks) \ No newline at end of file diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..9b4af4693 --- /dev/null +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(PVT_GR_BLOCKS_SOURCES gps_l1_ca_pvt_cc.cc) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(pvt_gr_blocks ${PVT_GR_BLOCKS_SOURCES}) +target_link_libraries(pvt_gr_blocks pvt_lib) \ No newline at end of file diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt new file mode 100644 index 000000000..55e5f5d68 --- /dev/null +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(PVT_LIB_SOURCES + gps_l1_ca_ls_pvt.cc + kml_printer.cc + rinex_printer.cc + nmea_printer.cc +) + + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${ARMADILLO_INCLUDE_DIRS} +) + +add_library(pvt_lib ${PVT_LIB_SOURCES}) +target_link_libraries(pvt_lib ${Boost_LIBRARIES} ${ARMADILLO_LIBRARY}) \ No newline at end of file diff --git a/src/algorithms/acquisition/CMakeLists.txt b/src/algorithms/acquisition/CMakeLists.txt new file mode 100644 index 000000000..dcfbeb452 --- /dev/null +++ b/src/algorithms/acquisition/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) + diff --git a/src/algorithms/acquisition/adapters/CMakeLists.txt b/src/algorithms/acquisition/adapters/CMakeLists.txt new file mode 100644 index 000000000..5d4919902 --- /dev/null +++ b/src/algorithms/acquisition/adapters/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(ACQ_ADAPTER_SOURCES + galileo_e1_pcps_ambiguous_acquisition.cc + gps_l1_ca_pcps_acquisition.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(acq_adapters ${ACQ_ADAPTER_SOURCES}) +target_link_libraries(acq_adapters gnss_sp_libs acq_gr_blocks) \ No newline at end of file diff --git a/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..083bb3c3c --- /dev/null +++ b/src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(ACQ_GR_BLOCKS_SOURCES pcps_acquisition_cc.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${GR_FFT_INCLUDE_DIRS} + ${VOLK_INCLUDE_DIRS} +) + +add_library(acq_gr_blocks ${ACQ_GR_BLOCKS_SOURCES}) +target_link_libraries(acq_gr_blocks gnuradio-fft volk) diff --git a/src/algorithms/channel/CMakeLists.txt b/src/algorithms/channel/CMakeLists.txt new file mode 100644 index 000000000..03c35738e --- /dev/null +++ b/src/algorithms/channel/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(libs) \ No newline at end of file diff --git a/src/algorithms/channel/adapters/CMakeLists.txt b/src/algorithms/channel/adapters/CMakeLists.txt new file mode 100644 index 000000000..623c94016 --- /dev/null +++ b/src/algorithms/channel/adapters/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(CHANNEL_ADAPTER_SOURCES channel.cc) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(channel_adapters ${CHANNEL_ADAPTER_SOURCES}) +target_link_libraries(channel_adapters channel_fsm) \ No newline at end of file diff --git a/src/algorithms/channel/libs/CMakeLists.txt b/src/algorithms/channel/libs/CMakeLists.txt new file mode 100644 index 000000000..b9bc8b3d0 --- /dev/null +++ b/src/algorithms/channel/libs/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(CHANNEL_FSM_SOURCES gps_l1_ca_channel_fsm.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(channel_fsm ${CHANNEL_FSM_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/conditioner/CMakeLists.txt b/src/algorithms/conditioner/CMakeLists.txt new file mode 100644 index 000000000..ebeb32dc4 --- /dev/null +++ b/src/algorithms/conditioner/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +#add_subdirectory(gnuradio_blocks) \ No newline at end of file diff --git a/src/algorithms/conditioner/adapters/CMakeLists.txt b/src/algorithms/conditioner/adapters/CMakeLists.txt new file mode 100644 index 000000000..c7b5b7512 --- /dev/null +++ b/src/algorithms/conditioner/adapters/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + + +set(COND_ADAPTER_SOURCES signal_conditioner.cc) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(conditioner_adapters ${COND_ADAPTER_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/data_type_adapter/CMakeLists.txt b/src/algorithms/data_type_adapter/CMakeLists.txt new file mode 100644 index 000000000..d1eef6328 --- /dev/null +++ b/src/algorithms/data_type_adapter/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) \ No newline at end of file diff --git a/src/algorithms/data_type_adapter/adapters/CMakeLists.txt b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt new file mode 100644 index 000000000..52472f13f --- /dev/null +++ b/src/algorithms/data_type_adapter/adapters/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + + +set(DATATYPE_ADAPTER_SOURCES ishort_to_complex.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${GR_BLOCKS_INCLUDE_DIRS} +) + +add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES}) +target_link_libraries(datatype_adapters gnuradio-blocks) \ No newline at end of file diff --git a/src/algorithms/input_filter/CMakeLists.txt b/src/algorithms/input_filter/CMakeLists.txt new file mode 100644 index 000000000..d1eef6328 --- /dev/null +++ b/src/algorithms/input_filter/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) \ No newline at end of file diff --git a/src/algorithms/input_filter/adapters/CMakeLists.txt b/src/algorithms/input_filter/adapters/CMakeLists.txt new file mode 100644 index 000000000..b70d9806a --- /dev/null +++ b/src/algorithms/input_filter/adapters/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(INPUT_FILTER_ADAPTER_SOURCES + fir_filter.cc + freq_xlating_fir_filter.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${GR_FILTER_INCLUDE_DIRS} +) + +add_library(input_filter_adapters ${INPUT_FILTER_ADAPTER_SOURCES}) +target_link_libraries(input_filter_adapters gnuradio-filter) \ No newline at end of file diff --git a/src/algorithms/libs/CMakeLists.txt b/src/algorithms/libs/CMakeLists.txt new file mode 100644 index 000000000..9d7c6a104 --- /dev/null +++ b/src/algorithms/libs/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(GNSS_SPLIBS_SOURCES + galileo_e1_signal_processing.cc + gnss_sdr_valve.cc + gnss_signal_processing.cc + gps_sdr_signal_processing.cc + nco_lib.cc + pass_through.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/core/interfaces +) + +add_library(gnss_sp_libs ${GNSS_SPLIBS_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/observables/CMakeLists.txt b/src/algorithms/observables/CMakeLists.txt new file mode 100644 index 000000000..ccd60e9b6 --- /dev/null +++ b/src/algorithms/observables/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) \ No newline at end of file diff --git a/src/algorithms/observables/adapters/CMakeLists.txt b/src/algorithms/observables/adapters/CMakeLists.txt new file mode 100644 index 000000000..425c43e2e --- /dev/null +++ b/src/algorithms/observables/adapters/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(OBS_ADAPTER_SOURCES gps_l1_ca_observables.cc) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(obs_adapters ${OBS_ADAPTER_SOURCES}) +target_link_libraries(obs_adapters obs_gr_blocks) diff --git a/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..5fc9ca449 --- /dev/null +++ b/src/algorithms/observables/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(OBS_GR_BLOCKS_SOURCES gps_l1_ca_observables_cc.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(obs_gr_blocks ${OBS_GR_BLOCKS_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/output_filter/CMakeLists.txt b/src/algorithms/output_filter/CMakeLists.txt new file mode 100644 index 000000000..d1eef6328 --- /dev/null +++ b/src/algorithms/output_filter/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) \ No newline at end of file diff --git a/src/algorithms/output_filter/adapters/CMakeLists.txt b/src/algorithms/output_filter/adapters/CMakeLists.txt new file mode 100644 index 000000000..7e5054aed --- /dev/null +++ b/src/algorithms/output_filter/adapters/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(OUTPUTFILTER_ADAPTER_SOURCES + file_output_filter.cc + null_sink_output_filter.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(out_adapters ${OUTPUTFILTER_ADAPTER_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/resampler/CMakeLists.txt b/src/algorithms/resampler/CMakeLists.txt new file mode 100644 index 000000000..ccd60e9b6 --- /dev/null +++ b/src/algorithms/resampler/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) \ No newline at end of file diff --git a/src/algorithms/resampler/adapters/CMakeLists.txt b/src/algorithms/resampler/adapters/CMakeLists.txt new file mode 100644 index 000000000..32eb2b2de --- /dev/null +++ b/src/algorithms/resampler/adapters/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(RESAMPLER_ADAPTER_SOURCES direct_resampler_conditioner.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/algorithms/resampler/gnuradio_blocks + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(resampler_adapters ${RESAMPLER_ADAPTER_SOURCES}) +target_link_libraries(resampler_adapters resampler_gr_blocks) \ No newline at end of file diff --git a/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..54223c619 --- /dev/null +++ b/src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + + +set(RESAMPLER_GR_BLOCKS_SOURCES + direct_resampler_conditioner_cc.cc +# direct_resampler_conditioner_ss.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(resampler_gr_blocks ${RESAMPLER_GR_BLOCKS_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/signal_source/CMakeLists.txt b/src/algorithms/signal_source/CMakeLists.txt new file mode 100644 index 000000000..ebeb32dc4 --- /dev/null +++ b/src/algorithms/signal_source/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +#add_subdirectory(gnuradio_blocks) \ No newline at end of file diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt new file mode 100644 index 000000000..b5f91986b --- /dev/null +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -0,0 +1,51 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +# Optional drivers + +IF($ENV{GN3S_DRIVER}) + message(" GN3S ") + set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters) + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} gn3s_signal_source.cc) +ENDIF($ENV{GN3S_DRIVER}) + +IF($ENV{RTLSDR_DRIVER}) + message(" RTLSDR ") + set(OPT_DRIVER_INCLUDE_DIRS ${OPT_DRIVER_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters) + set(OPT_DRIVER_SOURCES ${OPT_DRIVER_SOURCES} rtlsdr_signal_source.cc) +ENDIF($ENV{RTLSDR_DRIVER}) + +set(SIGNAL_SOURCE_ADAPTER_SOURCES file_signal_source.cc uhd_signal_source.cc ${OPT_DRIVER_SOURCES}) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + $(OPT_DRIVER_INCLUDE_DIRS) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${GR_UHD_INCLUDE_DIRS} + ${UHD_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} +) + +link_directories(${Boost_LIBRARY_DIR}) + +add_library(signal_source_adapters ${SIGNAL_SOURCE_ADAPTER_SOURCES}) +target_link_libraries(signal_source_adapters gnss_sp_libs ${Boost_LIBRARIES} uhd gnuradio-uhd) \ No newline at end of file diff --git a/src/algorithms/telemetry_decoder/CMakeLists.txt b/src/algorithms/telemetry_decoder/CMakeLists.txt new file mode 100644 index 000000000..c6a1871eb --- /dev/null +++ b/src/algorithms/telemetry_decoder/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) +add_subdirectory(libs) \ No newline at end of file diff --git a/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt new file mode 100644 index 000000000..cea217b64 --- /dev/null +++ b/src/algorithms/telemetry_decoder/adapters/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(TELEMETRY_DECODER_ADAPTER_SOURCES gps_l1_ca_telemetry_decoder.cc ) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(telemetry_decoder_adapters ${TELEMETRY_DECODER_ADAPTER_SOURCES}) +target_link_libraries(telemetry_decoder_adapters telemetry_decoder_gr_blocks) \ No newline at end of file diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..31d8fe942 --- /dev/null +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(TELEMETRY_DECODER_GR_BLOCKS_SOURCES + gps_l1_ca_telemetry_decoder_cc.cc +# direct_resampler_conditioner_ss.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(telemetry_decoder_gr_blocks ${TELEMETRY_DECODER_GR_BLOCKS_SOURCES}) +target_link_libraries(telemetry_decoder_gr_blocks telemetry_decoder_lib gnss_system_parameters) \ No newline at end of file diff --git a/src/algorithms/telemetry_decoder/libs/CMakeLists.txt b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt new file mode 100644 index 000000000..987498041 --- /dev/null +++ b/src/algorithms/telemetry_decoder/libs/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(TELEMETRY_DECODER_LIB_SOURCES + gps_l1_ca_subframe_fsm.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES}) \ No newline at end of file diff --git a/src/algorithms/tracking/CMakeLists.txt b/src/algorithms/tracking/CMakeLists.txt new file mode 100644 index 000000000..c6a1871eb --- /dev/null +++ b/src/algorithms/tracking/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(adapters) +add_subdirectory(gnuradio_blocks) +add_subdirectory(libs) \ No newline at end of file diff --git a/src/algorithms/tracking/adapters/CMakeLists.txt b/src/algorithms/tracking/adapters/CMakeLists.txt new file mode 100644 index 000000000..111e3403c --- /dev/null +++ b/src/algorithms/tracking/adapters/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + + +set(TRACKING_ADAPTER_SOURCES + galileo_e1_dll_pll_veml_tracking.cc + galileo_e1_tcp_connector_tracking.cc + gps_l1_ca_dll_fll_pll_tracking.cc + gps_l1_ca_dll_pll_optim_tracking.cc + gps_l1_ca_dll_pll_tracking.cc + gps_l1_ca_tcp_connector_tracking.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(tracking_adapters ${TRACKING_ADAPTER_SOURCES}) +target_link_libraries(tracking_adapters tracking_gr_blocks gnss_sp_libs) \ No newline at end of file diff --git a/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt new file mode 100644 index 000000000..6d3b1611d --- /dev/null +++ b/src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(TRACKING_GR_BLOCKS_SOURCES + galileo_e1_dll_pll_veml_tracking_cc.cc + galileo_e1_tcp_connector_tracking_cc.cc + gps_l1_ca_dll_fll_pll_tracking_cc.cc + gps_l1_ca_dll_pll_optim_tracking_cc.cc + gps_l1_ca_dll_pll_tracking_cc.cc + gps_l1_ca_tcp_connector_tracking_cc.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} +) + +add_library(tracking_gr_blocks ${TRACKING_GR_BLOCKS_SOURCES}) +target_link_libraries(tracking_gr_blocks tracking_lib gnuradio-core gnss_sp_libs ${Boost_LINK_LIBRARIES} ) \ No newline at end of file diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt new file mode 100644 index 000000000..eacc5f603 --- /dev/null +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(TRACKING_LIB_SOURCES + cordic.cc + correlator.cc + lock_detectors.cc + tcp_communication.cc + tcp_packet_data.cc + tracking_2nd_DLL_filter.cc + tracking_2nd_PLL_filter.cc + tracking_discriminators.cc + tracking_FLL_PLL_filter.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${VOLK_INCLUDE_DIRS} +) + +add_library(tracking_lib ${TRACKING_LIB_SOURCES}) +target_link_libraries(tracking_lib ${VOLK_LIBRARIES} gnuradio-core) \ No newline at end of file diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 000000000..b4a008996 --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +add_subdirectory(system_parameters) +add_subdirectory(libs) +add_subdirectory(receiver) + diff --git a/src/core/libs/CMakeLists.txt b/src/core/libs/CMakeLists.txt new file mode 100644 index 000000000..da053031a --- /dev/null +++ b/src/core/libs/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(CORE_LIBS_SOURCES ini.cc INIReader.cc string_converter.cc) +add_library(rx_core_lib ${CORE_LIBS_SOURCES}) \ No newline at end of file diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt new file mode 100644 index 000000000..b3b0739ec --- /dev/null +++ b/src/core/receiver/CMakeLists.txt @@ -0,0 +1,61 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(GNSS_RECEIVER_SOURCES + control_thread.cc + control_message_factory.cc + file_configuration.cc + gnss_block_factory.cc + gnss_flowgraph.cc + in_memory_configuration.cc +) +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/signal_source/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/output_filter/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/channel/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/channel/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/conditioner/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/data_type_adapter/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/resampler/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/input_filter/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/acquisition/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/tracking/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/telemetry_decoder/libs + ${CMAKE_SOURCE_DIR}/src/algorithms/observables/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/observables/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/adapters + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/gnuradio_blocks + ${CMAKE_SOURCE_DIR}/src/algorithms/PVT/libs + ${Boost_INCLUDE_DIRS} + ${GNURADIO_CORE_INCLUDE_DIRS} + #${GNURADIO_GRUEL_INCLUDE_DIRS} +) +link_directories(${Boost_LIBRARY_DIR}) + +add_library(gnss_rx ${GNSS_RECEIVER_SOURCES}) +target_link_libraries(gnss_rx ${Boost_LIBRARIES} gnuradio-core gnss_system_parameters gnss_sp_libs signal_source_adapters datatype_adapters input_filter_adapters conditioner_adapters resampler_adapters acq_adapters tracking_lib tracking_adapters channel_adapters telemetry_decoder_adapters obs_adapters pvt_adapters pvt_lib out_adapters rx_core_lib) \ No newline at end of file diff --git a/src/core/system_parameters/CMakeLists.txt b/src/core/system_parameters/CMakeLists.txt new file mode 100644 index 000000000..7c44ad9f4 --- /dev/null +++ b/src/core/system_parameters/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + +set(SYSTEM_PARAMETERS_SOURCES + gnss_satellite.cc + gnss_signal.cc + gps_navigation_message.cc +) + +include_directories( + $(CMAKE_CURRENT_SOURCE_DIR) + ${GLOG_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} +) + +link_directories(${Boost_LIBRARY_DIR}) + +add_library(gnss_system_parameters ${SYSTEM_PARAMETERS_SOURCES}) +target_link_libraries(gnss_system_parameters ${Boost_LIBRARIES}) diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt new file mode 100644 index 000000000..5e8b9f0b7 --- /dev/null +++ b/src/main/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2012-2013 (see AUTHORS file for a list of contributors) +# +# This file is part of GNSS-SDR. +# +# 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 of the License, or +# at your option) any later version. +# +# 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 GNSS-SDR. If not, see . +# + + +# message(" We see ${Boost_LIBRARIES}") + +include_directories( + ${CMAKE_SOURCE_DIR}/src/core/system_parameters + ${CMAKE_SOURCE_DIR}/src/core/interfaces + ${CMAKE_SOURCE_DIR}/src/core/receiver + ${GLOG_INCLUDE_DIRS} + ${GFlags_INCLUDE_DIRS} + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GNURADIO_GRUEL_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} +) + +add_executable(gnss-sdr ${CMAKE_CURRENT_SOURCE_DIR}/main.cc) + +target_link_libraries(gnss-sdr ${Boost_LIBRARIES} glog gflags gnss_sp_libs gnss_rx) + +install(TARGETS gnss-sdr + DESTINATION ${CMAKE_SOURCE_DIR}/install + ) +