mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:59:06 +08:00
[croncpp] Update to latest commit (#32368)
* update croncpp * update version * update portfile.cmake * update git-tree * update version format * update version --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
parent
9c2a4a1640
commit
936c5eeeb4
@ -1,82 +0,0 @@
|
||||
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
|
||||
|
@ -1,17 +0,0 @@
|
||||
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")
|
@ -1,26 +1,24 @@
|
||||
set(VCPKG_BUILD_TYPE release) # header-only port
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mariusbancila/croncpp
|
||||
REF 11cce4666a06c40346c7ba380ddd90c53806809d #master on 9/4/2020
|
||||
SHA512 8f4d892ce90d8eca3711b21728bb599bf64857b20c0b143c5277687d0b6e5d5b8bf3e6dc7f9e8d028ba4e5ee711a5a9e750bcc2f771177d2f659c0c19e12207a
|
||||
REF e817348a2dcd77b968c0b87a43274932b9800f4b # 2023-03-30
|
||||
SHA512 aee687f4e8d7ce85aa9ba3a9e551443353abc20af9face62b618ce55ffa7a4632a4cd0c02c46e43c52b7f1797d62006183776a2d7fad48473bb964af79c2d531
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-fix-cmake.patch
|
||||
no-test.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTS=OFF
|
||||
-DCRONCPP_BUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
"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.",
|
||||
"version-date": "2023-03-30",
|
||||
"description": "croncpp is a C++11/14/17 header-only cross-platform library for handling CRON expressions.",
|
||||
"homepage": "https://github.com/mariusbancila/croncpp",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
|
@ -1889,8 +1889,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"croncpp": {
|
||||
"baseline": "2020-09-04",
|
||||
"port-version": 3
|
||||
"baseline": "2023-03-30",
|
||||
"port-version": 0
|
||||
},
|
||||
"crossguid": {
|
||||
"baseline": "2021-10-22",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "13457e7a1989326119d3e30d7ce8c4d2809697c4",
|
||||
"version-date": "2023-03-30",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "0fb4aefe39d2d695cb5cc89a4f3c92e4229605f5",
|
||||
"version-date": "2020-09-04",
|
||||
|
Loading…
Reference in New Issue
Block a user