forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[inih] Build with Meson + update to r57 (microsoft#33001)
* [inih] Use meson build, bump version * [inih] Versioning * Specify c++11 to meson to fix osx? * [inih] Version * Restore line endings * Version * Address review comments - Removed CMake package versioning - Wasn't that useful as upstream don't use semver - Use straight configure_file to install CMake package config - Make cpp feature default - Prefer PkgConfig usage * Version * Actually delete the CMakeList * Version * separate C and C++ library usage * Version * Remove unofficial CMake config * Revert "Remove unofficial CMake config" This reverts commit 94ff6a9. * Take Javier's suggestion
- Loading branch information
1 parent
9434026
commit 0fa8459
Showing
7 changed files
with
102 additions
and
79 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
if(TARGET unofficial::inih::libinih) | ||
return() | ||
endif() | ||
|
||
set(INIH_WITH_INI_READER @with_INIReader@) | ||
set(INIH_WITH_DEBUG @INIH_CONFIG_DEBUG@) | ||
|
||
# Compute the installation prefix relative to this file. | ||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | ||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | ||
|
||
################### | ||
#### libinih #### | ||
|
||
add_library(unofficial::inih::libinih UNKNOWN IMPORTED) | ||
|
||
find_library(INIH_INIHLIB_RELEASE NAMES inih PATHS "${_IMPORT_PREFIX}/lib/" REQUIRED NO_DEFAULT_PATH) | ||
set_target_properties(unofficial::inih::libinih PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "C" | ||
IMPORTED_LOCATION_RELEASE "${INIH_INIHLIB_RELEASE}" | ||
IMPORTED_CONFIGURATIONS "RELEASE" | ||
) | ||
|
||
if(INIH_WITH_DEBUG) | ||
set_property(TARGET unofficial::inih::libinih APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) | ||
find_library(INIH_INIHLIB_DEBUG NAMES inih PATHS "${_IMPORT_PREFIX}/debug/lib/" REQUIRED NO_DEFAULT_PATH) | ||
set_target_properties(unofficial::inih::libinih PROPERTIES | ||
IMPORTED_LOCATION_DEBUG "${INIH_INIHLIB_DEBUG}" | ||
) | ||
endif() | ||
|
||
#### libinih #### | ||
################### | ||
#### INIReader #### | ||
|
||
if(INIH_WITH_INI_READER) | ||
add_library(unofficial::inih::inireader UNKNOWN IMPORTED) | ||
|
||
find_library(INIH_INIREADER_RELEASE NAMES INIReader PATHS "${_IMPORT_PREFIX}/lib/" REQUIRED NO_DEFAULT_PATH) | ||
set_target_properties(unofficial::inih::inireader PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX" | ||
IMPORTED_LOCATION_RELEASE "${INIH_INIREADER_RELEASE}" | ||
INTERFACE_LINK_LIBRARIES "unofficial::inih::libinih" | ||
IMPORTED_CONFIGURATIONS "RELEASE" | ||
) | ||
|
||
if(INIH_WITH_DEBUG) | ||
set_property(TARGET unofficial::inih::inireader APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) | ||
find_library(INIH_INIREADER_DEBUG NAMES INIReader PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH) | ||
set_target_properties(unofficial::inih::inireader PROPERTIES | ||
IMPORTED_LOCATION_DEBUG "${INIH_INIREADER_DEBUG}" | ||
) | ||
endif() | ||
endif() | ||
|
||
#### INIReader #### | ||
################### |
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,7 @@ | ||
The package inih provides unofficial CMake targets: | ||
find_package(unofficial-inih CONFIG REQUIRED) | ||
# C API | ||
target_link_libraries(main PRIVATE unofficial::inih::libinih) | ||
# C++ API (Requires "cpp" feature) | ||
target_link_libraries(main PRIVATE unofficial::inih::inireader) | ||
Alternatively, if you are using pckgconfig use the name "inih" for the C API and "inireader" for the C++ API |
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