2019-05-03 13:57:43 +08:00
|
|
|
# Check library linkage:
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
|
|
|
|
|
|
|
# Get source code:
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-11-13 09:31:03 +08:00
|
|
|
REPO faburaya/3fd
|
|
|
|
REF 3a0fe606268721d1560b88dcca8647c67c0b275c # v2.6.3 (Stable)
|
|
|
|
SHA512 70630291b4055de2044ad76ef21e99d6ab6fd3468debb2a864a461cf8513642fe87f116e9dfff96ecff96f4577108493dc25aa40eeefcd93ee75990b13bb7b20
|
2019-05-03 13:57:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2021-10-19 05:25:31 +08:00
|
|
|
RapidXML.patch
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Build:
|
2023-08-10 01:29:22 +08:00
|
|
|
if (VCPKG_TARGET_IS_UWP) # UWP:
|
|
|
|
vcpkg_msbuild_install(
|
2020-11-13 09:31:03 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
PROJECT_SUBPATH "3FD/3FD.WinRT.UWP.vcxproj"
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
2023-08-10 01:29:22 +08:00
|
|
|
elseif (VCPKG_TARGET_IS_WINDOWS) # Win32:
|
|
|
|
vcpkg_msbuild_install(
|
2020-11-13 09:31:03 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
PROJECT_SUBPATH "3FD/3FD.vcxproj"
|
2019-05-03 13:57:43 +08:00
|
|
|
TARGET Build
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Install:
|
|
|
|
file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h")
|
|
|
|
file(INSTALL
|
|
|
|
${HEADER_FILES}
|
2023-08-10 01:29:22 +08:00
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD"
|
2019-05-03 13:57:43 +08:00
|
|
|
PATTERN "*_impl*.h" EXCLUDE
|
|
|
|
PATTERN "*example*.h" EXCLUDE
|
|
|
|
PATTERN "stdafx.h" EXCLUDE
|
|
|
|
PATTERN "targetver.h" EXCLUDE
|
|
|
|
)
|
|
|
|
|
2023-08-10 01:29:22 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/btree" DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/OpenCL/CL" DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2023-08-10 01:29:22 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/3FD")
|
2019-05-03 13:57:43 +08:00
|
|
|
file(INSTALL
|
2023-08-10 01:29:22 +08:00
|
|
|
"${SOURCE_PATH}/3FD/3fd-config-template.xml"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/3FD"
|
2019-05-03 13:57:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Handle copyright
|
2023-08-10 01:29:22 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/Acknowledgements.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/3fd")
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|