mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 15:49:07 +08:00
53 lines
2.1 KiB
CMake
53 lines
2.1 KiB
CMake
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) # This is a lie. mosquitto can be build staticlly it just must be implemented by vcpkg
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO eclipse/mosquitto
|
|
REF v1.6.7
|
|
SHA512 bc10a70815a8962e0ead06c36b312ea84e43db4e7c05ad940db91cacea92387a3b4f59f7de1606c4df56cd8c829433957733aa4007111d62bc0134e9cbb9ff3f
|
|
HEAD_REF master
|
|
PATCHES
|
|
archive-dest.patch
|
|
win64-cmake.patch
|
|
libwebsockets.patch
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DWITH_SRV=OFF
|
|
-DWITH_WEBSOCKETS=ON
|
|
-DWITH_TLS=ON
|
|
-DWITH_TLS_PSK=ON
|
|
-DWITH_THREADING=ON
|
|
-DDOCUMENTATION=OFF
|
|
OPTIONS_RELEASE
|
|
-DENABLE_DEBUG=OFF
|
|
OPTIONS_DEBUG
|
|
-DENABLE_DEBUG=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
|
|
|
#if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
#endif()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |