2020-01-07 06:33:00 +08:00
|
|
|
set(CGICC_VERSION 3.2.19)
|
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
|
2020-01-07 06:33:00 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz"
|
|
|
|
FILENAME "cgicc-${CGICC_VERSION}.tar.gz"
|
2018-01-20 22:18:36 +08:00
|
|
|
SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf
|
|
|
|
)
|
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}"
|
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)
|