mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
correctly cofiguring config.in to be usable with deps
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(OpenSSL REQUIRED)
|
||||
|
||||
include(${CMAKE_INSTALL_PREFIX}/jwt-cpp/jwt-cpp.cmake)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(jwt-cpp-test)
|
||||
include(${CMAKE_TOOLCHAIN_FILE})
|
||||
|
||||
find_package(jwt-cpp REQUIRED)
|
||||
project(jwt-cpp-test)
|
||||
find_package(jwt-cpp CONFIG REQUIRED)
|
||||
|
||||
add_executable(jwt-cpp-test print-claims.cpp)
|
||||
target_link_libraries(jwt-cpp-test PRIVATE jwt-cpp:jwt-cpp)
|
||||
target_link_libraries(jwt-cpp-test jwt-cpp::jwt-cpp)
|
||||
|
||||
8
example/README.md
Normal file
8
example/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Print Claims Example
|
||||
|
||||
Simple demo showing the usage along with vcpkg.
|
||||
|
||||
```sh
|
||||
cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/vcpkg/scripts/buildsystems/vcpkg.cmake .
|
||||
make
|
||||
```
|
||||
@@ -13,7 +13,7 @@ set(TEST_SOURCES
|
||||
add_executable(jwt-cpp-test ${TEST_SOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
jwt-cpp-test PRIVATE jwt-cpp GTest::gtest GTest::gtest_main GTest::gmock
|
||||
jwt-cpp-test PRIVATE jwt-cpp::jwt-cpp GTest::gtest GTest::gtest_main GTest::gmock
|
||||
GTest::gmock_main)
|
||||
|
||||
add_test(AllTests jwt-cpp-test)
|
||||
|
||||
Reference in New Issue
Block a user