Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: install dependencies
run: sudo apt-get update && sudo apt-get -y install cmake libopencv-dev libspdlog-dev libargparse-dev libcpp-httplib-dev
run: sudo apt-get -y install cmake libopencv-dev libspdlog-dev libargparse-dev
- uses: actions/cache@v4
with:
path: build
Expand Down
46 changes: 28 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,39 @@ find_package(spdlog REQUIRED)
find_package(Catch2 REQUIRED)

# httplib
find_package(httplib REQUIRED)
find_package(httplib QUIET)

# init all executables
foreach(exe Sender Receiver SenderWeb)
add_executable(${exe} src/${exe}.cpp ${PROJECT_IMPLEMENTATIONS})

# Linking
target_link_libraries(${exe}
${OpenCV_LIBS}
argparse::argparse
spdlog::spdlog
httplib::httplib
)
foreach(exe Sender Receiver)
add_executable(${exe} src/${exe}.cpp ${PROJECT_IMPLEMENTATIONS})

# Linking
target_link_libraries(${exe}
${OpenCV_LIBS}
argparse::argparse
spdlog::spdlog
)
endforeach()

# optionally compile the UI
if (httplib_FOUND)
add_executable(SenderWeb src/SenderWeb.cpp ${PROJECT_IMPLEMENTATIONS})
target_link_libraries(SenderWeb
${OpenCV_LIBS}
argparse::argparse
spdlog::spdlog
httplib::httplib
)
endif()

# Tests
enable_testing()
foreach(test ffmpeg utils hyperwall settings)
add_executable(test_${test} src/test/${test}.cpp ${PROJECT_IMPLEMENTATIONS})
target_link_libraries(test_${test}
${OpenCV_LIBS}
spdlog::spdlog
Catch2::Catch2WithMain
)
add_test(NAME ${test} COMMAND test_${test})
add_executable(test_${test} src/test/${test}.cpp ${PROJECT_IMPLEMENTATIONS})
target_link_libraries(test_${test}
${OpenCV_LIBS}
spdlog::spdlog
Catch2::Catch2WithMain
)
add_test(NAME ${test} COMMAND test_${test})
endforeach()
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
argparse
catch2_3
httplib
gcc
openssl
];
};
}) {
Expand Down