diff options
author | ConfuSomu | 2024-01-07 16:15:57 +0100 |
---|---|---|
committer | ConfuSomu | 2024-01-07 16:18:27 +0100 |
commit | 58240fa2e1ac4234cf67374349ce606f1b6df643 (patch) | |
tree | 9e36f4e1b772d770071b4d963a91d2d61baced42 /CMakeLists.txt | |
parent | aab83a2066b5e8c2172a43b0b1674b21e903d991 (diff) | |
download | ActorViewer-58240fa2e1ac4234cf67374349ce606f1b6df643.tar ActorViewer-58240fa2e1ac4234cf67374349ce606f1b6df643.tar.gz ActorViewer-58240fa2e1ac4234cf67374349ce606f1b6df643.zip |
Use configure_file instead of setting compile defs
This should avoid unnecessary recompiles of the whole project when the
git hash changes and the project is reconfigured.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ac0bc1d..68c3d28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,11 +119,8 @@ else() endif() endif() -if (GIT_DESCRIBE_TEXT) - target_compile_definitions(ActorViewer PRIVATE GIT_DESCRIBE_TEXT=${GIT_DESCRIBE_TEXT}) -else() - target_compile_definitions(ActorViewer PRIVATE GIT_COMMIT_HASH=${GIT_COMMIT_HASH}) -endif() +configure_file(gen/git_version.h.in gen/git_version.h) +target_include_directories(ActorViewer PRIVATE gen) target_link_libraries(ActorViewer PRIVATE Qt${QT_VERSION_MAJOR}::Widgets mastodonpp) |