Compare commits
2
Commits
v0.0.1
..
3977d85fee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3977d85fee
|
||
|
|
97727d05d4
|
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
.vs/
|
||||||
|
build/
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Watchful Eye project CMakeLists.txt
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
|
project(watchful-eye)
|
||||||
|
|
||||||
|
add_subdirectory(WatchfulEye)
|
||||||
@@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# 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()
|
||||||
|
|
||||||
|
find_package(Git)
|
||||||
|
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE APPVERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
configure_file(src/version.h.in version.h)
|
||||||
|
target_include_directories(WatchfulEye PUBLIC "${PROJECT_BINARY_DIR}/WatchfulEye")
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// Watchful Eye main file
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
std::cout << "Watchful Eye " APPVERSION "\n";
|
||||||
|
|
||||||
|
std::cin.get();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// Version configured header file
|
||||||
|
#define APPVERSION "@APPVERSION@"
|
||||||
Reference in new issue
Block a user