2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2018-01-20 22:18:36 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2024-02-08 04:33:25 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${VERSION}.tar.gz"
|
|
|
|
FILENAME "cgicc-${VERSION}.tar.gz"
|
|
|
|
SHA512 e57b8f30b26b29008bcf1ffc3b2d272bdbd77848fb02e24912b6182ae90923d5933b9d204c556ac922a389f73ced465065b6e2202fc0c3d008e0e6038e7c8052
|
2018-01-20 22:18:36 +08:00
|
|
|
)
|
2019-09-19 01:04:51 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2020-01-11 07:51:51 +08:00
|
|
|
PATCHES
|
|
|
|
fix-define.patch
|
|
|
|
fix-static-build.patch
|
2019-09-19 01:04:51 +08:00
|
|
|
)
|
2018-01-20 22:18:36 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2018-01-20 22:18:36 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2024-06-12 04:26:30 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_CXX_STANDARD=11 # 17 removes std::unary_function
|
2019-09-19 01:04:51 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDISABLE_INSTALL_HEADERS=ON
|
|
|
|
-DDISABLE_INSTALL_TOOLS=ON
|
2018-01-20 22:18:36 +08:00
|
|
|
)
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-01-20 22:18:36 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h" CGI_H)
|
2020-01-11 07:51:51 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
string(REPLACE "# ifdef CGICC_STATIC" "# if 0" CGI_H "${CGI_H}")
|
|
|
|
else()
|
|
|
|
string(REPLACE "# ifdef CGICC_STATIC" "# if 1" CGI_H "${CGI_H}")
|
|
|
|
endif()
|
2023-03-07 07:44:04 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h" "${CGI_H}")
|
2020-01-11 07:51:51 +08:00
|
|
|
|
|
|
|
|
2023-03-07 07:44:04 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING.DOC" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|