-
-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use all lower case keywords for consistency * add target for libhistory: History::History
- Loading branch information
1 parent
195cc4c
commit 5796ae5
Showing
2 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
# Locale GNU history library | ||
#[=======================================================================[.rst: | ||
FindHistory | ||
----------- | ||
|
||
find_path(HISTORY_INCLUDE_DIR readline/history.h) | ||
Find the GNU History includes and library. | ||
|
||
IMPORTED Targets | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module defines the `IMPORTED` target ``History::History``, if | ||
History has been found. | ||
|
||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module defines the following variables: | ||
|
||
HISTORY_FOUND - True if history found. | ||
HISTORY_INCLUDE_DIR - Where to find readline/history.h. | ||
HISTORY_LIBRARY - Library when using history. | ||
|
||
#]=======================================================================] | ||
|
||
find_path(HISTORY_INCLUDE_DIR readline/history.h) | ||
find_library(HISTORY_LIBRARY history) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(History DEFAULT_MSG HISTORY_LIBRARY HISTORY_INCLUDE_DIR) | ||
# handle the QUIETLY and REQUIRED arguments and set HISTORY_FOUND to TRUE if all listed variables are TRUE | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(History DEFAULT_MSG HISTORY_LIBRARY HISTORY_INCLUDE_DIR) | ||
|
||
mark_as_advanced(HISTORY_INCLUDE_DIR HISTORY_LIBRARY) | ||
|
||
if(HISTORY_FOUND AND (NOT TARGET History::History)) | ||
add_library(History::History UNKNOWN IMPORTED) | ||
set_target_properties(History::History PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HISTORY_INCLUDE_DIR}") | ||
set_target_properties(History::History PROPERTIES IMPORTED_LOCATION "${HISTORY_LIBRARY}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters