2018-11-15 07:23:06 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO cutelyst/cutelyst
|
2020-10-14 04:17:32 +08:00
|
|
|
REF 526aef6b4c1a48f8e91d59607763fade9157d01f # v2.12.0
|
|
|
|
SHA512 0960801ae8d772a93e3f2dcd221f919ff28000076cecd4d1a2ff7b6e62575805738292257e63a48e455f6fc0bc446c90214fc33679ea1deb17b0c31d6f125e2a
|
2018-11-15 07:23:06 +08:00
|
|
|
HEAD_REF master
|
2019-07-22 14:12:29 +08:00
|
|
|
PATCHES fix-static-build.patch
|
2018-11-15 07:23:06 +08:00
|
|
|
)
|
|
|
|
|
2019-07-22 14:12:29 +08:00
|
|
|
set(BUILD_WIN_STATIC OFF)
|
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(BUILD_WIN_STATIC ON)
|
|
|
|
endif()
|
|
|
|
|
2021-12-21 00:26:58 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-11-15 07:23:06 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTS:BOOL=OFF
|
2019-07-22 14:12:29 +08:00
|
|
|
-DBUILD_WIN_STATIC=${BUILD_WIN_STATIC}
|
2018-11-15 07:23:06 +08:00
|
|
|
)
|
|
|
|
|
2021-12-21 00:26:58 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-11-15 07:23:06 +08:00
|
|
|
|
|
|
|
# Move CMake config files to the right place
|
2021-12-21 00:26:58 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Cutelyst2Qt5)
|
2018-11-15 07:23:06 +08:00
|
|
|
|
2021-12-21 00:26:58 +08:00
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/cutelyst2" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2-wsgi" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2.exe" "${CURRENT_PACKAGES_DIR}/bin/cutelyst-wsgi2.exe")
|
|
|
|
file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-wsgi" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst-wsgi2.exe")
|
2018-11-15 07:23:06 +08:00
|
|
|
if(EXES OR DEBUG_EXES)
|
2021-12-21 00:26:58 +08:00
|
|
|
file(COPY ${EXES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/cutelyst2")
|
2018-11-15 07:23:06 +08:00
|
|
|
file(REMOVE ${EXES} ${DEBUG_EXES})
|
2021-12-21 00:26:58 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/cutelyst2")
|
2018-11-15 07:23:06 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-21 00:26:58 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins/ActionREST.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2-plugins")
|
2018-11-15 07:23:06 +08:00
|
|
|
endif()
|
2021-12-21 00:26:58 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins/ActionREST.dll")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-plugins")
|
2018-11-15 07:23:06 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-21 00:26:58 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2018-11-15 07:23:06 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-12-21 00:26:58 +08:00
|
|
|
configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/cutelyst2/copyright" COPYONLY)
|
2018-11-15 07:23:06 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2021-12-21 00:26:58 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
|
|
|
else()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|