File tree Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Expand file tree Collapse file tree 5 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 13
13
- name : Build the Docker image
14
14
run : docker build --build-arg cxx=$CXX -t blobdrop .
15
15
- name : Format code
16
- run : docker run fftune sh -c 'scripts/format-code.sh'
16
+ run : docker run blobdrop sh -c 'scripts/format-code.sh'
17
17
- name : Build documentation
18
- run : docker run fftune sh -c 'cd doc && doxygen'
18
+ run : docker run blobdrop sh -c 'cd doc && doxygen'
Original file line number Diff line number Diff line change 1
- project (blobdrop )
1
+ cmake_policy (SET CMP0048 NEW )
2
+ project (blobdrop VERSION 0.1 DESCRIPTION "Drag and drop files directly out of the terminal" )
2
3
cmake_minimum_required (VERSION 3.21 )
3
4
4
5
set (CMAKE_CXX_STANDARD 20 )
@@ -13,6 +14,7 @@ set(CMAKE_AUTOMOC ON)
13
14
set (CMAKE_AUTORCC ON )
14
15
15
16
include_directories ("src" "src/Models" )
17
+ add_compile_definitions (BLOBDROP_VERSION= "${PROJECT_VERSION} " )
16
18
17
19
file (GLOB_RECURSE SRCS "src/*.cpp" )
18
20
file (GLOB_RECURSE HDRS "src/*.hpp" )
Original file line number Diff line number Diff line change 5
5
#include < QQuickStyle>
6
6
7
7
#include " getopts.hpp"
8
+ #include " version.hpp"
8
9
9
10
int main (int argc, char *argv[]) {
10
11
QCoreApplication::setOrganizationName (" blobdrop" );
11
12
QCoreApplication::setApplicationName (" blobdrop" );
13
+ QCoreApplication::setApplicationVersion (Version::version_string ());
12
14
QQuickStyle::setStyle (QLatin1String (" Material" ));
13
15
constexpr const char *materialVariantName = " QT_QUICK_CONTROLS_MATERIAL_VARIANT" ;
14
16
if (!qEnvironmentVariableIsSet (materialVariantName)) {
Original file line number Diff line number Diff line change
1
+ #include " version.hpp"
2
+
3
+ namespace Version {
4
+
5
+ const char *version_string () {
6
+ return BLOBDROP_VERSION;
7
+ }
8
+
9
+ }
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ namespace Version {
4
+
5
+ #ifndef BLOBDROP_VERSION
6
+ // fallback version, if cmake failed to set the version
7
+ #define BLOBDROP_VERSION " 1.0"
8
+ #endif
9
+
10
+ const char *version_string ();
11
+
12
+ }
You can’t perform that action at this time.
0 commit comments