mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 05:29:00 +08:00
a9794606a6
* [mosquitto] Update to 2.0.18 * Disable android. ``` ci/installed/arm-neon-android/debug/lib/libssl.a /mnt/vcpkg-ci/installed/arm-neon-android/debug/lib/libcrypto.a -pthread -ldl -latomic -lm && : ld: error: undefined symbol: getgrgid_r >>> referenced by misc_mosq.c:192 (/mnt/vcpkg-ci/buildtrees/mosquitto/src/v2.0.18-5deb484567.clean/lib/misc_mosq.c:192) >>> lib/CMakeFiles/libmosquitto.dir/misc_mosq.c.o:(mosquitto__fopen) clang: error: linker command failed with exit code 1 (use -v to see invocation) ```
77 lines
3.6 KiB
CMake
77 lines
3.6 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO eclipse/mosquitto
|
|
HEAD_REF master
|
|
REF "v${VERSION}"
|
|
SHA512 667216f3e60f9916d5de200d3a205fb5a5c798564c96e44939af6c8e3af85fffa36a63eba47db009b432d14f43883dbca5b92547a458215dd269e91f6bcfb7fa
|
|
PATCHES
|
|
0003-add-find_package-libwebsockets.patch
|
|
0004-support-static-build.patch
|
|
0005-websocket-shared-lib-name.patch
|
|
0006-pthreads-for-windows.patch
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LINKAGE)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DWITH_STATIC_LIBRARIES=${STATIC_LINKAGE}
|
|
-DWITH_SRV=OFF
|
|
-DWITH_WEBSOCKETS=ON
|
|
-DSTATIC_WEBSOCKETS=${STATIC_LINKAGE}
|
|
-DWITH_TLS=ON
|
|
-DWITH_TLS_PSK=ON
|
|
-DWITH_THREADING=ON
|
|
-DDOCUMENTATION=OFF
|
|
-DWITH_PLUGINS=OFF
|
|
-DWITH_CJSON=OFF
|
|
-DWITH_CLIENTS=OFF
|
|
-DWITH_APPS=OFF
|
|
-DWITH_BROKER=OFF
|
|
-DWITH_BUNDLED_DEPS=OFF
|
|
MAYBE_UNUSED_VARIABLES
|
|
WITH_WEBSOCKETS
|
|
STATIC_WEBSOCKETS
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}")
|
|
|
|
file(GLOB VERSIONED_LIBRARIES LIST_DIRECTORIES FALSE
|
|
"${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.*"
|
|
"${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.*"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.*"
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.*"
|
|
)
|
|
|
|
if(NOT "x${VERSIONED_LIBRARIES}x" STREQUAL "xx")
|
|
file(REMOVE ${VERSIONED_LIBRARIES})
|
|
endif()
|
|
|
|
if(NOT "x${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}x" STREQUAL "xx")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}mosquitto${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}mosquittopp${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}")
|
|
endif()
|
|
endif()
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY)
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|