mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-02 00:29:48 +02:00
Fix setting version number
This commit is contained in:
parent
269b70093d
commit
85e8d8abc8
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define SCREENPLAY_VERSION "@SCREENPLAY_VERSION@"
|
||||
#define SCREENPLAY_SOURCE_DIR "@SCREENPLAY_SOURCE_DIR@"
|
||||
#define SCREENPLAY_GODOT_VERSION "@SCREENPLAY_GODOT_VERSION@"
|
||||
#define SCREENPLAY_GODOT_RELEASE_TYPE "@SCREENPLAY_GODOT_RELEASE_TYPE@"
|
||||
|
@ -1,9 +1,9 @@
|
||||
# ! generate_cmake_variable_header : Generates a header CmakeVariables.h that contains defines for the variables specified in CmakeVariables.h.in!
|
||||
# ! generate_cmake_variable_header : Generates a header CmakeVariables.h that contains defines for the variables specified in
|
||||
# CmakeVariables.h.in!
|
||||
#
|
||||
# The generated CmakeVariables.h header can then be used to access e.g. the PROJECT_NAME define in C++ code.
|
||||
#
|
||||
# Example
|
||||
# generate_cmake_variable_header(${PROJECT_NAME})
|
||||
# Example generate_cmake_variable_header(${PROJECT_NAME})
|
||||
#
|
||||
function(generate_cmake_variable_header TARGET)
|
||||
# NOTE: Also add to CMakeVariables.h.in !
|
||||
@ -12,6 +12,7 @@ function(generate_cmake_variable_header TARGET)
|
||||
set(SCREENPLAY_GODOT_RELEASE_TYPE ${GODOT_RELEASE_TYPE})
|
||||
set(SCREENPLAY_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
|
||||
set(SCREENPLAY_BUILD_DATE "${BUILD_DATE}")
|
||||
set(SCREENPLAY_VERSION "${SCREENPLAY_VERSION}")
|
||||
set(SCREENPLAY_GIT_BRANCH_NAME "${GIT_BRANCH_NAME}")
|
||||
set(SCREENPLAY_GIT_COMMIT_HASH "${GIT_COMMIT_HASH}")
|
||||
|
||||
@ -19,7 +20,7 @@ function(generate_cmake_variable_header TARGET)
|
||||
if(${SCREENPLAY_DEPLOY})
|
||||
set(SCREENPLAY_DEPLOY_VERSION 1)
|
||||
endif()
|
||||
|
||||
|
||||
set(SCREENPLAY_STEAM_VERSION 0)
|
||||
if(${SCREENPLAY_STEAM})
|
||||
set(SCREENPLAY_STEAM_VERSION 1)
|
||||
@ -27,7 +28,8 @@ function(generate_cmake_variable_header TARGET)
|
||||
|
||||
# Specify the configuration file from which the header file will be generated
|
||||
configure_file(${CMAKE_SOURCE_DIR}/CMake/CMakeVariables.h.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/CMakeVariables.h @ONLY)
|
||||
message(STATUS "GENERATE: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/CMakeVariables.h and add ${TARGET} to ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
message(
|
||||
STATUS "GENERATE: ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/CMakeVariables.h and add ${TARGET} to ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# Add the directory containing the generated header
|
||||
target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.0)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
|
||||
include(GetProjectVersion)
|
||||
get_project_version(PROJECT_VERSION)
|
||||
get_project_version(SCREENPLAY_VERSION)
|
||||
|
||||
# This must be set before project()
|
||||
if(APPLE)
|
||||
@ -13,7 +13,7 @@ endif()
|
||||
|
||||
project(
|
||||
ScreenPlay
|
||||
VERSION ${PROJECT_VERSION}
|
||||
VERSION ${SCREENPLAY_VERSION}
|
||||
DESCRIPTION "Modern, Cross Plattform, Live Wallpaper, Widgets and AppDrawer!"
|
||||
HOMEPAGE_URL "https://screen-play.app/"
|
||||
LANGUAGES CXX)
|
||||
@ -166,7 +166,6 @@ if(${SCREENPLAY_INSTALLER})
|
||||
endif()
|
||||
|
||||
message(STATUS "[PROJECT] CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
|
||||
message(STATUS "[PROJECT] PROJECT_VERSION = ${PROJECT_VERSION}")
|
||||
message(STATUS "[PROJECT] CMAKE_VERSION = ${CMAKE_VERSION}")
|
||||
message(STATUS "[PROJECT] SCREENPLAY_QML_MODULES_PATH = ${SCREENPLAY_QML_MODULES_PATH}")
|
||||
message(STATUS "[PROJECT] CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}")
|
||||
@ -176,6 +175,7 @@ message(STATUS "[PROJECT] VCPKG_TARGET_TRIPLET = ${VCPKG_TARGET_TRIPLET}
|
||||
message(STATUS "[PROJECT] CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
|
||||
message(STATUS "[PROJECT] GODOT_VERSION = ${GODOT_VERSION}")
|
||||
message(STATUS "[PROJECT] GODOT_EDITOR_NAME = ${GODOT_EDITOR_NAME}")
|
||||
message(STATUS "[PROJECT] SCREENPLAY_VERSION = ${SCREENPLAY_VERSION}")
|
||||
message(STATUS "[OPTION] SCREENPLAY_DEPLOY = ${SCREENPLAY_DEPLOY}")
|
||||
message(STATUS "[OPTION] SCREENPLAY_INSTALLER = ${SCREENPLAY_INSTALLER}")
|
||||
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "ScreenPlayUtil/macutils.h"
|
||||
#endif
|
||||
|
||||
#include "ScreenPlay/CMakeVariables.h"
|
||||
#include "app.h"
|
||||
#include "steam/steam_qt_enums_generated.h"
|
||||
#include <QGuiApplication>
|
||||
@ -71,7 +72,7 @@ App::App()
|
||||
QGuiApplication::setOrganizationName("ScreenPlay");
|
||||
QGuiApplication::setOrganizationDomain("screen-play.app");
|
||||
QGuiApplication::setApplicationName("ScreenPlay");
|
||||
QGuiApplication::setApplicationVersion(QVersionNumber(0, 15, 0).toString());
|
||||
QGuiApplication::setApplicationVersion(QString(SCREENPLAY_VERSION));
|
||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
||||
|
||||
QString fontsPath = QGuiApplication::instance()->applicationDirPath() + "/assets/fonts/";
|
||||
|
Loading…
Reference in New Issue
Block a user