mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:53:22 +08:00
[flecs] Add new port (#24980)
* [flecs] Add new port Fix #10774. * [flecs] Add version stuffs * [flecs] Disable UWP support GetModuleHandle doesn't support UWP. * [flecs] Overwrite version * [flecs] Add vcpkg-cmake-wrapper.cmake * [flecs] Overwrite version
This commit is contained in:
parent
018b48e777
commit
2d2f0230e7
37
ports/flecs/portfile.cmake
Normal file
37
ports/flecs/portfile.cmake
Normal file
@ -0,0 +1,37 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO SanderMertens/flecs
|
||||
REF v2.4.8
|
||||
SHA512 4d4ee41a457f6e13b5913bbc12f66dc9a3bcab3f39ad398da55892bb80649cf416d82255f17bbcef4fee11992028cbb2972d0e9e435435cb58a7b33ec2ebe526
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLECS_STATIC_LIBS)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLECS_SHARED_LIBS)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DFLECS_STATIC_LIBS=${FLECS_STATIC_LIBS}
|
||||
-DFLECS_SHARED_LIBS=${FLECS_SHARED_LIBS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(FLECS_STATIC_LIBS)
|
||||
vcpkg_replace_string(
|
||||
"${CURRENT_PACKAGES_DIR}/include/${PORT}/bake_config.h"
|
||||
"#ifndef flecs_STATIC"
|
||||
"#if 0 // #ifndef flecs_STATIC"
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
9
ports/flecs/vcpkg-cmake-wrapper.cmake
Normal file
9
ports/flecs/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
_find_package(${ARGS})
|
||||
|
||||
if(TARGET flecs::flecs AND NOT TARGET flecs::flecs_static)
|
||||
add_library(flecs::flecs_static INTERFACE IMPORTED)
|
||||
set_target_properties(flecs::flecs_static PROPERTIES INTERFACE_LINK_LIBRARIES flecs::flecs)
|
||||
elseif(TARGET flecs::flecs_static AND NOT TARGET flecs::flecs)
|
||||
add_library(flecs::flecs INTERFACE IMPORTED)
|
||||
set_target_properties(flecs::flecs PROPERTIES INTERFACE_LINK_LIBRARIES flecs::flecs_static)
|
||||
endif()
|
18
ports/flecs/vcpkg.json
Normal file
18
ports/flecs/vcpkg.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "flecs",
|
||||
"version": "2.4.8",
|
||||
"description": "A fast entity component system (ECS) for C & C++",
|
||||
"homepage": "https://github.com/SanderMertens/flecs",
|
||||
"license": "MIT",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -2252,6 +2252,10 @@
|
||||
"baseline": "2.0.6",
|
||||
"port-version": 0
|
||||
},
|
||||
"flecs": {
|
||||
"baseline": "2.4.8",
|
||||
"port-version": 0
|
||||
},
|
||||
"flint": {
|
||||
"baseline": "2.8.0",
|
||||
"port-version": 1
|
||||
|
9
versions/f-/flecs.json
Normal file
9
versions/f-/flecs.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c39673b97267a414e46e47f526b48ca9c6b3b246",
|
||||
"version": "2.4.8",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user