mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 12:09:08 +08:00
0fa8459cf3
* [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 94ff6a9032
.
* Take Javier's suggestion
61 lines
2.2 KiB
CMake
61 lines
2.2 KiB
CMake
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 ####
|
|
###################
|