early-access version 2853
This commit is contained in:
20
externals/vcpkg/ports/duilib/enable-static.patch
vendored
Executable file
20
externals/vcpkg/ports/duilib/enable-static.patch
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt
|
||||
index 96b8fe4..99dc314 100644
|
||||
--- a/DuiLib/CMakeLists.txt
|
||||
+++ b/DuiLib/CMakeLists.txt
|
||||
@@ -19,8 +19,14 @@ if (MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:.936")
|
||||
endif()
|
||||
|
||||
+if (BUILD_SHARED_LIBS STREQUAL ON)
|
||||
+ SET(LINKAGE SHARED)
|
||||
+else()
|
||||
+ SET(LINKAGE STATIC)
|
||||
+endif()
|
||||
+
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
-add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src})
|
||||
+add_library(duilib ${LINKAGE} ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src})
|
||||
|
||||
add_definitions(-DUILIB_EXPORTS)
|
||||
target_link_libraries(duilib comctl32 gdi32 user32)
|
||||
15
externals/vcpkg/ports/duilib/enable-unicode-for-vcpkg.patch
vendored
Executable file
15
externals/vcpkg/ports/duilib/enable-unicode-for-vcpkg.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt
|
||||
index 835d430..b178984 100644
|
||||
--- a/DuiLib/CMakeLists.txt
|
||||
+++ b/DuiLib/CMakeLists.txt
|
||||
@@ -2,6 +2,9 @@
|
||||
#Author Qi Gao(monkgau@gmail.com)
|
||||
#Created: 2012/09/16
|
||||
|
||||
+#if use vcpkg to build, need to add extra unicode definitions
|
||||
+add_definitions(-DUNICODE -D_UNICODE)
|
||||
+
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} Root_src)
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Control Control_src)
|
||||
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Core Core_src)
|
||||
|
||||
11
externals/vcpkg/ports/duilib/fix-arm-build.patch
vendored
Executable file
11
externals/vcpkg/ports/duilib/fix-arm-build.patch
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt
|
||||
index 6a4da5a..4961174 100644
|
||||
--- a/DuiLib/CMakeLists.txt
|
||||
+++ b/DuiLib/CMakeLists.txt
|
||||
@@ -18,5 +18,5 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src})
|
||||
|
||||
add_definitions(-DUILIB_EXPORTS)
|
||||
-target_link_libraries(duilib comctl32)
|
||||
+target_link_libraries(duilib comctl32 gdi32 user32)
|
||||
set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib")
|
||||
28
externals/vcpkg/ports/duilib/fix-encoding.patch
vendored
Executable file
28
externals/vcpkg/ports/duilib/fix-encoding.patch
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt
|
||||
index 4961174..96b8fe4 100644
|
||||
--- a/DuiLib/CMakeLists.txt
|
||||
+++ b/DuiLib/CMakeLists.txt
|
||||
@@ -14,6 +14,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Core)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Layout)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Utils)
|
||||
|
||||
+if (MSVC)
|
||||
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /source-charset:.936")
|
||||
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:.936")
|
||||
+endif()
|
||||
+
|
||||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
|
||||
add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src})
|
||||
|
||||
diff --git a/DuiLib/Control/UIGifAnim.cpp b/DuiLib/Control/UIGifAnim.cpp
|
||||
index 870c9da..61aa32f 100644
|
||||
--- a/DuiLib/Control/UIGifAnim.cpp
|
||||
+++ b/DuiLib/Control/UIGifAnim.cpp
|
||||
@@ -319,7 +319,6 @@ namespace DuiLib
|
||||
|
||||
while (!pData)
|
||||
{
|
||||
- //读不到图片, 则直接去读取bitmap.m_lpstr指向的路径
|
||||
HANDLE hFile = ::CreateFile(pstrGifPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, \
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if( hFile == INVALID_HANDLE_VALUE ) break;
|
||||
11
externals/vcpkg/ports/duilib/fix-post-build-errors.patch
vendored
Executable file
11
externals/vcpkg/ports/duilib/fix-post-build-errors.patch
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt
|
||||
index 835d430..6a4da5a 100644
|
||||
--- a/DuiLib/CMakeLists.txt
|
||||
+++ b/DuiLib/CMakeLists.txt
|
||||
@@ -20,6 +20,3 @@ add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src}
|
||||
add_definitions(-DUILIB_EXPORTS)
|
||||
target_link_libraries(duilib comctl32)
|
||||
set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib")
|
||||
-add_custom_command(TARGET duilib POST_BUILD
|
||||
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
- ${PROJECT_BINARY_DIR}/lib/duilib.dll ${PROJECT_SOURCE_DIR}/bin/duilib.dll)
|
||||
36
externals/vcpkg/ports/duilib/portfile.cmake
vendored
Executable file
36
externals/vcpkg/ports/duilib/portfile.cmake
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO duilib/duilib
|
||||
REF d7f3a331a0fc6ba48429cd9e5c427570cc73bc35
|
||||
SHA512 6381cac467d42e4811859411a5fa620e52075622e8fbec38a6ab320c33bc7d6fdddc809c150d6a10cc40c55a651345bda9387432898d24957b6ab0f5c4b5391c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"fix-post-build-errors.patch"
|
||||
"fix-arm-build.patch"
|
||||
"fix-encoding.patch"
|
||||
"enable-static.patch"
|
||||
"enable-unicode-for-vcpkg.patch"
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/DuiLib"
|
||||
NO_CHARSET_FLAG
|
||||
)
|
||||
|
||||
vcpkg_cmake_build()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/DuiLib" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN *.h)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||
else()
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||
endif()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
14
externals/vcpkg/ports/duilib/vcpkg.json
vendored
Executable file
14
externals/vcpkg/ports/duilib/vcpkg.json
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "duilib",
|
||||
"version-date": "2019-04-28",
|
||||
"port-version": 5,
|
||||
"description": "Duilib is a free open source DirectUI interface library under Windows. It is widely accepted by major Internet companies due to its simple and easy to expand design and stable and efficient implementation. It is widely used in IM, video client, stock market software, navigation software, and mobile phone assistive software. Duilib is still evolving, and will continue to improve in many aspects such as documentation, examples, animations, and rendering engines.",
|
||||
"homepage": "https://github.com/duilib/duilib",
|
||||
"supports": "windows & !uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user