From e6b92cca0b7088027269c481fa244e5c39df88ff Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 24 Jan 2022 13:02:30 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=96=8C=EF=B8=8F=20With=20hunter=20use=20r?= =?UTF-8?q?elative=20CMake=20install=20path=20(#198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e86af5b5..ccd4ea819 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,10 @@ if(JWT_EXTERNAL_PICOJSON) target_link_libraries(jwt-cpp INTERFACE picojson::picojson>) endif() -if(NOT JWT_CMAKE_FILES_INSTALL_DIR) +# If Hunter is enabled, we need to explicit set relative paths so the files are palced correctly +if(HUNTER_ENABLED) + set(JWT_CMAKE_FILES_INSTALL_DIR cmake) +elseif(NOT JWT_CMAKE_FILES_INSTALL_DIR) set(JWT_CMAKE_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/cmake) endif()