From fdbe1a07bb7b5e782e721aca5048291d6e9b4643 Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Thu, 4 Jun 2026 11:22:42 -0500 Subject: [PATCH] Add precompiled header --- WatchfulEye/CMakeLists.txt | 4 +++- WatchfulEye/src/main.cpp | 2 +- WatchfulEye/src/pch.h | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 WatchfulEye/src/pch.h diff --git a/WatchfulEye/CMakeLists.txt b/WatchfulEye/CMakeLists.txt index eec64a6..d96225c 100644 --- a/WatchfulEye/CMakeLists.txt +++ b/WatchfulEye/CMakeLists.txt @@ -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) diff --git a/WatchfulEye/src/main.cpp b/WatchfulEye/src/main.cpp index acfcdfd..7a88e9c 100644 --- a/WatchfulEye/src/main.cpp +++ b/WatchfulEye/src/main.cpp @@ -1,5 +1,5 @@ // Watchful Eye main file -#include +#include "pch.h" #include "version.h" diff --git a/WatchfulEye/src/pch.h b/WatchfulEye/src/pch.h new file mode 100644 index 0000000..f9ba044 --- /dev/null +++ b/WatchfulEye/src/pch.h @@ -0,0 +1,11 @@ +// Watchful Eye precompiled header + +// STD +#include +#include +#include +#include + +// Windows +#define WIN32_LEAN_AND_MEAN +#include