vcpkg/ports/sfgui/portfile.cmake

39 lines
1.3 KiB
CMake
Raw Normal View History

2017-11-05 18:59:25 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO TankOs/SFGUI
REF 0.4.0
SHA512 15456c6080b7095bcdcec08489b2b91b5cfc36cdf3c0b645b305072e7e835837eb4f95b59371ff176630b2b7ae51da475d8ea0bde5ff7fc0ba74c463bf5f54cf
2017-11-05 18:59:25 +08:00
HEAD_REF master
2020-01-14 05:37:40 +08:00
PATCHES
"001-fix-corefoundation-link.patch"
"002-add-limits-header.patch"
2017-11-05 18:59:25 +08:00
)
file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake")
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SFGUI_BUILD_SHARED_LIBS)
2017-11-05 18:59:25 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
2017-11-05 18:59:25 +08:00
-DSFGUI_BUILD_DOC=OFF
-DSFGUI_BUILD_EXAMPLES=OFF
-DSFGUI_BUILD_SHARED_LIBS=${SFGUI_BUILD_SHARED_LIBS}
)
vcpkg_cmake_install()
2017-11-05 18:59:25 +08:00
vcpkg_copy_pdbs()
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
file(GLOB_RECURSE SFGUI_DOC_RELEASE "${CURRENT_PACKAGES_DIR}/*.md")
file(GLOB_RECURSE SFGUI_DOC_DEBUG "${CURRENT_PACKAGES_DIR}/debug/*.md")
file(REMOVE ${SFGUI_DOC_RELEASE} ${SFGUI_DOC_DEBUG})
else()
vcpkg_cmake_config_fixup(CONFIG_PATH share/SFGUI/cmake)
endif()
2017-11-05 18:59:25 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2017-11-05 18:59:25 +08:00
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)