2020-03-07 02:07:49 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "uwp")
|
|
|
|
|
2018-10-09 16:20:29 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2021-08-17 04:42:31 +08:00
|
|
|
vcpkg_from_git(
|
2020-06-27 06:06:30 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-08-17 04:42:31 +08:00
|
|
|
FETCH_REF master
|
|
|
|
HEAD_REF master
|
|
|
|
URL https://git.code.sf.net/p/tinyfiledialogs/code
|
|
|
|
REF e11f94cd7887b101d64f74892d769f0139b5e166
|
2020-03-07 02:07:49 +08:00
|
|
|
)
|
|
|
|
|
2021-05-18 14:43:26 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2018-10-09 16:20:29 +08:00
|
|
|
|
2021-08-03 07:31:29 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-05-18 14:43:26 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-10-09 16:20:29 +08:00
|
|
|
)
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2021-08-03 07:31:29 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2018-10-09 16:20:29 +08:00
|
|
|
|
2021-05-18 14:43:26 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs/tinyfiledialogs.h" _contents)
|
|
|
|
# reads between the line "- License -" and a closing "*/"
|
|
|
|
if (NOT _contents MATCHES [[- License -(([^*]|\*[^/])*)\*/]])
|
2021-08-17 04:42:31 +08:00
|
|
|
message(FATAL_ERROR "Failed to parse license from tinyfiledialogs.h")
|
2021-05-18 14:43:26 +08:00
|
|
|
endif()
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${CMAKE_MATCH_1}")
|