First iteration on adding version in the UI, ref #428

This commit is contained in:
emeric
2025-08-06 22:37:27 +02:00
parent 92a8194844
commit 934cb96164
6 changed files with 68 additions and 2 deletions
+9
View File
@@ -2,6 +2,14 @@ pkg_check_modules(Config++ REQUIRED IMPORTED_TARGET libconfig++)
pkg_check_modules(Archive REQUIRED IMPORTED_TARGET libarchive)
pkg_check_modules(XXHASH REQUIRED IMPORTED_TARGET libxxhash)
set(LMS_VERSION ${PROJECT_VERSION})
configure_file(
impl/Version.cpp.in
impl/Version.cpp
@ONLY
)
add_library(lmscore STATIC
impl/http/Client.cpp
impl/http/SendQueue.cpp
@@ -25,6 +33,7 @@ add_library(lmscore STATIC
impl/UUID.cpp
impl/WtLogger.cpp
impl/XxHash3.cpp
${CMAKE_CURRENT_BINARY_DIR}/impl/Version.cpp
)
target_include_directories(lmscore INTERFACE
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2025 Emeric Poupon
*
* This file is part of LMS.
*
* LMS 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.
*
* LMS 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 LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include "core/Version.hpp"
namespace lms::core
{
std::string_view getVersion()
{
return "v" "@LMS_VERSION@";
}
} // namespace lms::core
+27
View File
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2025 Emeric Poupon
*
* This file is part of LMS.
*
* LMS 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.
*
* LMS 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 LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <string_view>
namespace lms::core
{
std::string_view getVersion();
} // namespace lms::core