[im3d] New port (#27198)

* [im3d] New port

* [im3d] Update version files

* [im3d] Add license field

* [im3d] Add missing version file

* [im3d] CMakeLists.txt fixes

* [im3d] Update version files
This commit is contained in:
Rémy Tassoux 2022-10-15 01:14:38 +02:00 committed by GitHub
parent cd4fcc1a22
commit 5aabf6dd69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 98 additions and 0 deletions

44
ports/im3d/CMakeLists.txt Normal file
View File

@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.8)
project(im3d)
set(CMAKE_CXX_STANDARD 11)
add_library(${PROJECT_NAME} "")
target_include_directories(
${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
target_sources(
${PROJECT_NAME}
PRIVATE
im3d.cpp
)
install(
TARGETS ${PROJECT_NAME}
EXPORT unofficial-${PROJECT_NAME}-target
ARCHIVE DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
)
if (NOT IM3D_SKIP_HEADERS)
install(
FILES
im3d.h
im3d_config.h
im3d_math.h
DESTINATION include
)
endif()
install(
EXPORT unofficial-${PROJECT_NAME}-target
NAMESPACE unofficial::${PROJECT_NAME}::
FILE unofficial-${PROJECT_NAME}-config.cmake
DESTINATION share/unofficial-${PROJECT_NAME}
)

24
ports/im3d/portfile.cmake Normal file
View File

@ -0,0 +1,24 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO john-chapman/im3d
REF 651220df4d595ff3d7ac5c1a64b3355774e86bc8
SHA512 0a117bddcf2de51870367a0d6d2753d9b691466427c5942be448d9930fac41fd8502788d76162831686f50f880a6b0a7fad541a380598c830ff8f44670f29381
HEAD_REF master
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DIM3D_SKIP_HEADERS=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT})
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

17
ports/im3d/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "im3d",
"version-date": "2022-10-11",
"description": "Immediate mode rendering and 3d gizmos",
"homepage": "https://github.com/john-chapman/im3d",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -3056,6 +3056,10 @@
"baseline": "3",
"port-version": 0
},
"im3d": {
"baseline": "2022-10-11",
"port-version": 0
},
"imath": {
"baseline": "3.1.5",
"port-version": 0

9
versions/i-/im3d.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "98557d4600a307373f8424d7d770bf4d64b04d10",
"version-date": "2022-10-11",
"port-version": 0
}
]
}