Add inih port (#3806)

This commit is contained in:
Seo Sanghyeon 2018-07-03 17:17:33 +09:00 committed by Robert Schumacher
parent 812a76a591
commit 88523125ff
3 changed files with 42 additions and 0 deletions

15
ports/inih/CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
project(inih)
set(SOURCES ini.c cpp/INIReader.cpp)
set(HEADERS ini.h cpp/INIReader.h)
add_library(inih ${SOURCES})
install(
TARGETS inih
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES ${HEADERS} DESTINATION include)

3
ports/inih/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: inih
Version: 42
Description: Simple .INI file parser

24
ports/inih/portfile.cmake Normal file
View File

@ -0,0 +1,24 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO benhoyt/inih
REF r42
SHA512 bb414bf03e2055f47149d69bd373923cc663f5e044cd021fd34ac646effc485db8cedb128123aaac7e2abc16c98bee98f34d89108a4bab9af50b8cd05eb7af8d
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/inih RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)