mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[stx] Updated STX port (#29392)
* updated stx package * added FEATURES to vcpkg_check_features * updated port version * applied format diff * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/stx/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * formatted manifest * formatted cmake * changed stx version to one with config exports * updated hash * removed fixup command * added git tree * updated json versions * formatted portfile * updated git tree sha * formatted portfile * reverted old version changes * formatted portfile * fixed sha * added blank line * removed host dependencies * formatted vcpkg.json * updated git tree * updated dependencies * reverted changes * update portfile.cmake * update version --------- Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
parent
469f99b868
commit
3f2f3ef820
@ -1,71 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e4ed99e..b0d2b15 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -204,12 +204,7 @@ endif()
|
||||
# ===============================================
|
||||
|
||||
if(STX_ENABLE_BACKTRACE)
|
||||
- if(NOT EXISTS third_party/abseil)
|
||||
- execute_process(
|
||||
- COMMAND git submodule update --init --recursive third_party/abseil
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||
- endif()
|
||||
- add_subdirectory(third_party/abseil)
|
||||
+ find_package(absl CONFIG REQUIRED)
|
||||
endif()
|
||||
|
||||
# the atomics library doesn't automatically link on my Android phone
|
||||
@@ -246,13 +241,17 @@ else()
|
||||
add_library(stx STATIC ${STX_SRCS})
|
||||
endif()
|
||||
|
||||
-target_include_directories(stx PUBLIC include)
|
||||
+target_include_directories(stx PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
+)
|
||||
+
|
||||
target_compile_options(stx PRIVATE ${STX_FLAGS} ${STX_WARNING_FLAGS})
|
||||
target_compile_definitions(stx PUBLIC ${STX_COMPILER_DEFS})
|
||||
target_link_libraries(stx ${STX_LIB_DEPENDENCIES})
|
||||
|
||||
if(STX_ENABLE_BACKTRACE)
|
||||
- target_link_libraries(stx absl::stacktrace absl::symbolize)
|
||||
+ target_link_libraries(stx PUBLIC absl::stacktrace absl::symbolize)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
@@ -288,6 +287,7 @@ endif()
|
||||
#
|
||||
# ===============================================
|
||||
|
||||
+
|
||||
if(STX_BUILD_BENCHMARKS)
|
||||
|
||||
if(NOT EXISTS third_party/benchmark)
|
||||
@@ -433,3 +433,24 @@ if(STX_BUILD_DOCS)
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/docs/html/assets)
|
||||
|
||||
endif()
|
||||
+
|
||||
+install(
|
||||
+ TARGETS stx
|
||||
+ EXPORT stx
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
+
|
||||
+install(
|
||||
+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
|
||||
+ DESTINATION include
|
||||
+ FILES_MATCHING PATTERN "*.h*")
|
||||
+
|
||||
+install(
|
||||
+ EXPORT stx
|
||||
+ DESTINATION share/stx
|
||||
+ FILE stxConfig.cmake
|
||||
+ NAMESPACE stx::
|
||||
+)
|
||||
+
|
@ -3,33 +3,25 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lamarrr/STX
|
||||
REF v1.0.1
|
||||
SHA512 544ca32f07cd863082fa9688f5d56e2715b0129ff90d2a8533cc24a92c943e5848c4b2b06a71f54c12668f6e89e9e3c649f595f9eb886f671a5fa18d343f794b
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"CMakeLists.patch"
|
||||
REF "v${VERSION}"
|
||||
SHA512 fb4c6bece76a7d2503e6f9c6121cbb011bb6d3765629223952b456f3e4f1c0e3fffd50114ace988fe842ede8ef9243c24680832c334bb8c4dabb55f64f43294f
|
||||
HEAD_REF main
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
backtrace STX_ENABLE_BACKTRACE
|
||||
FEATURES
|
||||
backtrace STX_ENABLE_BACKTRACE
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DSTX_BUILD_DOCS=OFF
|
||||
-DSTX_BUILD_BENCHMARKS=OFF
|
||||
-DSTX_BUILD_SHARED=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/stx)
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,15 +1,23 @@
|
||||
{
|
||||
"name": "stx",
|
||||
"version-string": "1.0.1",
|
||||
"port-version": 1,
|
||||
"description": "C++17 & C++ 20 error-handling and utility extensions",
|
||||
"version": "0.0.3",
|
||||
"description": "STX is a collection of libraries and utilities designed to make working with C++ easier and less error-prone.",
|
||||
"homepage": "https://github.com/lamarrr/STX",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"abseil",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"backtrace": {
|
||||
"description": "stacktrace support for STX",
|
||||
"dependencies": [
|
||||
"abseil"
|
||||
]
|
||||
"description": "stacktrace support for STX"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7537,8 +7537,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"stx": {
|
||||
"baseline": "1.0.1",
|
||||
"port-version": 1
|
||||
"baseline": "0.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"stxxl": {
|
||||
"baseline": "2018-11-15",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "030c04f78e98a9dbda976ba51350fb16391781fe",
|
||||
"version": "0.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "700e84d6f57c5a4631d378525207a0265715e9c3",
|
||||
"version-string": "1.0.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user