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