Added basic versioning

master
Paul Sutton 9 years ago
parent 7e897074d6
commit 6ceda2a4de

@ -34,8 +34,8 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
PROJECT (SRSLTE) PROJECT (SRSLTE)
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
INCLUDE(SRSLTEVersion) #sets version information
INCLUDE(srsLTEPackage) #setup cpack INCLUDE(SRSLTEPackage) #setup cpack
INCLUDE(BuildMex) INCLUDE(BuildMex)
include(CTest) include(CTest)
@ -153,6 +153,7 @@ MESSAGE(STATUS "Building for version: ${VERSION}")
######################################################################## ########################################################################
# Add general includes and dependencies # Add general includes and dependencies
######################################################################## ########################################################################
include_directories(${PROJECT_BINARY_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include)

@ -0,0 +1,24 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE 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.
#
# srsLTE 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/.
#
SET(SRSLTE_VERSION_MAJOR 001)
SET(SRSLTE_VERSION_MINOR 000)
SET(SRSLTE_VERSION_PATCH 000)
SET(SRSLTE_VERSION "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")

@ -24,7 +24,6 @@
INSTALL(DIRECTORY include/ INSTALL(DIRECTORY include/
DESTINATION "${INCLUDE_DIR}" DESTINATION "${INCLUDE_DIR}"
FILES_MATCHING PATTERN "*.h" FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
) )
######################################################################## ########################################################################
@ -49,4 +48,5 @@ FIND_PACKAGE(UHD)
# Add subdirectories # Add subdirectories
######################################################################## ########################################################################
ADD_SUBDIRECTORY(lib) ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(examples) ADD_SUBDIRECTORY(examples)

@ -0,0 +1,25 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE 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.
#
# srsLTE 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 subdirectories
########################################################################
ADD_SUBDIRECTORY(srslte)

@ -0,0 +1,28 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE 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.
#
# srsLTE 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/.
#
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/version.h
)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.h
DESTINATION "${INCLUDE_DIR}/srslte"
)

@ -32,13 +32,11 @@
extern "C" { extern "C" {
#endif #endif
#define SRSLTE_VERSION_MAJOR 1
#define SRSLTE_VERSION_MINOR 0
#include <complex.h> #include <complex.h>
#include <math.h> #include <math.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/version.h"
#include "srslte/utils/bit.h" #include "srslte/utils/bit.h"
#include "srslte/utils/convolution.h" #include "srslte/utils/convolution.h"

@ -0,0 +1,41 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2015 Software Radio Systems Limited
*
* \section LICENSE
*
* This file is part of the srsLTE library.
*
* srsLTE 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.
*
* srsLTE 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/.
*
*/
#ifndef VERSION_
#define VERSION_
// the configured options and settings for SRSLTE
#define SRSLTE_VERSION_MAJOR @SRSLTE_VERSION_MAJOR@
#define SRSLTE_VERSION_MINOR @SRSLTE_VERSION_MINOR@
#define SRSLTE_VERSION_PATCH @SRSLTE_VERSION_PATCH@
#define SRSLTE_VERSION @SRSLTE_VERSION@
SRSLTE_API char* srslte_get_version();
SRSLTE_API int srslte_get_version_major();
SRSLTE_API int srslte_get_version_minor();
SRSLTE_API int srslte_get_version_patch();
#endif // VERSION_

@ -52,7 +52,6 @@ IF(SRSGUI_FOUND)
LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS}) LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS})
ENDIF(SRSGUI_FOUND) ENDIF(SRSGUI_FOUND)
######################################################################## ########################################################################
# Recurse subdirectories and compile all source files into the same lib # Recurse subdirectories and compile all source files into the same lib
######################################################################## ########################################################################

@ -0,0 +1,50 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2015 Software Radio Systems Limited
*
* \section LICENSE
*
* This file is part of the srsLTE library.
*
* srsLTE 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.
*
* srsLTE 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/.
*
*/
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#include "srslte/version.h"
#include <stdio.h>
char* srslte_get_version_string() {
char buf[32];
sprintf(buf, "%s.%s.%s",
TOSTRING(SRSLTE_VERSION_MAJOR),
TOSTRING(SRSLTE_VERSION_MINOR),
TOSTRING(SRSLTE_VERSION_PATCH));
return buf;
}
int srslte_get_version_major() {
return SRSLTE_VERSION_MAJOR;
}
int srslte_get_version_minor() {
return SRSLTE_VERSION_MINOR;
}
int srslte_get_version_patch() {
return SRSLTE_VERSION_PATCH;
}
Loading…
Cancel
Save