Skip to content

Commit

Permalink
tests/cmake: Fix how we link check lib to tests in cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins committed Dec 24, 2024
1 parent af5bcdb commit eb4f9f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (WITH_OPENSSL)
endif()

# Tests and coverage depend on this, but optional
pkg_check_modules(CHECK check>=0.9.10)
pkg_check_modules(CHECK check>=0.9.10 IMPORTED_TARGET)

add_library(jwt SHARED)
add_library(jwt_static STATIC)
Expand Down Expand Up @@ -204,8 +204,7 @@ if (CHECK_FOUND)
target_link_libraries(${TEST} PRIVATE jwt)

# Add CHECK deps
target_link_libraries(${TEST} PRIVATE ${CHECK_LINK_LIBRARIES})
target_include_directories(${TEST} PRIVATE ${CHECK_INCLUDE_DIRS})
target_link_libraries(${TEST} PRIVATE PkgConfig::CHECK)

# Add to test framework, making sure to set the environment
# for certain load-time tests.
Expand Down

0 comments on commit eb4f9f4

Please sign in to comment.