mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 01:09:07 +08:00
Remove unofficial CMake config
This commit is contained in:
parent
4ac0cb9ac2
commit
94ff6a9032
@ -1,5 +1,3 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO benhoyt/inih
|
||||
@ -14,15 +12,6 @@ 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}")
|
||||
|
@ -1,60 +0,0 @@
|
||||
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 ####
|
||||
###################
|
@ -1,21 +1,12 @@
|
||||
The package inih can be imported via CMake FindPkgConfig module:
|
||||
|
||||
find_package(PkgConfig)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# C API
|
||||
pkg_check_modules(INIH REQUIRED IMPORTED_TARGET inih)
|
||||
target_link_libraries(main PRIVATE PkgConfig::INIH)
|
||||
|
||||
# C++ API (Requires "cpp" feature)
|
||||
# C++ API (Requires "cpp" default-feature)
|
||||
pkg_check_modules(INIReader REQUIRED IMPORTED_TARGET INIReader)
|
||||
target_link_libraries(main PRIVATE PkgConfig::INIReader)
|
||||
|
||||
Alternatively, 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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1217fac5b451e5354a1041bf7144a4537c1aa379",
|
||||
"git-tree": "169bf48e4ba44dc6a2639386bd143aa5645de3b4",
|
||||
"version": "57",
|
||||
"port-version": 0
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user