-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The C++ part of the library is still kept as we made changes to it.
- Loading branch information
Showing
11 changed files
with
88 additions
and
454 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#.rst: | ||
# Findinih | ||
# -------- | ||
# | ||
# Find the inih Library | ||
# | ||
# Imported Targets | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines the following :prop_tgt:`IMPORTED` targets: | ||
# | ||
# ``inih::inih`` | ||
# The ``inih`` library, if found. | ||
# | ||
# Result Variables | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module will set the following variables in your project: | ||
# | ||
# ``INIH_INCLUDE_DIRS`` | ||
# where to find inih headers. | ||
# ``INIH_LIBRARIES`` | ||
# the libraries to link against to use inih. | ||
# ``INIH_FOUND`` | ||
# true if the inih headers and libraries were found. | ||
|
||
find_package(PkgConfig QUIET) | ||
|
||
pkg_check_modules(PC_INIH QUIET libinih) | ||
|
||
# Look for the header file. | ||
find_path(INIH_INCLUDE_DIR | ||
NAMES ini.h | ||
HINTS ${PC_INIH_INCLUDE_DIRS}) | ||
|
||
# Look for the library. | ||
# Allow INIH_LIBRARY to be set manually, as the location of the inih library | ||
if(NOT INIH_LIBRARY) | ||
find_library(INIH_LIBRARY | ||
NAMES libinih inih | ||
HINTS ${PC_INIH_LIBRARY_DIRS}) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(inih | ||
REQUIRED_VARS INIH_LIBRARY INIH_INCLUDE_DIR) | ||
|
||
if(INIH_FOUND) | ||
set(INIH_INCLUDE_DIRS ${INIH_INCLUDE_DIR}) | ||
|
||
if(NOT INIH_LIBRARIES) | ||
set(INIH_LIBRARIES ${INIH_LIBRARIES}) | ||
endif() | ||
|
||
if(NOT TARGET inih::inih) | ||
add_library(inih::inih UNKNOWN IMPORTED) | ||
set_target_properties(inih::inih PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${INIH_INCLUDE_DIRS}" | ||
IMPORTED_LOCATION "${INIH_LIBRARY}") | ||
endif() | ||
endif() | ||
|
||
mark_as_advanced(INIH_INCLUDE_DIR INIH_LIBRARY) |
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
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
Oops, something went wrong.