early-access version 2853
This commit is contained in:
82
externals/vcpkg/ports/croncpp/0001-fix-cmake.patch
vendored
Executable file
82
externals/vcpkg/ports/croncpp/0001-fix-cmake.patch
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
From 30db118abd484c59efada27d9d6956b5f68bcee6 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Kesterson <robert.d.kesterson@leidos.com>
|
||||
Date: Fri, 4 Sep 2020 16:31:55 +0000
|
||||
Subject: [PATCH] vcpkg
|
||||
|
||||
---
|
||||
CMakeLists.txt | 47 +++++++++++++++++++++++++++++++++++++++++++--
|
||||
croncppConfig.cmake | 1 +
|
||||
2 files changed, 46 insertions(+), 2 deletions(-)
|
||||
create mode 100644 croncppConfig.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9114b39..8d46e6b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.7.0)
|
||||
-project(croncpp)
|
||||
+project(croncpp VERSION 1.0.0)
|
||||
|
||||
if(WIN32)
|
||||
message(status "Setting MSVC flags")
|
||||
@@ -24,4 +24,47 @@ if(BUILD_TESTS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(benchmark)
|
||||
-add_subdirectory(test)
|
||||
\ No newline at end of file
|
||||
+add_subdirectory(test)
|
||||
+
|
||||
+add_library( croncpp INTERFACE )
|
||||
+add_library( croncpp::croncpp ALIAS croncpp )
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+target_include_directories( croncpp INTERFACE
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
+ $<INSTALL_INTERFACE:include> )
|
||||
+
|
||||
+if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
|
||||
+ # public headers will get installed:
|
||||
+ set_target_properties( croncpp PROPERTIES PUBLIC_HEADER include/croncpp.h )
|
||||
+endif ()
|
||||
+
|
||||
+
|
||||
+set( version_config "${CMAKE_CURRENT_BINARY_DIR}/croncppConfigVersion.cmake" )
|
||||
+
|
||||
+include( CMakePackageConfigHelpers )
|
||||
+write_basic_package_version_file( "${version_config}"
|
||||
+ VERSION ${PROJECT_VERSION}
|
||||
+ COMPATIBILITY SameMajorVersion )
|
||||
+
|
||||
+message(STATUS "CMAKE_INSTALL_INCLUDEDIR = ${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
+
|
||||
+install( TARGETS croncpp
|
||||
+ EXPORT croncppConfig
|
||||
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp )
|
||||
+export( TARGETS croncpp NAMESPACE croncpp:: FILE croncppTargets.cmake )
|
||||
+if (CMAKE_VERSION VERSION_LESS 3.15)
|
||||
+ install(
|
||||
+ FILES include/croncpp.h
|
||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp )
|
||||
+endif ()
|
||||
+
|
||||
+set( CONFIG_LOC "share/croncpp" )
|
||||
+
|
||||
+install( EXPORT croncppConfig
|
||||
+ FILE croncppTargets.cmake
|
||||
+ NAMESPACE croncpp::
|
||||
+ DESTINATION ${CONFIG_LOC} )
|
||||
+install (
|
||||
+ FILES croncppConfig.cmake "${version_config}"
|
||||
+ DESTINATION ${CONFIG_LOC})
|
||||
diff --git a/croncppConfig.cmake b/croncppConfig.cmake
|
||||
new file mode 100644
|
||||
index 0000000..3c4702c
|
||||
--- /dev/null
|
||||
+++ b/croncppConfig.cmake
|
||||
@@ -0,0 +1 @@
|
||||
+include( "${CMAKE_CURRENT_LIST_DIR}/croncppTargets.cmake" )
|
||||
--
|
||||
2.20.1
|
||||
|
17
externals/vcpkg/ports/croncpp/no-test.patch
vendored
Executable file
17
externals/vcpkg/ports/croncpp/no-test.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index a82e605..405f306 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
+if(BUILD_TESTS)
|
||||
cmake_minimum_required(VERSION 3.7.0)
|
||||
project(test_croncpp)
|
||||
|
||||
@@ -9,7 +10,6 @@ file(GLOB SOURCES "*.cpp" "include/*.cpp")
|
||||
|
||||
add_executable(test_croncpp ${SOURCES} ${headers})
|
||||
|
||||
-if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
|
||||
add_test(NAME "test_croncpp" COMMAND "test_croncpp" "-r compact")
|
26
externals/vcpkg/ports/croncpp/portfile.cmake
vendored
Executable file
26
externals/vcpkg/ports/croncpp/portfile.cmake
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mariusbancila/croncpp
|
||||
REF 11cce4666a06c40346c7ba380ddd90c53806809d #master on 9/4/2020
|
||||
SHA512 8f4d892ce90d8eca3711b21728bb599bf64857b20c0b143c5277687d0b6e5d5b8bf3e6dc7f9e8d028ba4e5ee711a5a9e750bcc2f771177d2f659c0c19e12207a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix-cmake.patch
|
||||
no-test.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
18
externals/vcpkg/ports/croncpp/vcpkg.json
vendored
Executable file
18
externals/vcpkg/ports/croncpp/vcpkg.json
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "croncpp",
|
||||
"version-date": "2020-09-04",
|
||||
"port-version": 3,
|
||||
"description": "croncpp is a C++17 header-only cross-platform library for handling CRON expressions.",
|
||||
"homepage": "https://github.com/mariusbancila/croncpp",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user