From b50980ad70684530d55b7adf20de6047ebf53ba2 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 3 Oct 2024 09:28:01 -0500 Subject: Use a configure file for versioning including git revision. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 45387ce..f372f97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ include(cmake/warnings.cmake) target_compile_options(fud PRIVATE "${FUD_WARNINGS}") target_include_directories(fud PUBLIC include ${SQLite3_INCLUDE_DIRS}) +target_include_directories(fud PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include) target_link_libraries(fud ${SQLite3_LIBRARIES}) @@ -110,3 +111,8 @@ install(TARGETS fud PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ ) +include(cmake/CheckGit.cmake) +CheckGitSetup(GIT_HASH) + +configure_file(cmake/git_version.hpp.in include/git_version.hpp @ONLY) +add_dependencies(fud AlwaysCheckGit) -- cgit v1.2.3