diff options
| author | ilotterytea <iltsu@alright.party> | 2025-03-31 19:45:59 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-03-31 19:45:59 +0400 |
| commit | e1d3f72ac38b4dad55d1d02f945e50f086299644 (patch) | |
| tree | a0777efb4d2863e54ce1afd287c352eb3a89f868 /web | |
| parent | 0581549cc5f5f6b80d681c55bed4b17783f1fd48 (diff) | |
upd: separated cmake files
Diffstat (limited to 'web')
| -rw-r--r-- | web/CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt new file mode 100644 index 0000000..11a11bf --- /dev/null +++ b/web/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.10) +include(FetchContent) + +# Creating symbolic links +file(CREATE_LINK "${CMAKE_SOURCE_DIR}/static" "${CMAKE_CURRENT_BINARY_DIR}/static" SYMBOLIC) +file(CREATE_LINK "${CMAKE_SOURCE_DIR}/templates" "${CMAKE_CURRENT_BINARY_DIR}/templates" SYMBOLIC) +file(CREATE_LINK "${CMAKE_SOURCE_DIR}/docs" "${CMAKE_CURRENT_BINARY_DIR}/docs" SYMBOLIC) +if (EXISTS "${CMAKE_SOURCE_DIR}/.env") + file(CREATE_LINK "${CMAKE_SOURCE_DIR}/.env" "${CMAKE_CURRENT_BINARY_DIR}/.env" SYMBOLIC) +endif() + +add_executable(Web) + +set_target_properties( + Web PROPERTIES + DESCRIPTION ${PROJECT_DESCRIPTION} + OUTPUT_NAME "${PROJECT_NAME}-web" +) + +file(GLOB_RECURSE SOURCE_FILES "src/*.cpp" "src/*.h" "src/*.hpp") +target_sources(Web PRIVATE ${SOURCE_FILES}) + +# web framework +FetchContent_Declare( + crow + GIT_REPOSITORY https://github.com/CrowCpp/Crow + GIT_TAG v1.1.0 +) +FetchContent_MakeAvailable(crow) + +# markdown parser +FetchContent_Declare( + maddy + GIT_REPOSITORY https://github.com/progsource/maddy.git + GIT_TAG 1.3.0 +) +FetchContent_MakeAvailable(maddy) + +target_include_directories(Web PRIVATE ${crow_SOURCE_DIR}/include) +target_link_libraries(Web PRIVATE maddy)
\ No newline at end of file |
