aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/fltk/CONTROL2
-rw-r--r--ports/fltk/add-link-libraries.patch13
-rw-r--r--ports/fltk/portfile.cmake11
3 files changed, 24 insertions, 2 deletions
diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL
index 8261b63a5..90f186ae2 100644
--- a/ports/fltk/CONTROL
+++ b/ports/fltk/CONTROL
@@ -1,4 +1,4 @@
Source: fltk
-Version: 1.3.4-5
+Version: 1.3.4-6
Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation.
Build-Depends: zlib, libpng, libjpeg-turbo
diff --git a/ports/fltk/add-link-libraries.patch b/ports/fltk/add-link-libraries.patch
new file mode 100644
index 000000000..547c9717c
--- /dev/null
+++ b/ports/fltk/add-link-libraries.patch
@@ -0,0 +1,13 @@
+diff --git a/CMake/macros.cmake b/CMake/macros.cmake
+index 4def62d..27b4901 100644
+--- a/CMake/macros.cmake
++++ b/CMake/macros.cmake
+@@ -67,6 +67,8 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
+ COMPILE_DEFINITIONS "FL_DLL"
+ )
+ endif (${LIBTYPE} STREQUAL "SHARED")
++
++ target_link_libraries(${LIBRARY_NAME} gdi32 gdiplus user32 advapi32 ole32 shell32 comdlg32)
+ endif (MSVC)
+
+ install(TARGETS ${LIBRARY_NAME}
diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake
index c6c6fd830..5b7e246a3 100644
--- a/ports/fltk/portfile.cmake
+++ b/ports/fltk/portfile.cmake
@@ -17,7 +17,9 @@ vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fltk-1.3.4-1
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/findlibsfix.patch"
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/findlibsfix.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/add-link-libraries.patch"
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@@ -26,6 +28,12 @@ else()
set(BUILD_SHARED OFF)
endif()
+if (VCPKG_TARGET_ARCHITECTURE MATCHES "arm" OR VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
+ set(OPTION_USE_GL "-DOPTION_USE_GL=OFF")
+else()
+ set(OPTION_USE_GL)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -35,6 +43,7 @@ vcpkg_configure_cmake(
-DOPTION_USE_SYSTEM_LIBPNG=ON
-DOPTION_USE_SYSTEM_LIBJPEG=ON
-DOPTION_BUILD_SHARED_LIBS=${BUILD_SHARED}
+ ${OPTION_USE_GL}
)
vcpkg_install_cmake()