mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-06 07:20:34 +00:00
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
This commit is contained in:
parent
520deaf7cd
commit
c6e974ab21
225
CMakeLists.txt
Normal file
225
CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
########################################################################
|
||||
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)
|
||||
|
||||
|
138
cmake/Modules/CMakeParseArgumentsCopy.cmake
Normal file
138
cmake/Modules/CMakeParseArgumentsCopy.cmake
Normal file
@ -0,0 +1,138 @@
|
||||
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> 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 <options> 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 <one_value_keywords> argument contains all keywords for this macro
|
||||
# which are followed by one value, like e.g. DESTINATION keyword of the
|
||||
# install() command.
|
||||
#
|
||||
# The <multi_value_keywords> 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 <options>, <one_value_keywords> and
|
||||
# <multi_value_keywords> a variable composed of the given <prefix>
|
||||
# followed by "_" and the name of the respective keyword.
|
||||
# These variables will then hold the respective value from the argument list.
|
||||
# For the <options> keywords this will be TRUE or FALSE.
|
||||
#
|
||||
# All remaining arguments are collected in a variable
|
||||
# <prefix>_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 <neundorf@kde.org>
|
||||
#
|
||||
# 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)
|
98
cmake/Modules/FindGFlags.cmake
Normal file
98
cmake/Modules/FindGFlags.cmake
Normal file
@ -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)
|
103
cmake/Modules/FindGLOG.cmake
Normal file
103
cmake/Modules/FindGLOG.cmake
Normal file
@ -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 <philip@yhbt.com>
|
||||
#
|
||||
# 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()
|
87
cmake/Modules/FindGPSTK.cmake
Normal file
87
cmake/Modules/FindGPSTK.cmake
Normal file
@ -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)
|
||||
|
||||
|
187
cmake/Modules/FindGTest.cmake
Normal file
187
cmake/Modules/FindGTest.cmake
Normal file
@ -0,0 +1,187 @@
|
||||
##############################################################################
|
||||
00002 # @file FindGTest.cmake
|
||||
00003 # @brief Find Google Test package.
|
||||
00004 #
|
||||
00005 # @par Input variables:
|
||||
00006 # <table border="0">
|
||||
00007 # <tr>
|
||||
00008 # @tp @b GTest_DIR @endtp
|
||||
00009 # <td>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.</td>
|
||||
00013 # </tr>
|
||||
00014 # <tr>
|
||||
00015 # @tp @b GTEST_DIR @endtp
|
||||
00016 # <td>Alternative environment variable for @p GTest_DIR.</td>
|
||||
00017 # </tr>
|
||||
00018 # <tr>
|
||||
00019 # @tp @b GTest_SHARED_LIBRARIES @endtp
|
||||
00020 # <td>Forces this module to search for shared libraries.
|
||||
00021 # Otherwise, static libraries are preferred.</td>
|
||||
00022 # </tr>
|
||||
00023 # </table>
|
||||
00024 #
|
||||
00025 # @par Output variables:
|
||||
00026 # <table border="0">
|
||||
00027 # <tr>
|
||||
00028 # @tp @b GTest_FOUND @endtp
|
||||
00029 # <td>Whether the package was found and the following CMake variables are valid.</td>
|
||||
00030 # </tr>
|
||||
00031 # <tr>
|
||||
00032 # @tp @b GTest_INCLUDE_DIR @endtp
|
||||
00033 # <td>Package include directories.</td>
|
||||
00034 # </tr>
|
||||
00035 # <tr>
|
||||
00036 # @tp @b GTest_INCLUDES @endtp
|
||||
00037 # <td>Include directories including prerequisite libraries.</td>
|
||||
00038 # </tr>
|
||||
00039 # <tr>
|
||||
00040 # @tp @b GTest_LIBRARY @endtp
|
||||
00041 # <td>Path of @c gtest library.</td>
|
||||
00042 # </tr>
|
||||
00043 # <tr>
|
||||
00044 # @tp @b GTest_main_LIBRARY @endtp
|
||||
00045 # <td>Path of @c gtest_main library (optional).</td>
|
||||
00046 # </tr>
|
||||
00047 # <tr>
|
||||
00048 # @tp @b GTest_LIBRARIES @endtp
|
||||
00049 # <td>Package libraries and prerequisite libraries.</td>
|
||||
00050 # </tr>
|
||||
00051 # </table>
|
||||
00052 #
|
||||
00053 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br />
|
||||
00054 # See http://www.rad.upenn.edu/sbia/software/license.html or COPYING file.
|
||||
00055 #
|
||||
00056 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
|
||||
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 ()
|
26
cmake/Modules/FindGnuradioCore.cmake
Normal file
26
cmake/Modules/FindGnuradioCore.cmake
Normal file
@ -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)
|
34
cmake/Modules/FindGnuradioUHD.cmake
Normal file
34
cmake/Modules/FindGnuradioUHD.cmake
Normal file
@ -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)
|
0
cmake/Modules/FindGperftools.cmake
Normal file
0
cmake/Modules/FindGperftools.cmake
Normal file
26
cmake/Modules/FindGruel.cmake
Normal file
26
cmake/Modules/FindGruel.cmake
Normal file
@ -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)
|
28
cmake/Modules/FindUHD.cmake
Normal file
28
cmake/Modules/FindUHD.cmake
Normal file
@ -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)
|
26
cmake/Modules/FindVolk.cmake
Normal file
26
cmake/Modules/FindVolk.cmake
Normal file
@ -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)
|
210
cmake/Modules/GrMiscUtils.cmake
Normal file
210
cmake/Modules/GrMiscUtils.cmake
Normal file
@ -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 <target1> <target2> ...)
|
||||
# ADD_CUSTOM_COMMAND(<the usual args> ${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)
|
46
cmake/Modules/GrPlatform.cmake
Normal file
46
cmake/Modules/GrPlatform.cmake
Normal file
@ -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")
|
227
cmake/Modules/GrPython.cmake
Normal file
227
cmake/Modules/GrPython.cmake
Normal file
@ -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(<description> <dependencies list>)
|
||||
########################################################################
|
||||
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)
|
||||
")
|
229
cmake/Modules/GrSwig.cmake
Normal file
229
cmake/Modules/GrSwig.cmake
Normal file
@ -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)))
|
||||
")
|
24
src/CMakeLists.txt
Normal file
24
src/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(algorithms)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(main)
|
||||
|
||||
#add_subdirectory(tests)
|
||||
#add_subdirectory(utils)
|
31
src/algorithms/CMakeLists.txt
Normal file
31
src/algorithms/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
21
src/algorithms/PVT/CMakeLists.txt
Normal file
21
src/algorithms/PVT/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
add_subdirectory(libs)
|
33
src/algorithms/PVT/adapters/CMakeLists.txt
Normal file
33
src/algorithms/PVT/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
32
src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt
Normal file
32
src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
40
src/algorithms/PVT/libs/CMakeLists.txt
Normal file
40
src/algorithms/PVT/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
21
src/algorithms/acquisition/CMakeLists.txt
Normal file
21
src/algorithms/acquisition/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
|
36
src/algorithms/acquisition/adapters/CMakeLists.txt
Normal file
36
src/algorithms/acquisition/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
34
src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt
Normal file
34
src/algorithms/acquisition/gnuradio_blocks/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
20
src/algorithms/channel/CMakeLists.txt
Normal file
20
src/algorithms/channel/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(libs)
|
32
src/algorithms/channel/adapters/CMakeLists.txt
Normal file
32
src/algorithms/channel/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
31
src/algorithms/channel/libs/CMakeLists.txt
Normal file
31
src/algorithms/channel/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
20
src/algorithms/conditioner/CMakeLists.txt
Normal file
20
src/algorithms/conditioner/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
#add_subdirectory(gnuradio_blocks)
|
33
src/algorithms/conditioner/adapters/CMakeLists.txt
Normal file
33
src/algorithms/conditioner/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
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})
|
19
src/algorithms/data_type_adapter/CMakeLists.txt
Normal file
19
src/algorithms/data_type_adapter/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
32
src/algorithms/data_type_adapter/adapters/CMakeLists.txt
Normal file
32
src/algorithms/data_type_adapter/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
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)
|
19
src/algorithms/input_filter/CMakeLists.txt
Normal file
19
src/algorithms/input_filter/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
34
src/algorithms/input_filter/adapters/CMakeLists.txt
Normal file
34
src/algorithms/input_filter/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
35
src/algorithms/libs/CMakeLists.txt
Normal file
35
src/algorithms/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
20
src/algorithms/observables/CMakeLists.txt
Normal file
20
src/algorithms/observables/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
33
src/algorithms/observables/adapters/CMakeLists.txt
Normal file
33
src/algorithms/observables/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
32
src/algorithms/observables/gnuradio_blocks/CMakeLists.txt
Normal file
32
src/algorithms/observables/gnuradio_blocks/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
19
src/algorithms/output_filter/CMakeLists.txt
Normal file
19
src/algorithms/output_filter/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
32
src/algorithms/output_filter/adapters/CMakeLists.txt
Normal file
32
src/algorithms/output_filter/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
20
src/algorithms/resampler/CMakeLists.txt
Normal file
20
src/algorithms/resampler/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
30
src/algorithms/resampler/adapters/CMakeLists.txt
Normal file
30
src/algorithms/resampler/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
31
src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt
Normal file
31
src/algorithms/resampler/gnuradio_blocks/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
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})
|
20
src/algorithms/signal_source/CMakeLists.txt
Normal file
20
src/algorithms/signal_source/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
#add_subdirectory(gnuradio_blocks)
|
51
src/algorithms/signal_source/adapters/CMakeLists.txt
Normal file
51
src/algorithms/signal_source/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# 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)
|
21
src/algorithms/telemetry_decoder/CMakeLists.txt
Normal file
21
src/algorithms/telemetry_decoder/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
add_subdirectory(libs)
|
33
src/algorithms/telemetry_decoder/adapters/CMakeLists.txt
Normal file
33
src/algorithms/telemetry_decoder/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
33
src/algorithms/telemetry_decoder/libs/CMakeLists.txt
Normal file
33
src/algorithms/telemetry_decoder/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
21
src/algorithms/tracking/CMakeLists.txt
Normal file
21
src/algorithms/tracking/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(adapters)
|
||||
add_subdirectory(gnuradio_blocks)
|
||||
add_subdirectory(libs)
|
42
src/algorithms/tracking/adapters/CMakeLists.txt
Normal file
42
src/algorithms/tracking/adapters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
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)
|
40
src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
Normal file
40
src/algorithms/tracking/gnuradio_blocks/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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} )
|
42
src/algorithms/tracking/libs/CMakeLists.txt
Normal file
42
src/algorithms/tracking/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
22
src/core/CMakeLists.txt
Normal file
22
src/core/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
add_subdirectory(system_parameters)
|
||||
add_subdirectory(libs)
|
||||
add_subdirectory(receiver)
|
||||
|
20
src/core/libs/CMakeLists.txt
Normal file
20
src/core/libs/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
set(CORE_LIBS_SOURCES ini.cc INIReader.cc string_converter.cc)
|
||||
add_library(rx_core_lib ${CORE_LIBS_SOURCES})
|
61
src/core/receiver/CMakeLists.txt
Normal file
61
src/core/receiver/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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)
|
34
src/core/system_parameters/CMakeLists.txt
Normal file
34
src/core/system_parameters/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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})
|
40
src/main/CMakeLists.txt
Normal file
40
src/main/CMakeLists.txt
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
# 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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user