early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,28 @@
diff --git a/docopt.h b/docopt.h
index 4c40741..06a04f8 100644
--- a/docopt.h
+++ b/docopt.h
@@ -85,6 +85,9 @@ namespace docopt {
bool help = true,
std::string const& version = {},
bool options_first = false) noexcept;
+
+ /// Write out the contents to the ostream
+ std::ostream DOCOPT_API & operator<<(std::ostream&, value const&);
}
#ifdef DOCOPT_HEADER_ONLY
diff --git a/docopt_value.h b/docopt_value.h
index a923219..7f0d6d6 100644
--- a/docopt_value.h
+++ b/docopt_value.h
@@ -102,9 +102,6 @@ namespace docopt {
Kind kind = Kind::Empty;
Variant variant {};
};
-
- /// Write out the contents to the ostream
- std::ostream& operator<<(std::ostream&, value const&);
}
namespace std {

View File

@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1aba5ae..5407e4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,7 +113,10 @@ endif()
set(export_name "docopt-targets")
# Runtime package
-install(TARGETS docopt EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(TARGETS docopt EXPORT ${export_name}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# Development package
install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bff867c..cc7d706 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,13 +113,15 @@ endif()
set(export_name "docopt-targets")
# Runtime package
+if(BUILD_SHARED_LIBS)
install(TARGETS docopt EXPORT ${export_name}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-
+else()
# Development package
install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif()
install(FILES ${docopt_HEADERS} DESTINATION include/docopt)
# CMake Package

44
externals/vcpkg/ports/docopt/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,44 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO docopt/docopt.cpp
REF 7476f8e56b4650aaeafb4e1cda2e5d8f01fddd97
SHA512 6765e8a3a834ad75bd87effee5ac7e174482039d26015346b95d7d64e4e0097cc3f1f2e6fd9e3e5970bf4c5719095c0a3e5edfac18217913dc88fbe569d37ae8
HEAD_REF master
PATCHES
001-fix-unresolved-symbol.patch
002-fix-install-path.patch
install-one-flavor.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DWITH_EXAMPLE=OFF
-DWITH_TESTS=OFF
-DUSE_BOOST_REGEX=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/docopt)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(READ ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h _contents)
string(REPLACE "#ifdef DOCOPT_DLL" "#if 1" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h "${_contents}")
endif()
# Header-only style when DOCOPT_HEADER_ONLY is defined
file(COPY
${SOURCE_PATH}/docopt.cpp
DESTINATION ${CURRENT_PACKAGES_DIR}/include/docopt)
# Handle copyright
file(INSTALL
${SOURCE_PATH}/LICENSE-MIT
DESTINATION ${CURRENT_PACKAGES_DIR}/share/docopt RENAME copyright)
vcpkg_copy_pdbs()

6
externals/vcpkg/ports/docopt/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,6 @@
{
"name": "docopt",
"version-string": "2018-11-01",
"port-version": 1,
"description": "Command line arguments parser that will make you smile (C++11 port)."
}