diff --git a/.gitignore b/.gitignore index e050ba0..c8cde91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /build -/.cache \ No newline at end of file +/.cache +/src/html_string.hpp \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 75c7c8a..08ecd0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,19 @@ cmake_minimum_required(VERSION 3.10) project(eew CXX) find_package(webview REQUIRED) +find_package(Threads REQUIRED) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) file(GLOB_RECURSE SRC_CPP CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) +file(READ "${CMAKE_CURRENT_LIST_DIR}/src/index.html" HTML_CONTENT CONFIGURE_DEPENDS) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/src/html_string.hpp.in + ${CMAKE_CURRENT_LIST_DIR}/src/html_string.hpp +) add_executable(${PROJECT_NAME} ${SRC_CPP}) -target_link_libraries(${PROJECT_NAME} PRIVATE webview::core) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} PRIVATE webview::core Threads::Threads) \ No newline at end of file diff --git a/src/html_string.hpp.in b/src/html_string.hpp.in new file mode 100644 index 0000000..d5408b5 --- /dev/null +++ b/src/html_string.hpp.in @@ -0,0 +1,5 @@ +#pragma once + +constexpr const char* html = R"( +@HTML_CONTENT@ +)"; \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..03c003d --- /dev/null +++ b/src/index.html @@ -0,0 +1,125 @@ + + +
+ + +Key | +Value | +
---|