mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-15 15:39:02 +08:00
22d7c8b375
* Remove/fix unused patch files * Bump port versions * Update git-tree hash * Fix corrupt patch * Update git-tree hash * Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update git-tree hash Co-authored-by: chausner <chausner@users.noreply.github.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
73 lines
2.3 KiB
CMake
73 lines
2.3 KiB
CMake
vcpkg_fail_port_install(ON_TARGET "osx" "linux")
|
|
|
|
# Check architecture:
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
set(BUILD_ARCH "Win32")
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
set(BUILD_ARCH "x64")
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
|
set(BUILD_ARCH "ARM")
|
|
else()
|
|
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
endif()
|
|
|
|
# Check library linkage:
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
|
|
|
# Get source code:
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO faburaya/3fd
|
|
REF 3a0fe606268721d1560b88dcca8647c67c0b275c # v2.6.3 (Stable)
|
|
SHA512 70630291b4055de2044ad76ef21e99d6ab6fd3468debb2a864a461cf8513642fe87f116e9dfff96ecff96f4577108493dc25aa40eeefcd93ee75990b13bb7b20
|
|
HEAD_REF master
|
|
PATCHES
|
|
RapidXML.patch
|
|
)
|
|
|
|
# Build:
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP:
|
|
vcpkg_install_msbuild(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
PROJECT_SUBPATH "3FD/3FD.WinRT.UWP.vcxproj"
|
|
PLATFORM ${BUILD_ARCH}
|
|
USE_VCPKG_INTEGRATION
|
|
)
|
|
elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32:
|
|
vcpkg_install_msbuild(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
PROJECT_SUBPATH "3FD/3FD.vcxproj"
|
|
PLATFORM ${BUILD_ARCH}
|
|
TARGET Build
|
|
USE_VCPKG_INTEGRATION
|
|
)
|
|
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}
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD
|
|
PATTERN "*_impl*.h" EXCLUDE
|
|
PATTERN "*example*.h" EXCLUDE
|
|
PATTERN "stdafx.h" EXCLUDE
|
|
PATTERN "targetver.h" EXCLUDE
|
|
)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
|
file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD)
|
|
file(INSTALL
|
|
${SOURCE_PATH}/3FD/3fd-config-template.xml
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD
|
|
)
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright)
|
|
file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd)
|
|
|
|
vcpkg_copy_pdbs()
|