Skip to content

Commit

Permalink
chore: update include packages in cmd and libs folders
Browse files Browse the repository at this point in the history
  • Loading branch information
leoparente committed Aug 19, 2024
1 parent 3e1745d commit c504aaa
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 38 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
schedule:
#run 5 minutes after midnight daily
- cron: '5 0 * * *'
pull_request:
branches:
- develop

jobs:
analyze:
Expand Down Expand Up @@ -47,14 +50,12 @@ jobs:
uses: github/codeql-action/init@v3
with:
languages: 'cpp'
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
queries: security-extended
config: |
disable-default-queries: true
paths-ignore: |
conan_home/**
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
queries: ns1/NS1QLPacks/codeql/cpp/NS1-security.qls@main
config-file: ns1/NS1QLPacks/codeql/NS1-codeql-config.yml@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
Expand Down
2 changes: 1 addition & 1 deletion cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ if(OPENTELEMETRY_INSTALL)
endif()

if(TARGET protobuf::libprotobuf)
target_link_libraries(opentelemetry_proto PUBLIC ${CONAN_LIBS_PROTOBUF})
target_link_libraries(opentelemetry_proto PUBLIC protobuf::libprotobuf)
else() # cmake 3.8 or lower
target_include_directories(opentelemetry_proto
PUBLIC ${Protobuf_INCLUDE_DIRS})
Expand Down
4 changes: 3 additions & 1 deletion cmd/pktvisor-pcap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_executable(pktvisor-pcap main.cpp)

find_package(docopt REQUIRED)

target_link_libraries(pktvisor-pcap
PRIVATE
${CONAN_LIBS_DOCOPT.CPP}
docopt::docopt
${VISOR_STATIC_PLUGINS}
)
4 changes: 3 additions & 1 deletion cmd/pktvisor-reader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
add_executable(pktvisor-reader main.cpp)

find_package(docopt REQUIRED)

target_link_libraries(pktvisor-reader
PRIVATE
${CONAN_LIBS_DOCOPT.CPP}
docopt::docopt
${VISOR_STATIC_PLUGINS}
)
7 changes: 5 additions & 2 deletions cmd/pktvisord/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
add_executable(pktvisord main.cpp)

find_package(crashpad REQUIRED)
find_package(docopt REQUIRED)

if(NOT WIN32)
set(ADDITIONAL_LIBS resolv)
endif()


target_link_libraries(pktvisord
PRIVATE
${CONAN_LIBS_CRASHPAD}
timer
${ADDITIONAL_LIBS}
${CONAN_LIBS_DOCOPT.CPP}
crashpad::handler
docopt::docopt
Visor::Core
${VISOR_STATIC_PLUGINS}
)
Expand Down
12 changes: 5 additions & 7 deletions libs/visor_dns/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
message(STATUS "Visor Lib DNS Helper")

find_package(pcapplusplus REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibDns
dns.cpp
DnsLayer.cpp
Expand All @@ -16,12 +19,7 @@ target_include_directories(VisorLibDns
target_link_libraries(VisorLibDns
PUBLIC
Visor::Lib::Tcp
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_FMT}
pcapplusplus::pcapplusplus
)

## TEST SUITE
Expand All @@ -32,7 +30,7 @@ add_executable(unit-tests-visor-dns
target_link_libraries(unit-tests-visor-dns
PRIVATE
Visor::Lib::Dns
${CONAN_LIBS_CATCH2})
catch2::catch2_with_main)

add_test(NAME unit-tests-visor-dns
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/visor_dns
Expand Down
12 changes: 5 additions & 7 deletions libs/visor_tcp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
message(STATUS "Visor Lib TCP Helper")

add_library(VisorLibTcp
VisorTcpLayer.cpp
)
find_package(pcapplusplus REQUIRED)

add_library(VisorLibTcp VisorTcpLayer.cpp)

add_library(Visor::Lib::Tcp ALIAS VisorLibTcp)

target_include_directories(VisorLibTcp
Expand All @@ -12,8 +13,5 @@ target_include_directories(VisorLibTcp

target_link_libraries(VisorLibTcp
PUBLIC
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
pcapplusplus::pcapplusplus
)
7 changes: 5 additions & 2 deletions libs/visor_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
message(STATUS "Visor Lib Test Helper")

find_package(spdlog REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibTest INTERFACE)
add_library(Visor::Lib::Test ALIAS VisorLibTest)

Expand All @@ -9,8 +12,8 @@ target_include_directories(VisorLibTest

target_link_libraries(VisorLibTest
INTERFACE
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_CATCH2})
spdlog::spdlog
catch2::catch2_with_main)

target_compile_features(VisorLibTest INTERFACE cxx_std_17)

Expand Down
19 changes: 9 additions & 10 deletions libs/visor_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
message(STATUS "Visor Lib Utils")

add_library(VisorLibUtils
utils.cpp
)
find_package(pcapplusplus REQUIRED)
find_package(fmt REQUIRED)
find_package(Catch2 REQUIRED)

add_library(VisorLibUtils utils.cpp)

add_library(Visor::Lib::Utils ALIAS VisorLibUtils)

target_include_directories(VisorLibUtils
Expand All @@ -12,12 +15,8 @@ target_include_directories(VisorLibUtils

target_link_libraries(VisorLibUtils
PUBLIC
${CONAN_LIBS_PCAPPLUSPLUS}
${CONAN_LIBS_PTHREADS4W}
${CONAN_LIBS_LIBPCAP}
${CONAN_LIBS_NPCAP}
${CONAN_LIBS_SPDLOG}
${CONAN_LIBS_FMT}
pcapplusplus::pcapplusplus
fmt::fmt
)

## TEST SUITE
Expand All @@ -26,7 +25,7 @@ add_executable(unit-tests-visor-utils test_utils.cpp)
target_link_libraries(unit-tests-visor-utils
PRIVATE
Visor::Lib::Utils
${CONAN_LIBS_CATCH2})
catch2::catch2_with_main)

add_test(NAME unit-tests-visor-utils
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs
Expand Down

0 comments on commit c504aaa

Please sign in to comment.