vcpkg/ports/sail/portfile.cmake

51 lines
1.8 KiB
CMake
Raw Normal View History

vcpkg_fail_port_install(ON_TARGET "UWP")
2020-12-12 06:17:43 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO HappySeaFox/sail
REF v0.9.0-pre16
SHA512 dca4b930c78d0d330cde0a0255efae6042e11914eec37be35b1fc39eaf3855a47f5b2d07be17c8b4c67f569acfab2cfe7ff86aaeba60eed4bbf2be637b1bf192
2020-12-12 06:17:43 +08:00
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SAIL_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2020-12-12 06:17:43 +08:00
OPTIONS
-DSAIL_STATIC=${SAIL_STATIC}
-DSAIL_COMBINE_CODECS=ON
2020-12-12 06:17:43 +08:00
-DSAIL_BUILD_EXAMPLES=OFF
-DSAIL_BUILD_TESTS=OFF
)
vcpkg_cmake_install()
2020-12-12 06:17:43 +08:00
vcpkg_copy_pdbs()
# Remove duplicate files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share)
# Move cmake configs
vcpkg_cmake_config_fixup(PACKAGE_NAME sail CONFIG_PATH lib/cmake/sail DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcodecs CONFIG_PATH lib/cmake/sailcodecs DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailcommon CONFIG_PATH lib/cmake/sailcommon DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailc++ CONFIG_PATH lib/cmake/sailc++ DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME sailmanip CONFIG_PATH lib/cmake/sailmanip DO_NOT_DELETE_PARENT_CONFIG_PATH)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake"
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
2020-12-12 06:17:43 +08:00
# Fix pkg-config files
vcpkg_fixup_pkgconfig()
# Handle usage
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
2020-12-12 06:17:43 +08:00
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)