1 parent
7a0446b573
commit
3632f2cd43
27 files changed
+3332
-97
No files matched your search
+22
-12
@@ -16,18 +16,17 @@ target_include_directories(EchoionWeb PUBLIC
|
||||
|
||||
# EchoionCore is configured before this module and creates the header-only
|
||||
# Boost:: targets from the single system Boost. Fall back to discovering them
|
||||
# only if this module is ever built without Core.
|
||||
if(NOT TARGET Boost::beast)
|
||||
find_package(Boost 1.87 CONFIG QUIET)
|
||||
foreach(_hdr asio beast system)
|
||||
if(NOT TARGET Boost::${_hdr})
|
||||
add_library(_web_boost_${_hdr}_hdr INTERFACE)
|
||||
add_library(Boost::${_hdr} ALIAS _web_boost_${_hdr}_hdr)
|
||||
target_include_directories(_web_boost_${_hdr}_hdr INTERFACE
|
||||
"${Boost_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
# only if this module is ever built without Core. Check each target because
|
||||
# aliases created by a sibling directory are not necessarily visible here.
|
||||
find_package(Boost 1.87 CONFIG QUIET COMPONENTS system url)
|
||||
foreach(_hdr asio beast system)
|
||||
if(NOT TARGET Boost::${_hdr})
|
||||
add_library(_web_boost_${_hdr}_hdr INTERFACE)
|
||||
add_library(Boost::${_hdr} ALIAS _web_boost_${_hdr}_hdr)
|
||||
target_include_directories(_web_boost_${_hdr}_hdr INTERFACE
|
||||
"${Boost_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
@@ -42,6 +41,7 @@ target_link_libraries(EchoionWeb
|
||||
Boost::beast
|
||||
Boost::asio
|
||||
Boost::system
|
||||
Boost::url
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
@@ -55,6 +55,16 @@ endif()
|
||||
# That build output is what ships next to the runtime binary (default webRoot
|
||||
# "./web", relative to the working directory) and is installed. Opt out with
|
||||
# -DECHOION_BUILD_WEB=OFF to skip the npm build (e.g. for a C++-only CI job).
|
||||
if(BUILD_TESTS)
|
||||
add_executable(echoion_web_security_tests
|
||||
tests/HttpSecurityTests.cpp)
|
||||
target_link_libraries(echoion_web_security_tests PRIVATE
|
||||
EchoionWeb
|
||||
Threads::Threads)
|
||||
add_test(NAME echoion_web_security_tests
|
||||
COMMAND echoion_web_security_tests)
|
||||
endif()
|
||||
|
||||
option(ECHOION_BUILD_WEB "Build the React dashboard frontend with npm/vite" ON)
|
||||
|
||||
set(_web_frontend "${CMAKE_CURRENT_SOURCE_DIR}/frontend")
|
||||
|
||||
Reference in new issue
Block a user