From 83c9a6393dc63cdb5b081254f8de58eb7a643666 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Wed, 31 Jan 2018 18:22:17 +0300 Subject: [PATCH] Update FindHinnantDate.cmake script. --- cmake/Modules/FindHinnantDate.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/FindHinnantDate.cmake b/cmake/Modules/FindHinnantDate.cmake index affb0a38..44e90e2a 100644 --- a/cmake/Modules/FindHinnantDate.cmake +++ b/cmake/Modules/FindHinnantDate.cmake @@ -13,7 +13,7 @@ # # and the following imported targets:: # -# HinnantDate::Date - The target to use date.h +# HinnantDate::Date - The target to use date/date.h # # You can set HinnantDate_ROOT_DIR as hint to the location of the library. # @@ -53,7 +53,7 @@ set(HinnantDate_NOT_FOUND_MESSAGE "Could NOT find HinnantDate. Maybe you need to adjust the search paths or HinnantDate_ROOT_DIR.") find_file(HinnantDate_INCLUDE_FILE - date.h date/date.h include/date/date.h + date/date.h include/date/date.h HINTS ${HinnantDate_ROOT_DIR} ${HinnantDate_ROOT_DIR}/include @@ -72,7 +72,10 @@ if (HinnantDate_INCLUDE_FILE) unset(HinnantDate_INCLUDE_FILE CACHE) else() # Check succeeded, create target - get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY CACHE) + # remove filename + get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_FILE}" DIRECTORY) + # remove date dir + get_filename_component(HinnantDate_INCLUDE_DIR "${HinnantDate_INCLUDE_DIR}" DIRECTORY) mark_as_advanced(HinnantDate_INCLUDE_DIR) set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}") unset(HinnantDate_NOT_FOUND_MESSAGE)