From 88523125ff6b0b1982790aea53d698c96c747b2d Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Tue, 3 Jul 2018 17:17:33 +0900 Subject: [PATCH] Add inih port (#3806) --- ports/inih/CMakeLists.txt | 15 +++++++++++++++ ports/inih/CONTROL | 3 +++ ports/inih/portfile.cmake | 24 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 ports/inih/CMakeLists.txt create mode 100644 ports/inih/CONTROL create mode 100644 ports/inih/portfile.cmake diff --git a/ports/inih/CMakeLists.txt b/ports/inih/CMakeLists.txt new file mode 100644 index 0000000000..6601e543af --- /dev/null +++ b/ports/inih/CMakeLists.txt @@ -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) diff --git a/ports/inih/CONTROL b/ports/inih/CONTROL new file mode 100644 index 0000000000..ac3051c829 --- /dev/null +++ b/ports/inih/CONTROL @@ -0,0 +1,3 @@ +Source: inih +Version: 42 +Description: Simple .INI file parser diff --git a/ports/inih/portfile.cmake b/ports/inih/portfile.cmake new file mode 100644 index 0000000000..1d705977fc --- /dev/null +++ b/ports/inih/portfile.cmake @@ -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)