Skip to content

Commit

Permalink
version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstink committed Oct 18, 2024
1 parent 40bb71b commit 80b5866
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions symmetri/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ endif()
# just because metal it seems
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")

execute_process(COMMAND git describe --dirty --always --tags OUTPUT_VARIABLE FOO)
message(${FOO})

include_directories(
rpp
imgui
Expand Down Expand Up @@ -70,6 +73,7 @@ endif()

add_executable(Farbart ${ALL_SOURCES})
target_link_libraries(Farbart static_symmetri ${EXTRA_LIBS})
target_compile_definitions(Farbart PRIVATE VERSION=${FOO})

if (APPLE)
add_executable(generate_icon generate_icon.cpp ../submodules/tinyxml2/tinyxml2.cpp)
Expand Down
7 changes: 5 additions & 2 deletions symmetri/gui/draw_about.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "draw_about.h"

#include "reducers.h"
#define QUOTE(x) #x
#define STR(x) QUOTE(x)

const auto no_move_draw_resize =
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoTitleBar |
Expand All @@ -19,8 +21,9 @@ void draw_about(const model::ViewModel&) {

ImGui::Begin("About", NULL, no_move_draw_resize);
ImGui::Text(
"Farbart version 0.0.1\nA GUI for creating and simulating "
"Symmetri-nets.");
"Farbart version %s\nA GUI for creating and simulating "
"Symmetri-nets.",
STR(VERSION));

ImGuiStyle& style = ImGui::GetStyle();
float width = 0.0f;
Expand Down

0 comments on commit 80b5866

Please sign in to comment.