mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[mongoose] Add new port (#7089)
* [mongoose] Add new port * [mongoose] About UWP * [mongoose] Take advantage of cmake 3.14 improvements
This commit is contained in:
parent
e024dd7767
commit
001df4c9e8
20
ports/mongoose/CMakeLists.txt
Normal file
20
ports/mongoose/CMakeLists.txt
Normal file
@ -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
|
||||
)
|
4
ports/mongoose/CONTROL
Normal file
4
ports/mongoose/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: mongoose
|
||||
Version: 6.15-1
|
||||
Description: Embedded web server / embedded networking library
|
||||
Homepage: https://cesanta.com/
|
34
ports/mongoose/portfile.cmake
Normal file
34
ports/mongoose/portfile.cmake
Normal file
@ -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})
|
Loading…
x
Reference in New Issue
Block a user