2017-10-30 10:21:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO diegonehab/luasocket
|
2020-10-14 04:17:32 +08:00
|
|
|
REF 5b18e475f38fcf28429b1cc4b17baee3b9793a62 # accessed on 2020-09-14
|
|
|
|
SHA512 bdf7086a0504b0072b9cfd1266fc4ae89504053801722859a426f567fca00ed76f4c295c2a3a968e93f0036d9b792cf97561e9baa82c09ea23999cfd473227eb
|
2017-10-30 10:21:41 +08:00
|
|
|
HEAD_REF master)
|
|
|
|
|
2022-01-12 06:28:39 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2017-10-30 10:21:41 +08:00
|
|
|
|
2022-01-12 06:28:39 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-02-26 03:37:23 +08:00
|
|
|
)
|
2017-10-30 10:21:41 +08:00
|
|
|
|
2022-01-12 06:28:39 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-10-30 10:21:41 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
# Remove debug share
|
2022-01-12 06:28:39 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-10-30 10:21:41 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2022-01-12 06:28:39 +08:00
|
|
|
file(COPY "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/luasocket")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/luasocket/LICENSE" "${CURRENT_PACKAGES_DIR}/share/luasocket/copyright")
|
2019-03-14 21:32:27 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2017-10-30 10:21:41 +08:00
|
|
|
# Handle socket dll name
|
2022-01-12 06:28:39 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.dll" "${CURRENT_PACKAGES_DIR}/bin/socket/core.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.pdb" "${CURRENT_PACKAGES_DIR}/bin/socket/core.pdb")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.pdb" "${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.pdb")
|
2017-10-30 10:21:41 +08:00
|
|
|
|
|
|
|
# Handle mime dll name
|
2022-01-12 06:28:39 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.dll" "${CURRENT_PACKAGES_DIR}/bin/mime/core.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.pdb" "${CURRENT_PACKAGES_DIR}/bin/mime/core.pdb")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.pdb" "${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.pdb")
|
2019-03-14 21:32:27 +08:00
|
|
|
endif()
|
2017-10-30 10:21:41 +08:00
|
|
|
|
|
|
|
# Allow empty include directory
|
|
|
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|