From 914b6890d0267c8cc94d00c451d697e5cd252e3a Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Mon, 24 Jul 2023 12:30:02 -0700 Subject: [PATCH] improvement to cmake build --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38819982..bd01c96c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,12 +148,9 @@ else() target_compile_options(wolftpm PUBLIC ${WOLFSSL_CFLAGS_OTHER}) else() # For support with vcpkg - find_package(wolfssl CONFIG) + find_package(wolfssl CONFIG REQUIRED) if (wolfssl_FOUND) - find_path(WOLFSSL_INCLUDE_DIR NAMES wolfssl/ssl.h) - find_library(WOLFSSL_LIBRARY_PATH NAMES wolfssl) - include_directories(${WOLFSSL_INCLUDE_DIR}) - target_link_libraries(wolftpm PUBLIC ${WOLFSSL_LIBRARY_PATH}) + target_link_libraries(wolftpm PRIVATE wolfssl::wolfssl) else() list(APPEND WOLFTPM_DEFINITIONS "-DWOLFTPM2_NO_WOLFCRYPT") endif()