diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-03 09:28:01 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-03 09:28:01 -0500 |
commit | b50980ad70684530d55b7adf20de6047ebf53ba2 (patch) | |
tree | 576d284c732e2b5bfc7638a23d9bca4c86f5437c /CMakeLists.txt | |
parent | e420eca2b244c303af51534ab09632045a186b21 (diff) |
Use a configure file for versioning including git revision.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
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) |