mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 22:10:04 +08:00
[minifb] Bump to 2023-02-03 (#29316)
* Bump to 2023-02-03 * update version database * Remove unnecessary entries from `ci.baseline.txt`. --------- Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
fa438cf4bc
commit
9aa9cc5e70
@ -1,40 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 06ba472..0f5874c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -54,6 +54,27 @@ add_library(minifb STATIC
|
||||
${SrcLib}
|
||||
)
|
||||
|
||||
+if (WIN32)
|
||||
+add_executable(noise
|
||||
+ tests/noise.c
|
||||
+)
|
||||
+target_link_libraries(noise minifb Gdi32.lib)
|
||||
+
|
||||
+add_executable(input_events
|
||||
+ tests/input_events.c
|
||||
+)
|
||||
+target_link_libraries(input_events minifb Gdi32.lib)
|
||||
+
|
||||
+add_executable(input_events_cpp
|
||||
+ tests/input_events_cpp.cpp
|
||||
+)
|
||||
+target_link_libraries(input_events_cpp minifb Gdi32.lib)
|
||||
+
|
||||
+add_executable(multiple_windows
|
||||
+ tests/multiple_windows.c
|
||||
+)
|
||||
+target_link_libraries(multiple_windows minifb Gdi32.lib)
|
||||
+else()
|
||||
add_executable(noise
|
||||
tests/noise.c
|
||||
)
|
||||
@@ -73,6 +94,7 @@ add_executable(multiple_windows
|
||||
tests/multiple_windows.c
|
||||
)
|
||||
target_link_libraries(multiple_windows minifb)
|
||||
+endif()
|
||||
|
||||
if (MSVC)
|
||||
elseif (MINGW)
|
@ -1,25 +0,0 @@
|
||||
diff --git a/src/windows/WinMiniFB.c b/src/windows/WinMiniFB.c
|
||||
index 84ed0cb..b33f252 100644
|
||||
--- a/src/windows/WinMiniFB.c
|
||||
+++ b/src/windows/WinMiniFB.c
|
||||
@@ -19,7 +19,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LRESULT res = 0;
|
||||
|
||||
- SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWL_USERDATA);
|
||||
+ SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
SWindowData_Win *window_data_win = 0x0;
|
||||
if(window_data != 0x0) {
|
||||
window_data_win = (SWindowData_Win *) window_data->specific;
|
||||
diff --git a/tests/multiple_windows.c b/tests/multiple_windows.c
|
||||
index 4b301c0..29276be 100644
|
||||
--- a/tests/multiple_windows.c
|
||||
+++ b/tests/multiple_windows.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <MiniFB.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
+#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
|
||||
#define kUnused(var) (void) var;
|
@ -1,54 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 06ba472..6dc7988 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -17,6 +17,12 @@ file(GLOB SrcMacOSX "src/macosx/*.c"
|
||||
file(GLOB SrcWayland "src/wayland/*.c")
|
||||
file(GLOB SrcX11 "src/x11/*.c")
|
||||
|
||||
+file(GLOB HEADERS "include/*.h")
|
||||
+file(GLOB HeaderWindows "src/windows/*.h")
|
||||
+file(GLOB HeaderMacOSX "src/macosx/*.h")
|
||||
+file(GLOB HeaderWayland "src/wayland/*.h")
|
||||
+file(GLOB HeaderX11 "src/x11/*.h")
|
||||
+
|
||||
if (NOT MSVC)
|
||||
set (CMAKE_C_FLAGS "-g -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11")
|
||||
@@ -34,19 +40,24 @@ if (MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
list (APPEND SrcLib ${SrcWindows})
|
||||
+ list (APPEND HEADERS ${HeaderWindows})
|
||||
elseif (MINGW)
|
||||
add_definitions(-D_WIN32_WINNT=0x0600)
|
||||
list(APPEND SrcLib ${SrcWindows})
|
||||
+ list (APPEND HEADERS ${HeaderWindows})
|
||||
elseif (APPLE)
|
||||
if(USE_METAL_API)
|
||||
add_definitions(-DUSE_METAL_API)
|
||||
endif()
|
||||
list(APPEND SrcLib ${SrcMacOSX})
|
||||
+ list (APPEND HEADERS ${HeaderMacOSX})
|
||||
elseif (UNIX)
|
||||
if(USE_WAYLAND_API)
|
||||
list(APPEND SrcLib ${SrcWayland})
|
||||
+ list (APPEND HEADERS ${HeaderWayland})
|
||||
else()
|
||||
list(APPEND SrcLib ${SrcX11})
|
||||
+ list (APPEND HEADERS ${HeaderX11})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -112,3 +123,11 @@ elseif (UNIX)
|
||||
target_link_libraries(multiple_windows -lX11)
|
||||
endif()
|
||||
endif()
|
||||
+
|
||||
+install(TARGETS minifb
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ )
|
||||
+
|
||||
+install(FILES ${HEADERS} DESTINATION include)
|
@ -1,30 +1,23 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
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 emoon/minifb
|
||||
REF 25a440f8226f12b8014d24288ad0587724005afc
|
||||
SHA512 e54d86e43193d22263003a9539b11cc61cfd4a1b7093c982165cdd6e6f150b431a44e7d4dc8512b62b9853a7605e29cee19f85b8d25a34b3b530f9aa41a2f4a9
|
||||
REF 1e087f1e9fe5bd33cdb2210b8e92d513ff7dc339 # 2023-02-03
|
||||
SHA512 482bdcdb81d9f163ac7ff1224297331bfee68e53778a9170bfec52c8150c840445cb1338250bfc3e780aef011e3e95e7df3d7134183e59df947f69109a27108a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-error.patch
|
||||
fix-build-error.patch
|
||||
fix-arm-build-error.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DMINIFB_BUILD_EXAMPLES=FALSE
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
4
ports/minifb/usage
Normal file
4
ports/minifb/usage
Normal file
@ -0,0 +1,4 @@
|
||||
minifb provides CMake targets:
|
||||
|
||||
find_package(minifb CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE minifb::minifb)
|
@ -1,8 +1,18 @@
|
||||
{
|
||||
"name": "minifb",
|
||||
"version-string": "2019-08-20",
|
||||
"port-version": 2,
|
||||
"version-date": "2023-02-03",
|
||||
"description": "MiniFB (Mini FrameBuffer) is a small cross platform library that makes it easy to render (32-bit) pixels in a window.",
|
||||
"homepage": "https://github.com/emoon/minifb",
|
||||
"supports": "!uwp"
|
||||
"license": "MIT",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -556,8 +556,6 @@ mfl:x64-linux=skip
|
||||
mfl:x64-osx=skip
|
||||
mfl:arm64-osx=skip
|
||||
milerius-sfml-imgui:x64-windows-static=fail
|
||||
minifb:arm-uwp=fail
|
||||
minifb:x64-uwp=fail
|
||||
miniupnpc:arm-uwp=fail
|
||||
miniupnpc:x64-uwp=fail
|
||||
minizip:arm-uwp=fail
|
||||
|
@ -4997,8 +4997,8 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"minifb": {
|
||||
"baseline": "2019-08-20",
|
||||
"port-version": 2
|
||||
"baseline": "2023-02-03",
|
||||
"port-version": 0
|
||||
},
|
||||
"minimp3": {
|
||||
"baseline": "2021-11-30",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "071e8c4877c43b767d0afce0ad085255b6f68622",
|
||||
"version-date": "2023-02-03",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "c290d7a60106f75b013b4efa6b4287aa91385aab",
|
||||
"version-string": "2019-08-20",
|
||||
|
Loading…
Reference in New Issue
Block a user