2017-10-30 10:21:41 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-05-10 05:47:48 +08:00
|
|
|
REPO lunarmodules/luasocket
|
2023-05-03 06:21:40 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 1e9e98484740ec6538fe3d2b0dab74d31f052956ecf9ee3b60e229f2d0b13fcc6d4aaf74cd2a3e2ee330333dabb316fe6a43c60baaea26f0cc01069b6aa4519b
|
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
|
|
|
|
2024-03-26 06:59:33 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(BUILD_TYPE SHARED)
|
|
|
|
else()
|
|
|
|
set(BUILD_TYPE STATIC)
|
|
|
|
endif()
|
|
|
|
|
2022-01-12 06:28:39 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-03-26 06:59:33 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TYPE=${BUILD_TYPE}
|
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
|
2023-05-03 06:21:40 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST ${SOURCE_PATH}/LICENSE)
|
2017-10-30 10:21:41 +08:00
|
|
|
|
|
|
|
# Allow empty include directory
|
|
|
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|