mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[whereami] Add new port (#49023)
This commit is contained in:
41
ports/whereami/CMakeLists.txt
Normal file
41
ports/whereami/CMakeLists.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(whereami)
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION_STRING})
|
||||
|
||||
add_library(whereami STATIC src/whereami.c src/whereami.h)
|
||||
add_library(whereami::whereami ALIAS whereami)
|
||||
target_include_directories(whereami PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
|
||||
|
||||
set_target_properties(whereami PROPERTIES PUBLIC_HEADER "src/whereami.h")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS whereami
|
||||
EXPORT whereamiTargets
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
# Create and install package files
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/unofficial-whereamiConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/unofficial-whereamiConfig.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-whereami
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
write_basic_package_version_file(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/unofficial-whereamiConfigVersion.cmake
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/unofficial-whereamiConfig.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/unofficial-whereamiConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-whereami
|
||||
)
|
||||
|
||||
# Export Targets and install that to unofficial-whereamiTargets.cmake
|
||||
install(
|
||||
EXPORT whereamiTargets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-whereami
|
||||
NAMESPACE unofficial::whereami::
|
||||
FILE unofficial-whereamiTargets.cmake
|
||||
)
|
||||
21
ports/whereami/portfile.cmake
Normal file
21
ports/whereami/portfile.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO gpakosz/whereami
|
||||
REF dcb52a058dc14530ba9ae05e4339bd3ddfae0e0e
|
||||
SHA512 afd5999316c398218d8a401b6dc6a9885c9e474bde6804f464d55eca42fdee126329856da5b337bdfad5582e6ed1364fc86a47c92b49b6d57f1bea4e3d5120e0
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-whereamiConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DPROJECT_VERSION_STRING=${VERSION})
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-whereami CONFIG_PATH "lib/cmake/unofficial-whereami")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.MIT" "${SOURCE_PATH}/LICENSE.WTFPLv2")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
3
ports/whereami/unofficial-whereamiConfig.cmake.in
Normal file
3
ports/whereami/unofficial-whereamiConfig.cmake.in
Normal file
@@ -0,0 +1,3 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-whereamiTargets.cmake")
|
||||
17
ports/whereami/vcpkg.json
Normal file
17
ports/whereami/vcpkg.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "whereami",
|
||||
"version-date": "2024-08-26",
|
||||
"description": "A drop-in two files library to locate the current executable and the current module on the file system.",
|
||||
"homepage": "https://github.com/gpakosz/whereami",
|
||||
"license": "MIT OR WTFPL",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -10564,6 +10564,10 @@
|
||||
"baseline": "2019-08-13",
|
||||
"port-version": 2
|
||||
},
|
||||
"whereami": {
|
||||
"baseline": "2024-08-26",
|
||||
"port-version": 0
|
||||
},
|
||||
"whisper-cpp": {
|
||||
"baseline": "1.8.2",
|
||||
"port-version": 0
|
||||
|
||||
9
versions/w-/whereami.json
Normal file
9
versions/w-/whereami.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4256f3652c35f4756569b8c241d09f7bf05bf48e",
|
||||
"version-date": "2024-08-26",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user