2021-01-15 15:19:19 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_TARGET_ARCHITECTURE} MATCHES "arm64")
|
|
|
|
message(FATAL_ERROR "Architecture 'arm64' not supported on target 'Windows' by physfs!\n")
|
|
|
|
endif()
|
2019-03-27 01:51:35 +08:00
|
|
|
set(PHYSFS_VERSION 3.0.2)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2016-10-15 01:21:35 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-07-30 07:55:17 +08:00
|
|
|
URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2"
|
2020-04-11 20:41:03 +08:00
|
|
|
"https://hg.icculus.org/icculus/physfs/archive/release-${PHYSFS_VERSION}.tar.bz2"
|
2017-07-30 07:55:17 +08:00
|
|
|
FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2"
|
2019-03-27 01:51:35 +08:00
|
|
|
SHA512 4024b6c3348e0b6fc1036aac330192112dfe17de3e3d14773be9f06e9a062df5a1006869f21162b4e0b584989f463788a35e64186b1913225c073fea62754472
|
2016-10-15 01:21:35 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2018-11-29 07:33:10 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${PHYSFS_VERSION}
|
|
|
|
)
|
2016-10-15 01:21:35 +08:00
|
|
|
|
2017-07-30 07:55:17 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC)
|
2019-10-08 01:35:13 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED)
|
2017-07-30 07:55:17 +08:00
|
|
|
|
2016-10-15 01:21:35 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-07-30 07:55:17 +08:00
|
|
|
PREFER_NINJA
|
2019-10-08 01:35:13 +08:00
|
|
|
OPTIONS
|
2017-07-30 07:55:17 +08:00
|
|
|
-DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC}
|
|
|
|
-DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED}
|
|
|
|
-DPHYSFS_BUILD_TEST=OFF
|
2016-10-15 01:21:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-07-30 07:55:17 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2016-10-15 01:21:35 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|