mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
commit
6dead992fa
115
ports/cgicc/CMakeLists.txt
Normal file
115
ports/cgicc/CMakeLists.txt
Normal file
@ -0,0 +1,115 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.8)
|
||||
project (cgicc)
|
||||
include (CheckIncludeFiles)
|
||||
include(CheckSymbolExists)
|
||||
include (CheckCXXSourceCompiles)
|
||||
|
||||
set (VERSION "3.2.19")
|
||||
execute_process (COMMAND hostname OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
check_include_files (dlfcn.h HAVE_DLFCN_H)
|
||||
check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
|
||||
check_include_files (inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_files (memory.h HAVE_MEMORY_H)
|
||||
|
||||
check_cxx_source_compiles ("
|
||||
namespace test { }
|
||||
int main(int, char**) {
|
||||
using namespace ::test;
|
||||
}" HAVE_NAMESPACES)
|
||||
check_include_files (stdint.h HAVE_STDINT_H)
|
||||
check_include_files (stdlib.h HAVE_STDLIB_H)
|
||||
set (CMAKE_REQUIRED_FLAGS "-DHAVE_NAMESPACES")
|
||||
check_cxx_source_compiles ("
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#ifdef HAVE_NAMESPACES
|
||||
using namespace std;
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
list<int> x; x.push_back(5);
|
||||
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
|
||||
;
|
||||
return 0;
|
||||
}" HAVE_STL)
|
||||
check_include_files (strings.h HAVE_STRINGS_H)
|
||||
check_include_files (string.h HAVE_STRING_H)
|
||||
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
|
||||
check_include_files (sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_files (sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H)
|
||||
check_symbol_exists (uname sys/utsname.h HAVE_UNAME)
|
||||
check_include_files (unistd.h HAVE_UNISTD_H)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h)
|
||||
add_definitions (-DHAVE_CONFIG_H)
|
||||
set (cgicc_SOURCES
|
||||
cgicc/CgiEnvironment.cpp
|
||||
cgicc/CgiInput.cpp
|
||||
cgicc/CgiUtils.cpp
|
||||
cgicc/Cgicc.cpp
|
||||
cgicc/FormEntry.cpp
|
||||
cgicc/FormFile.cpp
|
||||
cgicc/HTMLAttribute.cpp
|
||||
cgicc/HTMLAttributeList.cpp
|
||||
cgicc/HTMLDoctype.cpp
|
||||
cgicc/HTMLElement.cpp
|
||||
cgicc/HTMLElementList.cpp
|
||||
cgicc/HTTPContentHeader.cpp
|
||||
cgicc/HTTPCookie.cpp
|
||||
cgicc/HTTPHTMLHeader.cpp
|
||||
cgicc/HTTPHeader.cpp
|
||||
cgicc/HTTPPlainHeader.cpp
|
||||
cgicc/HTTPRedirectHeader.cpp
|
||||
cgicc/HTTPResponseHeader.cpp
|
||||
cgicc/HTTPStatusHeader.cpp
|
||||
cgicc/HTTPXHTMLHeader.cpp
|
||||
cgicc/MStreamable.cpp
|
||||
cgicc/XHTMLDoctype.cpp
|
||||
cgicc/XMLPI.cpp)
|
||||
set (cgicc_HEADERS
|
||||
cgicc/Cgicc.h
|
||||
cgicc/CgiEnvironment.h
|
||||
cgicc/CgiInput.h
|
||||
cgicc/CgiUtils.h
|
||||
cgicc/FormEntry.h
|
||||
cgicc/FormFile.h
|
||||
cgicc/HTMLAtomicElement.h
|
||||
cgicc/HTMLAttribute.h
|
||||
cgicc/HTMLAttributeList.h
|
||||
cgicc/HTMLBooleanElement.h
|
||||
cgicc/HTMLClasses.h
|
||||
cgicc/HTMLDoctype.h
|
||||
cgicc/HTMLElement.h
|
||||
cgicc/HTMLElementList.h
|
||||
cgicc/HTTPContentHeader.h
|
||||
cgicc/HTTPCookie.h
|
||||
cgicc/HTTPHeader.h
|
||||
cgicc/HTTPHTMLHeader.h
|
||||
cgicc/HTTPPlainHeader.h
|
||||
cgicc/HTTPRedirectHeader.h
|
||||
cgicc/HTTPResponseHeader.h
|
||||
cgicc/HTTPStatusHeader.h
|
||||
cgicc/HTTPXHTMLHeader.h
|
||||
cgicc/MStreamable.h
|
||||
cgicc/XHTMLDoctype.h
|
||||
cgicc/XMLDeclaration.h
|
||||
cgicc/XMLPI.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h
|
||||
)
|
||||
|
||||
include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS})
|
||||
|
||||
install(TARGETS cgicc
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES ${cgicc_HEADERS} DESTINATION include/cgicc)
|
||||
endif()
|
3
ports/cgicc/CONTROL
Normal file
3
ports/cgicc/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: cgicc
|
||||
Version: 3.2.19
|
||||
Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web
|
25
ports/cgicc/portfile.cmake
Normal file
25
ports/cgicc/portfile.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(WARNING "Warning: Dynamic building not supported. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cgicc-3.2.19)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://ftp.gnu.org/gnu/cgicc/cgicc-3.2.19.tar.gz"
|
||||
FILENAME "cgicc-3.2.19.tar.gz"
|
||||
SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgicc RENAME copyright)
|
Loading…
x
Reference in New Issue
Block a user