mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[libtcod] Add new port. (#16408)
* [libtcod] Add new port. * [lodepng-c] Add port lodepng-c, conflict with lodepng * [libtcode] Fix dependencies * [libtcod] Re-fix dependency utf8proc * update version record * [lodepng-c/lodepng] Add conflict message * add baseline * remove port-version * update port-version * update version record * [libtcod] Update to 1.16.6. Patches applied upstream. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
parent
aaa6a031ce
commit
cda58bef39
34
ports/libtcod/portfile.cmake
Normal file
34
ports/libtcod/portfile.cmake
Normal file
@ -0,0 +1,34 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libtcod/libtcod
|
||||
REF 1.16.6
|
||||
SHA512 88777acd89d5ab2541d8b5d2f6db966059b76501b591d6e1d782d0d39b0adbcb38be25c49716b6e581b4b0488bf2dbfc5b07452b80495365861cee97e5279bfd
|
||||
HEAD_REF develop
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=${CURRENT_PACKAGES_DIR}/include
|
||||
-DCMAKE_INSTALL_CONFIGDIR=share/libtcod
|
||||
-DLIBTCOD_SDL2=find_package
|
||||
-DLIBTCOD_ZLIB=find_package
|
||||
-DLIBTCOD_GLAD=find_package
|
||||
-DLIBTCOD_LODEPNG=find_package
|
||||
-DLIBTCOD_UTF8PROC=vcpkg
|
||||
-DLIBTCOD_STB=vcpkg
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(
|
||||
INSTALL "${SOURCE_PATH}/LICENSE.txt"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||
RENAME copyright
|
||||
)
|
16
ports/libtcod/vcpkg.json
Normal file
16
ports/libtcod/vcpkg.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "libtcod",
|
||||
"version-string": "1.16.6",
|
||||
"maintainers": "Kyle Benesch <4b796c65+github@gmail.com>",
|
||||
"description": "Common algorithms and tools for roguelikes.",
|
||||
"homepage": "https://github.com/libtcod/libtcod",
|
||||
"documentation": "https://libtcod.readthedocs.io/en/latest/",
|
||||
"dependencies": [
|
||||
"glad",
|
||||
"lodepng-c",
|
||||
"sdl2",
|
||||
"stb",
|
||||
"utf8proc",
|
||||
"zlib"
|
||||
]
|
||||
}
|
23
ports/lodepng-c/CMakeLists.txt
Normal file
23
ports/lodepng-c/CMakeLists.txt
Normal file
@ -0,0 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(lodepng-c C)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/lodepng.cpp ${CMAKE_CURRENT_LIST_DIR}/lodepng.c COPYONLY)
|
||||
add_library(lodepng-c lodepng.c)
|
||||
target_include_directories(lodepng-c PUBLIC
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-c-targets.cmake\")")
|
||||
install(FILES "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" DESTINATION "share/lodepng-c/")
|
||||
|
||||
install(TARGETS lodepng-c EXPORT lodepng-c-targets)
|
||||
|
||||
install(EXPORT lodepng-c-targets DESTINATION share/lodepng-c/)
|
||||
|
||||
if(NOT DDISABLE_INSTALL_EXAMPLES)
|
||||
install(DIRECTORY examples DESTINATION share/lodepng-c/)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES lodepng.h DESTINATION include)
|
||||
endif()
|
32
ports/lodepng-c/portfile.cmake
Normal file
32
ports/lodepng-c/portfile.cmake
Normal file
@ -0,0 +1,32 @@
|
||||
if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng/copyright)
|
||||
message(FATAL_ERROR "${PORT} conflict with lodepng, please remove lodepng before install ${PORT}.")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lvandeve/lodepng
|
||||
REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1
|
||||
SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
-DDDISABLE_INSTALL_EXAMPLES=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
6
ports/lodepng-c/vcpkg.json
Normal file
6
ports/lodepng-c/vcpkg.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "lodepng-c",
|
||||
"version-string": "2021-03-01",
|
||||
"description": "PNG encoder and decoder in C",
|
||||
"homepage": "https://github.com/lvandeve/lodepng"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
Source: lodepng
|
||||
Version: 2020-03-15
|
||||
Homepage: https://github.com/lvandeve/lodepng
|
||||
Description: PNG encoder and decoder in C and C++
|
@ -1,3 +1,6 @@
|
||||
if (EXISTS ${CURRENT_INSTALLED_DIR}/share/lodepng-c/copyright)
|
||||
message(FATAL_ERROR "${PORT} conflict with lodepng-c, please remove lodepng-c before install ${PORT}.")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
|
7
ports/lodepng/vcpkg.json
Normal file
7
ports/lodepng/vcpkg.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "lodepng",
|
||||
"version-string": "2020-03-15",
|
||||
"port-version": 1,
|
||||
"description": "PNG encoder and decoder in C++",
|
||||
"homepage": "https://github.com/lvandeve/lodepng"
|
||||
}
|
@ -852,6 +852,16 @@ llvm:arm64-windows=fail
|
||||
llvm:x64-uwp=fail
|
||||
lmdb:arm-uwp=fail
|
||||
lmdb:x64-uwp=fail
|
||||
# Conflict with loadpng-c
|
||||
lodepng:arm64-windows = skip
|
||||
lodepng:arm-uwp = skip
|
||||
lodepng:x64-linux = skip
|
||||
lodepng:x64-osx = skip
|
||||
lodepng:x64-uwp = skip
|
||||
lodepng:x64-windows = skip
|
||||
lodepng:x64-windows-static = skip
|
||||
lodepng:x64-windows-static-md=skip
|
||||
lodepng:x86-windows = skip
|
||||
log4cplus:arm-uwp=fail
|
||||
log4cplus:x64-uwp=fail
|
||||
log4cxx:arm-uwp=fail
|
||||
|
@ -3496,6 +3496,10 @@
|
||||
"baseline": "4.16.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libtcod": {
|
||||
"baseline": "1.16.6",
|
||||
"port-version": 0
|
||||
},
|
||||
"libtheora": {
|
||||
"baseline": "1.2.0alpha1-20170719",
|
||||
"port-version": 2
|
||||
@ -3670,6 +3674,10 @@
|
||||
},
|
||||
"lodepng": {
|
||||
"baseline": "2020-03-15",
|
||||
"port-version": 1
|
||||
},
|
||||
"lodepng-c": {
|
||||
"baseline": "2021-03-01",
|
||||
"port-version": 0
|
||||
},
|
||||
"log4cplus": {
|
||||
|
14
versions/l-/libtcod.json
Normal file
14
versions/l-/libtcod.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e2de0a47f3776252b6e04681c92d67b0730587ef",
|
||||
"version-string": "1.16.6",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "b4899dcf1740634e91d040b66259568ecafaa1b6",
|
||||
"version-string": "1.16.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/l-/lodepng-c.json
Normal file
9
versions/l-/lodepng-c.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "588b315ea040b1a598929e86260dadaec3cb15d0",
|
||||
"version-string": "2021-03-01",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c80237ed99bb9821134df9802930c54fd8c8ee90",
|
||||
"version-string": "2020-03-15",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "b7471b62d6bfd4288987cca4eb3d37b8eb287ed1",
|
||||
"version-string": "2020-03-15",
|
||||
|
Loading…
x
Reference in New Issue
Block a user