diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/duilib/enable-static.patch | |
Diffstat (limited to 'vcpkg/ports/duilib/enable-static.patch')
| -rw-r--r-- | vcpkg/ports/duilib/enable-static.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vcpkg/ports/duilib/enable-static.patch b/vcpkg/ports/duilib/enable-static.patch new file mode 100644 index 0000000..6f069d4 --- /dev/null +++ b/vcpkg/ports/duilib/enable-static.patch @@ -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)
|