mirror of https://github.com/pvnis/srsRAN_4G.git
Added basic versioning
parent
7e897074d6
commit
6ceda2a4de
@ -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}")
|
@ -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"
|
||||||
|
)
|
@ -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_
|
@ -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…
Reference in New Issue