From 97727d05d4b0c9f4aa50f57b476a9da91ec80be0 Mon Sep 17 00:00:00 2001 From: Grayson Riffe Date: Thu, 4 Jun 2026 11:06:16 -0500 Subject: [PATCH] Add CMake project --- .gitignore | 2 ++ CMakeLists.txt | 6 +++++ CMakePresets.json | 49 ++++++++++++++++++++++++++++++++++++++ WatchfulEye/CMakeLists.txt | 10 ++++++++ WatchfulEye/src/main.cpp | 9 +++++++ 5 files changed, 76 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 CMakePresets.json create mode 100644 WatchfulEye/CMakeLists.txt create mode 100644 WatchfulEye/src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a44da1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.vs/ +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7c40dec --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +# Watchful Eye project CMakeLists.txt +cmake_minimum_required(VERSION 3.20) + +project(watchful-eye) + +add_subdirectory(WatchfulEye) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..b4ffd23 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,49 @@ +// Watchful Eye CMake presets +{ + "version": 3, + + "configurePresets": [ + { + "name": "base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe" + } + }, + + { + "name": "Debug", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + + { + "name": "Release", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + + "buildPresets": [ + { + "name": "Debug", + "configurePreset": "Debug" + }, + + { + "name": "Release", + "configurePreset": "Release" + } + ] +} diff --git a/WatchfulEye/CMakeLists.txt b/WatchfulEye/CMakeLists.txt new file mode 100644 index 0000000..66d0650 --- /dev/null +++ b/WatchfulEye/CMakeLists.txt @@ -0,0 +1,10 @@ +# Watchful Eye app CMakeLists.txt +add_executable(WatchfulEye WIN32 "src/main.cpp") + +set_property(TARGET WatchfulEye PROPERTY CXX_STANDARD 20) + +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /entry:mainCRTStartup") + +if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + set_property(TARGET WatchfulEye PROPERTY WIN32_EXECUTABLE FALSE) +endif() diff --git a/WatchfulEye/src/main.cpp b/WatchfulEye/src/main.cpp new file mode 100644 index 0000000..e30fdfb --- /dev/null +++ b/WatchfulEye/src/main.cpp @@ -0,0 +1,9 @@ +// Watchful Eye main file +#include + +int main(int argc, char* argv[]) { + std::cout << "Watchful Eye\n"; + + std::cin.get(); + return EXIT_SUCCESS; +}