vcpkg/ports/tinyfiledialogs/portfile.cmake
Maximilian Kruse 5a213dff37 [tinyfiledialogs] Fix tinyfiledialogs not being fetchable from sourceforge (#9630)
* Fix tinyfiledialogs not being fetchable from sourceforge

Fix tinyfiledialogs not being fetchable from sourceforge. Use github instead.

* Update CONTROL

* Update portfile.cmake

* Update portfile.cmake

Update source url

* Update CONTROL
2020-01-17 16:23:14 -08:00

24 lines
682 B
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://git.code.sf.net/p/tinyfiledialogs/code
REF f7789c57db4269495a6702625351a15e5ee17542
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(READ ${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs/tinyfiledialogs.h _contents)
string(SUBSTRING "${_contents}" 0 1024 _contents)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyfiledialogs/copyright "${_contents}")