Skip to content

Commit

Permalink
trying to fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed Mar 15, 2024
1 parent 34f5452 commit 54155e6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: |
cmake --build ${{github.workspace}}/_build --config Debug --parallel
- name: Install (Release)
- name: Install (Debug)
shell: cmd
run: |
cmake --build ${{github.workspace}}/_build --config Debug --target INSTALL
Expand Down Expand Up @@ -134,9 +134,19 @@ jobs:
$module_path="${{github.workspace}}/thirdparty/asio-module"
$module_path_posix=$module_path.Replace('\', '/')
if ( '${{ matrix.library_type }}' -eq 'static' )
{
$use_udpcap = 'ON'
}
else
{
$use_udpcap = 'OFF'
}
cmake -B "${{github.workspace}}/samples/integration_test/_build" `
-A ${{ matrix.build_arch }} `
-DCMAKE_PREFIX_PATH="${{github.workspace}}/${{env.INSTALL_PREFIX}}" `
-DINTEGRATION_TEST_INCLUDE_UDPCAP=$use_udpcap `
-DCMAKE_MODULE_PATH="$module_path_posix"
working-directory: ${{ github.workspace }}/samples/integration_test
Expand Down
4 changes: 4 additions & 0 deletions cmake/ecaludpConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
include(CMakeFindDependencyMacro)
find_dependency(asio)

if(@ECALUDP_ENABLE_NPCAP@)
find_dependency(udpcap)
endif()

INCLUDE("${CMAKE_CURRENT_LIST_DIR}/ecaludpTargets.cmake")
9 changes: 9 additions & 0 deletions samples/integration_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ cmake_minimum_required(VERSION 3.13)

project(integration_test)

include("${CMAKE_CURRENT_LIST_DIR}/../../thirdparty/build-asio.cmake")

################################################################################
# Add udpcap for static compiling, again
if (INTEGRATION_TEST_INCLUDE_UDPCAP)
include("${CMAKE_CURRENT_LIST_DIR}/../../thirdparty/build-udpcap.cmake")
endif()
################################################################################

find_package(Threads REQUIRED)
find_package(ecaludp REQUIRED)

Expand Down
6 changes: 6 additions & 0 deletions samples/integration_test/CMakeWindows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mkdir _build
cd _build

cmake .. -A x64 -DCMAKE_PREFIX_PATH="../../_build_static/_install" -DINTEGRATION_TEST_INCLUDE_UDPCAP=ON
cd ..
pause
2 changes: 1 addition & 1 deletion thirdparty/build-udpcap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(UDPCAP_THIRDPARTY_ENABLED ON)
set(UDPCAP_THIRDPARTY_USE_BUILTIN_ASIO OFF)

# Add udpcap library from subdirectory
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/udpcap" EXCLUDE_FROM_ALL)
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/udpcap" thirdparty/udpcap EXCLUDE_FROM_ALL)
add_library(udpcap::udpcap ALIAS udpcap)

# Reset static / shared libs to old value
Expand Down

0 comments on commit 54155e6

Please sign in to comment.