mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Update FindHinnantDate.cmake script.
This commit is contained in:
parent
f00cac9599
commit
83c9a6393d
@ -13,7 +13,7 @@
|
|||||||
#
|
#
|
||||||
# and the following imported targets::
|
# 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.
|
# 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.")
|
Maybe you need to adjust the search paths or HinnantDate_ROOT_DIR.")
|
||||||
|
|
||||||
find_file(HinnantDate_INCLUDE_FILE
|
find_file(HinnantDate_INCLUDE_FILE
|
||||||
date.h date/date.h include/date/date.h
|
date/date.h include/date/date.h
|
||||||
HINTS
|
HINTS
|
||||||
${HinnantDate_ROOT_DIR}
|
${HinnantDate_ROOT_DIR}
|
||||||
${HinnantDate_ROOT_DIR}/include
|
${HinnantDate_ROOT_DIR}/include
|
||||||
@ -72,7 +72,10 @@ if (HinnantDate_INCLUDE_FILE)
|
|||||||
unset(HinnantDate_INCLUDE_FILE CACHE)
|
unset(HinnantDate_INCLUDE_FILE CACHE)
|
||||||
else()
|
else()
|
||||||
# Check succeeded, create target
|
# 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)
|
mark_as_advanced(HinnantDate_INCLUDE_DIR)
|
||||||
set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}")
|
set(HinnantDate_ROOT_DIR "${HinnantDate_INCLUDE_DIR}")
|
||||||
unset(HinnantDate_NOT_FOUND_MESSAGE)
|
unset(HinnantDate_NOT_FOUND_MESSAGE)
|
||||||
|
Loading…
Reference in New Issue
Block a user