2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2021-09-28 12:01:49 +08:00
|
|
|
set(TARGET_BUILD_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
2019-02-08 07:39:09 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO sago007/PlatformFolders
|
2023-02-04 04:34:23 +08:00
|
|
|
REF 4.2.0
|
|
|
|
SHA512 50a9acd37b8b491e8938190b3b7ed1af2d3cc70bb6e59708dc1928269d5e4b8d52ec02f9330f3d9439099029ac61d193dadbca198e1d561432e02e488e103f7c
|
2019-02-08 07:39:09 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-02-04 04:34:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-09-28 12:01:49 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-02-08 07:39:09 +08:00
|
|
|
OPTIONS
|
2023-02-04 04:34:23 +08:00
|
|
|
-DPLATFORMFOLDERS_BUILD_TESTING=OFF
|
2019-02-08 07:39:09 +08:00
|
|
|
)
|
|
|
|
|
2023-02-04 04:34:23 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-02-08 07:39:09 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2021-09-28 12:01:49 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(INSTALL "${TARGET_BUILD_PATH}-rel/platform_folders.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/")
|
|
|
|
file(INSTALL "${TARGET_BUILD_PATH}-dbg/platform_folders.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/")
|
2019-02-08 07:39:09 +08:00
|
|
|
endif()
|
|
|
|
|
2021-09-28 12:01:49 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_MinGW)
|
2023-02-04 04:34:23 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME platform_folders CONFIG_PATH cmake)
|
2019-02-08 07:39:09 +08:00
|
|
|
else()
|
2023-05-26 06:28:37 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME platform_folders CONFIG_PATH lib/cmake/platform_folders)
|
2019-02-08 07:39:09 +08:00
|
|
|
endif()
|
|
|
|
|
2021-09-28 12:01:49 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-02-04 04:34:23 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
2019-02-08 07:39:09 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|