diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a8bbc52..c0f00abe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,28 +97,28 @@ if(FRAMELESSHELPER_ENABLE_VCLTL AND NOT MSVC) endif() set(FRAMELESSHELPER_LICENSE_HEADER "/* -* MIT License -* -* Copyright (C) 2021-2023 by wangwenx190 (Yuhang Zhao) -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the \"Software\"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -*/") + * MIT License + * + * Copyright (C) 2021-2023 by wangwenx190 (Yuhang Zhao) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the \"Software\"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */") set(__extra_flags "") if(NOT FRAMELESSHELPER_BUILD_STATIC) diff --git a/include/FramelessHelper/Core/framelesshelpercore_global.h b/include/FramelessHelper/Core/framelesshelpercore_global.h index 3bd009c8..0e627a21 100644 --- a/include/FramelessHelper/Core/framelesshelpercore_global.h +++ b/include/FramelessHelper/Core/framelesshelpercore_global.h @@ -265,6 +265,10 @@ FRAMELESSHELPER_BEGIN_NAMESPACE #include "framelesshelper.version" +#ifndef __FRAMELESSHELPER__ +# define __FRAMELESSHELPER__ __FRAMELESSHELPER_VERSION__ +#endif // __FRAMELESSHELPER__ + namespace Global { diff --git a/qmake/core.pri b/qmake/core.pri index dcefa4d0..835ac4da 100644 --- a/qmake/core.pri +++ b/qmake/core.pri @@ -7,9 +7,6 @@ CORE_PRIV_INC_DIR = $$CORE_PUB_INC_DIR/private CORE_EXTRA_INC_DIR = $$PWD/inc/core CORE_SRC_DIR = $$PWD/../src/core -DEFINES += \ - FRAMELESSHELPER_CORE_STATIC - INCLUDEPATH += \ $$BASE_INC_DIR \ $$COMMON_INC_DIR \ diff --git a/qmake/inc/core/framelesshelper.config b/qmake/inc/core/framelesshelper.config index f1dfdef5..8729265d 100644 --- a/qmake/inc/core/framelesshelper.config +++ b/qmake/inc/core/framelesshelper.config @@ -22,16 +22,14 @@ * SOFTWARE. */ -// Generated automatically by CMake. -// WARNING! DO NOT EDIT THIS FILE MANUALLY! -// ALL CHANGES WILL BE LOST AFTER RE-CONFIGURING! -// Also please do not include this file directly, -// it's designed to be included by FramelessHelper's own headers. +// Caution: This file is generated by CMake automatically during configure. +// WARNING!!! DO NOT EDIT THIS FILE MANUALLY!!! +// ALL YOUR MODIFICATIONS HERE WILL GET LOST AFTER RE-CONFIGURING!!! #pragma once -#ifndef _FRAMELESSHELPER_CONFIG_DEFINED_ -#define _FRAMELESSHELPER_CONFIG_DEFINED_ +#ifndef _FRAMELESSHELPER_CONFIG_INCLUDE_GUARD_ +#define _FRAMELESSHELPER_CONFIG_INCLUDE_GUARD_ #define FRAMELESSHELPER_FEATURE_static_build 1 #define FRAMELESSHELPER_FEATURE_widgets 1 @@ -46,4 +44,4 @@ #define FRAMELESSHELPER_FEATURE_border_painter 1 #define FRAMELESSHELPER_FEATURE_system_button 1 -#endif // _FRAMELESSHELPER_CONFIG_DEFINED_ +#endif // _FRAMELESSHELPER_CONFIG_INCLUDE_GUARD_ diff --git a/qmake/inc/core/framelesshelper.version b/qmake/inc/core/framelesshelper.version index bc58718a..afc38f4b 100644 --- a/qmake/inc/core/framelesshelper.version +++ b/qmake/inc/core/framelesshelper.version @@ -22,30 +22,38 @@ * SOFTWARE. */ -// Generated automatically by QMake. -// WARNING! DO NOT EDIT THIS FILE MANUALLY! -// ALL CHANGES WILL BE LOST AFTER RE-CONFIGURING! -// Also please do not include this file directly, -// it's designed to be included by FramelessHelper's own headers. +// Caution: This file is generated by CMake automatically during configure. +// WARNING!!! DO NOT EDIT THIS FILE MANUALLY!!! +// ALL YOUR MODIFICATIONS HERE WILL GET LOST AFTER RE-CONFIGURING!!! #pragma once -#ifndef _FRAMELESSHELPER_VERSION_DEFINED_ -#define _FRAMELESSHELPER_VERSION_DEFINED_ - -[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MAJOR = 2; -[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_MINOR = 5; -[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_PATCH = 0; -//[[maybe_unused]] inline constexpr const int FRAMELESSHELPER_VERSION_TWEAK = 0; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "2.5.0"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_STR[] = "UNKNOWN"; -[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILE_DATETIME_STR[] = "UNKNOWN"; +#ifndef _FRAMELESSHELPER_VERSION_INCLUDE_GUARD_ +#define _FRAMELESSHELPER_VERSION_INCLUDE_GUARD_ #define __FRAMELESSHELPER_VERSION_MAJOR__ 2 #define __FRAMELESSHELPER_VERSION_MINOR__ 5 #define __FRAMELESSHELPER_VERSION_PATCH__ 0 -//#define __FRAMELESSHELPER_VERSION_TWEAK__ 0 +#define __FRAMELESSHELPER_VERSION_TWEAK__ 0 #define __FRAMELESSHELPER_VERSION__ 0x02050000 -#define __FRAMELESSHELPER__ 0x02050000 -#endif // _FRAMELESSHELPER_VERSION_DEFINED_ +[[maybe_unused]] inline constexpr const unsigned long FRAMELESSHELPER_VERSION_MAJOR = 2; +[[maybe_unused]] inline constexpr const unsigned long FRAMELESSHELPER_VERSION_MINOR = 5; +[[maybe_unused]] inline constexpr const unsigned long FRAMELESSHELPER_VERSION_PATCH = 0; +[[maybe_unused]] inline constexpr const unsigned long FRAMELESSHELPER_VERSION_TWEAK = 0; +[[maybe_unused]] inline constexpr const unsigned long FRAMELESSHELPER_VERSION = 0x02050000; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_VERSION_STR[] = "2.5.0"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_HASH_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_SUBJECT_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_AUTHOR_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_DATETIME_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMMIT_BRANCH_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILER_NAME_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILER_VERSION_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_COMPILER_VENDOR_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_BUILD_DATETIME_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_ARCHITECTURE_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_CMAKE_VERSION_STR[] = "UNKNOWN"; +[[maybe_unused]] inline constexpr const char FRAMELESSHELPER_CMAKE_GENERATOR_STR[] = "UNKNOWN"; + +#endif // _FRAMELESSHELPER_VERSION_INCLUDE_GUARD_ diff --git a/qmake/quick.pri b/qmake/quick.pri index fe9b3890..2092d166 100644 --- a/qmake/quick.pri +++ b/qmake/quick.pri @@ -9,9 +9,6 @@ QUICK_PUB_INC_DIR = $$COMMON_INC_DIR/Quick QUICK_PRIV_INC_DIR = $$QUICK_PUB_INC_DIR/private QUICK_SRC_DIR = $$PWD/../src/quick -DEFINES += \ - FRAMELESSHELPER_QUICK_STATIC - INCLUDEPATH += \ $$BASE_INC_DIR \ $$COMMON_INC_DIR \ diff --git a/qmake/widgets.pri b/qmake/widgets.pri index 4cbaf167..aef1d920 100644 --- a/qmake/widgets.pri +++ b/qmake/widgets.pri @@ -6,9 +6,6 @@ WIDGETS_PUB_INC_DIR = $$COMMON_INC_DIR/Widgets WIDGETS_PRIV_INC_DIR = $$WIDGETS_PUB_INC_DIR/private WIDGETS_SRC_DIR = $$PWD/../src/widgets -DEFINES += \ - FRAMELESSHELPER_WIDGETS_STATIC - INCLUDEPATH += \ $$BASE_INC_DIR \ $$COMMON_INC_DIR \