Add precompiled header

This commit is contained in:
Grayson Riffe 2026-06-04 11:22:42 -05:00
parent 3977d85fee
commit fdbe1a07bb
Signed by: grayson
SSH Key Fingerprint: SHA256:23HJg9tnL2m6u0uUb26QIrOTFymFZ+xgSH/2UPEBB/I
3 changed files with 15 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Watchful Eye app CMakeLists.txt
add_executable(WatchfulEye WIN32 "src/main.cpp")
add_executable(WatchfulEye WIN32 "src/main.cpp" "src/pch.h")
set_property(TARGET WatchfulEye PROPERTY CXX_STANDARD 20)
@ -9,6 +9,8 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set_property(TARGET WatchfulEye PROPERTY WIN32_EXECUTABLE FALSE)
endif()
target_precompile_headers(WatchfulEye PUBLIC "src/pch.h")
find_package(Git)
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE APPVERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
configure_file(src/version.h.in version.h)

View File

@ -1,5 +1,5 @@
// Watchful Eye main file
#include <iostream>
#include "pch.h"
#include "version.h"

11
WatchfulEye/src/pch.h Normal file
View File

@ -0,0 +1,11 @@
// Watchful Eye precompiled header
// STD
#include <iostream>
#include <string>
#include <format>
#include <chrono>
// Windows
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>