diff options
| author | Mikhail Paulyshka <me@mixaill.tk> | 2017-03-12 15:34:46 +0300 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-03-13 14:36:41 -0700 |
| commit | c71fffc32bbac7257230e30e8c5caa2fa8541133 (patch) | |
| tree | 7d189f328298911fd1730c085e3e8b126a5695c6 /ports/libpopt/cmake | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-c71fffc32bbac7257230e30e8c5caa2fa8541133.tar.gz vcpkg-c71fffc32bbac7257230e30e8c5caa2fa8541133.zip | |
[libpopt] add version 1.16
Diffstat (limited to 'ports/libpopt/cmake')
| -rw-r--r-- | ports/libpopt/cmake/CMakeLists.txt | 57 | ||||
| -rw-r--r-- | ports/libpopt/cmake/config.h.cmake | 61 | ||||
| -rw-r--r-- | ports/libpopt/cmake/popt.def | 50 |
3 files changed, 168 insertions, 0 deletions
diff --git a/ports/libpopt/cmake/CMakeLists.txt b/ports/libpopt/cmake/CMakeLists.txt new file mode 100644 index 000000000..84afc160d --- /dev/null +++ b/ports/libpopt/cmake/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.0) +project(popt VERSION 1.16 LANGUAGES C) + +set(PACKAGE "popt") +set(POPT_SYSCONFDIR "C:\\\\") +set(CMAKE_DEBUG_POSTFIX "d") + +file(GLOB SOURCES "popt.c" + "poptconfig.c" + "popthelp.c" + "poptint.c" + "poptparse.c" + "popt.def" +) + +option(POPT_USE_CONFIG "Use configuration file" OFF) + +if(POPT_USE_CONFIG) + include(CheckIncludeFile) + include(CheckFunctionExists) + + check_include_file(float.h HAVE_FLOAT_H) + check_include_file(fnmatch.h HAVE_FNMATCH_H) + check_include_file(glob.h HAVE_GLOB_H) + check_include_file(langinfo.h HAVE_LANGINFO_H) + check_include_file(libintl.h HAVE_LIBINTL_H) + check_include_file(mcheck.h HAVE_MCHECK_H) + check_include_file(unistd.h HAVE_UNISTD_H) + + + check_function_exists(gettext HAVE_GETTEXT) + check_function_exists(iconv HAVE_ICONV) + check_function_exists(mtrace HAVE_MTRACE) + check_function_exists(srandom HAVE_SRANDOM) + check_function_exists(stpcpy HAVE_STPCPY) + check_function_exists(strerror HAVE_STRERROR) + check_function_exists(vasprintf HAVE_VASPRINTF) + check_function_exists(__secure_getenv HAVE___SECURE_GETENV) + + configure_file(config.h.cmake config.h @ONLY) + add_definitions(-DHAVE_CONFIG_H) +endif() + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +include_directories(${CMAKE_BINARY_DIR}) + +add_library(popt ${SOURCES}) +set_target_properties(popt PROPERTIES COMPILE_FLAGS "/wd4996") + +install(TARGETS popt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES "popt.h" DESTINATION "include")
\ No newline at end of file diff --git a/ports/libpopt/cmake/config.h.cmake b/ports/libpopt/cmake/config.h.cmake new file mode 100644 index 000000000..f641fc73c --- /dev/null +++ b/ports/libpopt/cmake/config.h.cmake @@ -0,0 +1,61 @@ +#ifndef CONFIG_H +#define CONFIG_H + +/* Define to 1 if translation of program messages to the user's native language is requested. */ +#cmakedefine ENABLE_NLS 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. */ +#cmakedefine HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the <float.h> header file. */ +#cmakedefine HAVE_FLOAT_H 1 + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#cmakedefine HAVE_FNMATCH_H 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT 1 + +/* Define to 1 if you have the <glob.h> header file. */ +#cmakedefine HAVE_GLOB_H 1 + +/* Define if you have the iconv() function and it works. */ +#cmakedefine HAVE_ICONV 1 + +/* Define to 1 if you have the <langinfo.h> header file. */ +#cmakedefine HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the <libintl.h> header file. */ +#cmakedefine HAVE_LIBINTL_H 1 + +/* Define to 1 if you have the <mcheck.h> header file. */ +#cmakedefine HAVE_MCHECK_H 1 + +/* Define to 1 if you have the `mtrace' function. */ +#cmakedefine HAVE_MTRACE 1 + +/* Define to 1 if you have the `srandom' function. */ +#cmakedefine HAVE_SRANDOM 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#cmakedefine HAVE_STPCPY 1 + +/* Define to 1 if you have the `strerror' function. */ +#cmakedefine HAVE_STRERROR 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#cmakedefine HAVE_VASPRINTF 1 + +/* Define to 1 if you have the `__secure_getenv' function. */ +#cmakedefine HAVE___SECURE_GETENV 1 + +/* Name of package */ +#cmakedefine PACKAGE "@PACKAGE@" + +/* Full path to default POPT configuration directory */ +#cmakedefine POPT_SYSCONFDIR "@POPT_SYSCONFDIR@" + +#endif
\ No newline at end of file diff --git a/ports/libpopt/cmake/popt.def b/ports/libpopt/cmake/popt.def new file mode 100644 index 000000000..20bb70a18 --- /dev/null +++ b/ports/libpopt/cmake/popt.def @@ -0,0 +1,50 @@ +EXPORTS + _poptArgMask + _poptBitsK + _poptBitsM + _poptBitsN + _poptGroupMask + poptAddAlias + poptAddItem + poptAliasOptions + poptBadOption + poptBitsAdd + poptBitsArgs + poptBitsChk + poptBitsClr + poptBitsDel + poptBitsIntersect + poptBitsUnion + poptConfigFileToString + poptDupArgv + poptFini + poptFreeContext + poptGetArg + poptGetArgs + poptGetContext + poptGetInvocationName + poptGetNextOpt + poptGetOptArg + poptHelpOptions + poptInit + poptParseArgvString + poptPeekArg + poptPrintHelp + poptPrintUsage + poptReadConfigFile + poptReadConfigFiles + poptReadDefaultConfig + poptReadFile + poptResetContext + poptSaneFile + poptSaveBits + poptSaveInt + poptSaveLong + poptSaveLongLong + poptSaveShort + poptSaveString + poptSetExecPath + poptSetOtherOptionHelp + poptStrerror + poptStrippedArgv + poptStuffArgs
\ No newline at end of file |
