mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
parent
563166f21a
commit
0e23cd50fe
10
ports/llgl/CONTROL
Normal file
10
ports/llgl/CONTROL
Normal file
@ -0,0 +1,10 @@
|
||||
Source: llgl
|
||||
Version: 2019-08-15
|
||||
Homepage: https://github.com/LukasBanana/LLGL
|
||||
Description: Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal.
|
||||
|
||||
Feature: opengl
|
||||
Description: Support for opengl
|
||||
|
||||
Feature: direct3d11
|
||||
Description: Support for direct3d11
|
13
ports/llgl/fix-arm64-build-error.patch
Normal file
13
ports/llgl/fix-arm64-build-error.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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")
|
44
ports/llgl/fix-install-error.patch
Normal file
44
ports/llgl/fix-install-error.patch
Normal file
@ -0,0 +1,44 @@
|
||||
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 include)
|
||||
+
|
||||
|
41
ports/llgl/portfile.cmake
Normal file
41
ports/llgl/portfile.cmake
Normal file
@ -0,0 +1,41 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
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
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-error.patch
|
||||
fix-arm64-build-error.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
opengl LLGL_BUILD_RENDERER_OPENGL
|
||||
direct3d11 LLGL_BUILD_RENDERER_DIRECT3D11
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
|
Loading…
x
Reference in New Issue
Block a user