From 7f4918f1f17b0ddde6d1a8435e63f5f94c6dd065 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 20 Apr 2026 12:50:39 -0400 Subject: Generate version string based on repository information --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fc403ca..73f5555 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,14 @@ cmake_minimum_required(VERSION 3.15) project(STASIS C) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + include(GNUInstallDirs) +include(GitVersion) +get_version_from_git() +configure_file( + ${CMAKE_SOURCE_DIR}/include/version.h.in + ${CMAKE_BINARY_DIR}/include/version.h +) set(nix_cflags -Wall -Wextra -fPIC -D_GNU_SOURCE) set(win_cflags /Wall) -- cgit