2016-10-15 01:21:35 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-04-18 01:00:20 +08:00
|
|
|
set(PHYSFS_VERSION 3.0.1)
|
2017-07-30 07:55:17 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION})
|
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"
|
|
|
|
FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2"
|
2018-04-18 01:00:20 +08:00
|
|
|
SHA512 ddf3b075ccb506da5e9a1ce96001be402752b9b777c2e816a85d48aff3626ff0886ea43eb07bd300fe3a9f59b9a002f54d822c51d483a4ee94b38378534c1879
|
2016-10-15 01:21:35 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
2017-07-30 07:55:17 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED)
|
|
|
|
|
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
|
|
|
|
OPTIONS
|
|
|
|
-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)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/physfs)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/physfs/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/physfs/copyright)
|