mirror of https://github.com/microsoft/vcpkg.git
[inih] Revise (#51315)
This commit is contained in:
parent
63c3d81305
commit
ea78404d25
|
|
@ -14,31 +14,22 @@ vcpkg_check_features(
|
|||
cpp with_INIReader
|
||||
)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
set(INIH_CONFIG_DEBUG ON)
|
||||
else()
|
||||
set(INIH_CONFIG_DEBUG OFF)
|
||||
endif()
|
||||
|
||||
# Install unofficial CMake package
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-inihConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-inih/unofficial-inihConfig.cmake" @ONLY)
|
||||
|
||||
# meson build
|
||||
string(REPLACE "OFF" "false" FEATURE_OPTIONS "${FEATURE_OPTIONS}")
|
||||
string(REPLACE "ON" "true" FEATURE_OPTIONS "${FEATURE_OPTIONS}")
|
||||
|
||||
vcpkg_configure_meson(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"${FEATURE_OPTIONS}"
|
||||
${FEATURE_OPTIONS}
|
||||
"-Dcpp_std=c++11"
|
||||
)
|
||||
|
||||
vcpkg_install_meson()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
string(COMPARE EQUAL "${VCPKG_BUILD_TYPE}" "" INIH_CONFIG_DEBUG)
|
||||
configure_file("${CURRENT_PORT_DIR}/unofficial-inihConfig.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-inih/unofficial-inihConfig.cmake" @ONLY)
|
||||
|
||||
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
The package inih provides unofficial CMake targets:
|
||||
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
|
||||
|
||||
inih provides pkg-config modules:
|
||||
|
||||
# simple .INI file parser
|
||||
inih
|
||||
|
||||
# simple .INI file parser for C++
|
||||
INIReader
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "inih",
|
||||
"version": "62",
|
||||
"port-version": 1,
|
||||
"description": "Simple .INI file parser",
|
||||
"homepage": "https://github.com/benhoyt/inih",
|
||||
"license": "BSD-3-Clause",
|
||||
|
|
|
|||
|
|
@ -4006,7 +4006,7 @@
|
|||
},
|
||||
"inih": {
|
||||
"baseline": "62",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"iniparser": {
|
||||
"baseline": "4.2.6",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7a9a9c5c156b62b19abbcb8da7a3c84542c9c087",
|
||||
"version": "62",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "aae946facee360e092d65aff532ba3754da49552",
|
||||
"version": "62",
|
||||
|
|
|
|||
Loading…
Reference in New Issue