From 5d5b847551032c287f4d7f1fbb0a206cc0d46735 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 18 May 2017 12:57:52 +0200 Subject: [PATCH] fixing cmake scripts --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ srslte/CMakeLists.txt | 1 + srslte/lib/CMakeLists.txt | 5 +++-- srslte/lib/phy/CMakeLists.txt | 2 +- srslte/test/CMakeLists.txt | 21 +++++++++++++++++++++ 5 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 srslte/test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 8453f7b56..b5f708778 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,28 @@ configure_file( option(StaticMKL "StaticMKL" OFF) option(DisableBladeRF "DisableBladeRF" OFF) + +######################################################################## +# Find dependencies +######################################################################## +find_package(Polarssl) + +if (POLARSSL_FOUND) + set(POLAR_INCLUDE_DIRS "${POLARSSL_INCLUDE_DIRS}") + set(POLAR_LIBRARIES "${POLARSSL_LIBRARIES}") + add_definitions(-DHAVE_POLARSSL) +else(POLARSSL_FOUND) + find_package(MbedTLS) + if (MBEDTLS_FOUND) + set(POLAR_INCLUDE_DIRS "${MBEDTLS_INCLUDE_DIRS}") + set(POLAR_LIBRARIES "${MBEDTLS_LIBRARIES}") + add_definitions(-DHAVE_MBEDTLS) + else(MBEDTLS_FOUND) + message(FATAL_ERROR "Either polarssl or mbedtls is required to compile srsUE") + endif (MBEDTLS_FOUND) +endif(POLARSSL_FOUND) + + ######################################################################## # Install Dirs ######################################################################## @@ -182,7 +204,12 @@ message(STATUS "Building for version: ${VERSION}") include_directories(${PROJECT_BINARY_DIR}/srslte/include/) include_directories(${PROJECT_SOURCE_DIR}/srslte/include/) +# Includes needed by all code previously resided in srsUE +include_directories(${PROJECT_SOURCE_DIR}/srslte/include/srslte) +include_directories(${PROJECT_SOURCE_DIR}/liblte/hdr) + ######################################################################## # Add the subdirectories ######################################################################## +add_subdirectory(liblte) add_subdirectory(srslte) diff --git a/srslte/CMakeLists.txt b/srslte/CMakeLists.txt index cf47d6381..074409368 100644 --- a/srslte/CMakeLists.txt +++ b/srslte/CMakeLists.txt @@ -116,3 +116,4 @@ endif(VOLK_FOUND) add_subdirectory(lib) add_subdirectory(include) add_subdirectory(examples) +add_subdirectory(test) diff --git a/srslte/lib/CMakeLists.txt b/srslte/lib/CMakeLists.txt index cb0d1d8eb..0ae97c14b 100644 --- a/srslte/lib/CMakeLists.txt +++ b/srslte/lib/CMakeLists.txt @@ -18,6 +18,7 @@ # and at http://www.gnu.org/licenses/. # -add_library(srslte_version OBJECT version.c) - +add_subdirectory(common) add_subdirectory(phy) +add_subdirectory(radio) +add_subdirectory(upper) diff --git a/srslte/lib/phy/CMakeLists.txt b/srslte/lib/phy/CMakeLists.txt index 01b369c13..0c18557c4 100644 --- a/srslte/lib/phy/CMakeLists.txt +++ b/srslte/lib/phy/CMakeLists.txt @@ -38,7 +38,7 @@ add_subdirectory(enb) set(srslte_srcs $ $ - $ + $ $ $ $ diff --git a/srslte/test/CMakeLists.txt b/srslte/test/CMakeLists.txt new file mode 100644 index 000000000..a41a6fb0f --- /dev/null +++ b/srslte/test/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright 2015 Software Radio Systems Limited +# +# This file is part of srsUE +# +# srsUE is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# srsUE 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 Affero General Public License for more details. +# +# A copy of the GNU Affero General Public License can be found in +# the LICENSE file in the top-level directory of this distribution +# and at http://www.gnu.org/licenses/. +# + +add_subdirectory(common) +add_subdirectory(upper)