vcpkg/ports/yoga/portfile.cmake

34 lines
1.2 KiB
CMake
Raw Normal View History

2018-01-04 11:34:44 +08:00
include(vcpkg_common_functions)
2019-03-08 16:14:06 +08:00
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
2018-01-04 11:34:44 +08:00
message(FATAL_ERROR "Error: UWP builds not supported yet.")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/yoga
2019-03-08 16:14:06 +08:00
REF v1.13.0
SHA512 ca87c4526956ccb0693c4e1cdf825b2d9cfd97b20f6c11a06b3966c99903e06c0ca1013f9c72546bbf1d0f56b501f422dfb18dbcfee82ba340e18dcea80b3caf
2018-01-04 11:34:44 +08:00
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_build_cmake()
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
endif()
2018-01-04 11:34:44 +08:00
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yoga RENAME copyright)