Skip to content

Commit 9400110

Browse files
committed
update the package_config_tests
1 parent f9a2158 commit 9400110

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/package_config_tests/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ project(CLI11-package-config-test)
44

55
include(CTest)
66

7-
# Test the CLI11 CMake package config
8-
find_package(CLI11 2.0 REQUIRED)
9-
107
find_package(PkgConfig)
118

12-
pkg_check_modules(CLI11 REQUIRED IMPORTED_TARGET cli11)
9+
if(CLI11_DIR)
10+
set(CMAKE_PREFIX_PATH ${CLI11_DIR})
11+
endif()
12+
13+
pkg_check_modules(CLI11 REQUIRED IMPORTED_TARGET CLI11)
1314

1415
# Test the target
1516
add_executable(package-config-test ../../examples/positional_validation.cpp)

0 commit comments

Comments
 (0)