diff options
| author | myd7349 <myd7349@gmail.com> | 2019-07-17 06:43:41 +0800 |
|---|---|---|
| committer | dan-shaw <51385773+dan-shaw@users.noreply.github.com> | 2019-07-16 15:43:41 -0700 |
| commit | 001df4c9e8cee12bbe669b4aeddd1f085d7a7586 (patch) | |
| tree | 9bb1cb6fe70de8599ff1ea2b050d1c0ee915f2e5 | |
| parent | e024dd7767f9e570274dcc0cdaeb589245f28719 (diff) | |
| download | vcpkg-001df4c9e8cee12bbe669b4aeddd1f085d7a7586.tar.gz vcpkg-001df4c9e8cee12bbe669b4aeddd1f085d7a7586.zip | |
[mongoose] Add new port (#7089)
* [mongoose] Add new port
* [mongoose] About UWP
* [mongoose] Take advantage of cmake 3.14 improvements
| -rw-r--r-- | ports/mongoose/CMakeLists.txt | 20 | ||||
| -rw-r--r-- | ports/mongoose/CONTROL | 4 | ||||
| -rw-r--r-- | ports/mongoose/portfile.cmake | 34 |
3 files changed, 58 insertions, 0 deletions
diff --git a/ports/mongoose/CMakeLists.txt b/ports/mongoose/CMakeLists.txt new file mode 100644 index 000000000..77fe2f839 --- /dev/null +++ b/ports/mongoose/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.14) + +project(mongoose C) + +include(GNUInstallDirs) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_library(mongoose mongoose.c) +target_include_directories(mongoose PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +set_target_properties(mongoose PROPERTIES PUBLIC_HEADER mongoose.h) + +install(TARGETS mongoose EXPORT unofficial-mongoose-config) + +install( + EXPORT unofficial-mongoose-config + NAMESPACE unofficial::mongoose:: + DESTINATION share/unofficial-mongoose + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/ports/mongoose/CONTROL b/ports/mongoose/CONTROL new file mode 100644 index 000000000..ae0bbc758 --- /dev/null +++ b/ports/mongoose/CONTROL @@ -0,0 +1,4 @@ +Source: mongoose +Version: 6.15-1 +Description: Embedded web server / embedded networking library +Homepage: https://cesanta.com/ diff --git a/ports/mongoose/portfile.cmake b/ports/mongoose/portfile.cmake new file mode 100644 index 000000000..81c8d50ee --- /dev/null +++ b/ports/mongoose/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cesanta/mongoose + REF 6.15 + SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) |
