mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 05:59:07 +08:00
[LLGL] update (#30072)
This commit is contained in:
parent
4aac45ca53
commit
f3ebb73184
@ -1,13 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f440884..f1a9190 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -559,6 +559,8 @@ if(APPLE)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
target_link_libraries(LLGL X11 pthread Xxf86vm Xrandr)
|
||||
+elseif(WIN32)
|
||||
+ target_link_libraries(LLGL gdi32 shell32)
|
||||
endif()
|
||||
|
||||
set_target_properties(LLGL PROPERTIES LINKER_LANGUAGE CXX DEBUG_POSTFIX "D")
|
@ -1,44 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f440884..d1b0c2f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -614,6 +614,12 @@ if(LLGL_BUILD_RENDERER_OPENGL)
|
||||
target_link_libraries(LLGL_OpenGL LLGL ${OPENGL_LIBRARIES})
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_OPENGL)
|
||||
+
|
||||
+ install(TARGETS LLGL_OpenGL
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ )
|
||||
else()
|
||||
message("Missing OpenGL -> LLGL_OpenGL renderer will be excluded from project")
|
||||
endif()
|
||||
@@ -681,6 +687,12 @@ if(WIN32)
|
||||
target_link_libraries(LLGL_Direct3D11 LLGL d3d11 dxgi D3DCompiler)
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_DIRECT3D11)
|
||||
+
|
||||
+ install(TARGETS LLGL_Direct3D11
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ )
|
||||
endif()
|
||||
|
||||
if(LLGL_BUILD_RENDERER_DIRECT3D12)
|
||||
@@ -821,4 +833,13 @@ if(LLGL_ENABLE_SPIRV_REFLECT)
|
||||
message("Including Submodule: SPIRV")
|
||||
endif()
|
||||
|
||||
+# Install targets
|
||||
+install(TARGETS ${PROJECT_NAME}
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+)
|
||||
+# Install headers
|
||||
+install(DIRECTORY ${PROJECT_INCLUDE_DIR} DESTINATION .)
|
||||
+
|
||||
|
113
ports/llgl/install.patch
Normal file
113
ports/llgl/install.patch
Normal file
@ -0,0 +1,113 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f4c8b497..ff922fd6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -729,8 +729,12 @@ else()
|
||||
set(SUMMARY_LIBRARY_TYPE "Shared")
|
||||
add_library(LLGL SHARED ${FilesLLGL})
|
||||
endif()
|
||||
+set(all_targets LLGL)
|
||||
|
||||
-target_include_directories(LLGL PUBLIC ${PROJECT_INCLUDE_DIR})
|
||||
+include(GNUInstallDirs)
|
||||
+target_include_directories(LLGL INTERFACE
|
||||
+ $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
if(LLGL_ANDROID_PLATFORM)
|
||||
target_link_libraries(LLGL android log)
|
||||
@@ -763,6 +767,8 @@ if(LLGL_BUILD_RENDERER_NULL)
|
||||
target_link_libraries(LLGL_Null LLGL ${OPENGL_LIBRARIES})
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_NULL)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_Null)
|
||||
endif()
|
||||
|
||||
if(LLGL_BUILD_RENDERER_OPENGLES3)
|
||||
@@ -788,6 +794,8 @@ if(LLGL_BUILD_RENDERER_OPENGLES3)
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_OPENGLES3)
|
||||
ADD_PROJECT_DEFINE(LLGL_OpenGLES3 LLGL_OPENGLES3)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_OpenGLES3)
|
||||
else()
|
||||
message("Missing OpenGLES -> LLGL_OpenGLES3 renderer will be excluded from project")
|
||||
endif()
|
||||
@@ -816,6 +824,8 @@ if(LLGL_BUILD_RENDERER_OPENGL)
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_OPENGL)
|
||||
ADD_PROJECT_DEFINE(LLGL_OpenGL LLGL_OPENGL)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_OpenGL)
|
||||
else()
|
||||
message("Missing OpenGL -> LLGL_OpenGL renderer will be excluded from project")
|
||||
endif()
|
||||
@@ -838,6 +848,8 @@ if(NOT APPLE AND LLGL_BUILD_RENDERER_VULKAN)
|
||||
target_link_libraries(LLGL_Vulkan LLGL ${Vulkan_LIBRARY})
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_VULKAN)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_Vulkan)
|
||||
else()
|
||||
message("Missing Vulkan -> LLGL_Vulkan renderer will be excluded from project")
|
||||
endif()
|
||||
@@ -869,6 +881,8 @@ if(APPLE AND LLGL_BUILD_RENDERER_METAL)
|
||||
endif()
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_METAL)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_Metal)
|
||||
else()
|
||||
message("Missing Metal/MetalKit -> LLGL_Metal renderer will be excluded from project")
|
||||
endif()
|
||||
@@ -888,6 +902,8 @@ if(WIN32)
|
||||
target_link_libraries(LLGL_Direct3D11 LLGL d3d11 dxgi D3DCompiler)
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_DIRECT3D11)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_Direct3D11)
|
||||
endif()
|
||||
|
||||
if(LLGL_BUILD_RENDERER_DIRECT3D12)
|
||||
@@ -904,6 +920,8 @@ if(WIN32)
|
||||
target_compile_definitions(LLGL_Direct3D12 PUBLIC -DLLGL_DX_ENABLE_D3D12)
|
||||
|
||||
ADD_DEFINE(LLGL_BUILD_RENDERER_DIRECT3D12)
|
||||
+
|
||||
+ list(APPEND all_targets LLGL_Direct3D12)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -994,6 +1012,20 @@ if(WIN32 AND LLGL_BUILD_WRAPPER_CSHARP)
|
||||
add_subdirectory(Wrapper/CSharp)
|
||||
endif()
|
||||
|
||||
+# Install targets
|
||||
+install(TARGETS ${all_targets} EXPORT LLGLTargets RUNTIME LIBRARY ARCHIVE)
|
||||
+# Install headers
|
||||
+install(DIRECTORY "${PROJECT_INCLUDE_DIR}/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
+# Install CMake config files
|
||||
+install(EXPORT LLGLTargets NAMESPACE LLGL:: DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/LLGL")
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/LLGLConfig.cmake"
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LLGL
|
||||
+)
|
||||
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LLGLConfig.cmake"
|
||||
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/LLGL"
|
||||
+)
|
||||
# Summary Information
|
||||
message("~~~ Build Summary ~~~")
|
||||
|
||||
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
|
||||
new file mode 100644
|
||||
index 00000000..aa67a9e4
|
||||
--- /dev/null
|
||||
+++ b/cmake/Config.cmake.in
|
||||
@@ -0,0 +1,5 @@
|
||||
+@PACKAGE_INIT@
|
||||
+
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/LLGLTargets.cmake")
|
||||
+
|
||||
+check_required_components(@PROJECT_NAME@)
|
@ -1,30 +1,42 @@
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} currently doesn't supports UWP.")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO LukasBanana/LLGL
|
||||
REF 8f28437960ed60622e94f4f97b24e842b5a0e9e6
|
||||
SHA512 8a6bd4109e977f9def0f04a3d31f7bd4beebbe162c52eaa08a54daf8335871615215ece166e5a9d5b5475b834fd53a26ff9638ff270a2f00c88bab21ed156760
|
||||
REF df46af8974ac6d4f955e76d01b80a8c7e00f1fc8
|
||||
SHA512 a6e11573759ced048cc9b9b97dd6abbfb70cbc29770e040b0472d529a1cff14e529b7ed62e647d9b318f6633a41918a29d66762da08e4b093582e1a45284e6d3
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-error.patch
|
||||
fix-arm64-build-error.patch
|
||||
install.patch # See https://github.com/LukasBanana/LLGL/pull/81
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
opengl LLGL_BUILD_RENDERER_OPENGL
|
||||
opengl LLGL_BUILD_RENDERER_OPENGL_ES3
|
||||
direct3d11 LLGL_BUILD_RENDERER_DIRECT3D11
|
||||
direct3d12 LLGL_BUILD_RENDERER_DIRECT3D12
|
||||
metal LLGL_BUILD_RENDERER_METAL
|
||||
vulkan LLGL_BUILD_RENDERER_VULKAN
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_ANDROID)
|
||||
set(maybe_unused "LLGL_BUILD_RENDERER_OPENGL")
|
||||
else()
|
||||
set(maybe_unused "LLGL_BUILD_RENDERER_OPENGL_ES3")
|
||||
endif()
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LLGL_BUILD_STATIC_LIB)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES ${maybe_unused}
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DLLGL_BUILD_STATIC_LIB=${LLGL_BUILD_STATIC_LIB}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LLGL)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
@ -34,4 +46,4 @@ endif()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,22 +1,42 @@
|
||||
{
|
||||
"name": "llgl",
|
||||
"version-string": "2019-08-15",
|
||||
"port-version": 3,
|
||||
"version-date": "2023-03-05",
|
||||
"description": "Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal.",
|
||||
"homepage": "https://github.com/LukasBanana/LLGL",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"direct3d11": {
|
||||
"description": "Support for direct3d11"
|
||||
"description": "Support for direct3d11",
|
||||
"supports": "windows"
|
||||
},
|
||||
"direct3d12": {
|
||||
"description": "Support for direct3d12",
|
||||
"supports": "windows"
|
||||
},
|
||||
"metal": {
|
||||
"description": "Support for metal",
|
||||
"supports": "osx | ios"
|
||||
},
|
||||
"opengl": {
|
||||
"description": "Support for opengl"
|
||||
},
|
||||
"vulkan": {
|
||||
"description": "Support for vulkan",
|
||||
"supports": "!osx",
|
||||
"dependencies": [
|
||||
"vulkan"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -524,8 +524,6 @@ live555:arm64-osx=fail
|
||||
live555:x64-uwp=fail
|
||||
# fails due to an outdated gcc version
|
||||
llfio:x64-linux=fail
|
||||
llgl:arm-uwp=fail
|
||||
llgl:x64-uwp=fail
|
||||
log4cplus:arm-uwp=fail
|
||||
log4cplus:x64-uwp=fail
|
||||
log4cxx:arm-uwp=fail
|
||||
|
@ -4781,8 +4781,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"llgl": {
|
||||
"baseline": "2019-08-15",
|
||||
"port-version": 3
|
||||
"baseline": "2023-03-05",
|
||||
"port-version": 0
|
||||
},
|
||||
"llhttp": {
|
||||
"baseline": "8.1.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "fb900b4d6f95560eda75b56df1d0dd5b072c63bc",
|
||||
"version-date": "2023-03-05",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "9082946cd9da5bc58319a8280b80c20be4cc0023",
|
||||
"version-string": "2019-08-15",
|
||||
|
Loading…
Reference in New Issue
Block a user