Skip to content

Commit

Permalink
CMake: improved udpcapConfig-XXX.cmake with find_dependency (#6)
Browse files Browse the repository at this point in the history
- Replaced find_package with find_dependency call that is designed to be used in Package configuration files
- Replaced configured install-dir with a lookup in the CURRENT_LIST_DIR
  • Loading branch information
FlorianReimold authored Jan 24, 2023
1 parent 4175ecf commit a462630
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion udpcap/cmake/udpcapConfig-shared.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@PACKAGE_INIT@

INCLUDE("@PACKAGE_UDPCAP_INSTALL_CMAKE_DIR@/udpcapTargets.cmake")
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/udpcapTargets.cmake")
7 changes: 4 additions & 3 deletions udpcap/cmake/udpcapConfig-static.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@PACKAGE_INIT@

INCLUDE("@PACKAGE_UDPCAP_INSTALL_CMAKE_DIR@/udpcapTargets.cmake")
include(CMakeFindDependencyMacro)
find_dependency(npcap)
find_dependency(pcapplusplus)

find_package(npcap REQUIRED)
find_package(pcapplusplus REQUIRED)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/udpcapTargets.cmake")
2 changes: 1 addition & 1 deletion udpcap/version.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set(UDPCAP_VERSION_MAJOR 1)
set(UDPCAP_VERSION_MINOR 0)
set(UDPCAP_VERSION_PATCH 1)
set(UDPCAP_VERSION_PATCH 2)

0 comments on commit a462630

Please sign in to comment.