Files
MINGW-packages/mingw-w64-plplot/fix-cmake-windows-libs.patch
2021-01-08 23:54:15 +01:00

80 lines
4.2 KiB
Diff

diff -urN plplot-5.15.0/cmake/modules/wingcc.cmake plplot-5.15.0-wingdi-patch/cmake/modules/wingcc.cmake
--- plplot-5.15.0/cmake/modules/wingcc.cmake 2019-06-02 01:24:33.000000000 +0200
+++ plplot-5.15.0-wingdi-patch/cmake/modules/wingcc.cmake 2021-01-08 22:50:29.289762700 +0100
@@ -33,14 +33,15 @@
endif(PLD_wingcc AND NOT WIN32_OR_CYGWIN)
if(PLD_wingcc)
- message(STATUS "Looking for gdi32 header and library")
- find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
- if(GDI32_LIBRARY)
- find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
- endif(GDI32_LIBRARY)
- if(GDI32_LIBRARY AND COMDLG32_LIBRARY)
- message(STATUS "Looking for gdi32 header and library - found")
- set(wingcc_LINK_FLAGS "${GDI32_LIBRARY};${COMDLG32_LIBRARY}")
+ #message(STATUS "Looking for gdi32 header and library")
+ #find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+ #if(GDI32_LIBRARY)
+ # find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+ #endif(GDI32_LIBRARY)
+ #if(GDI32_LIBRARY AND COMDLG32_LIBRARY)
+ # message(STATUS "Looking for gdi32 header and library - found")
+ # set(wingcc_LINK_FLAGS "${GDI32_LIBRARY};${COMDLG32_LIBRARY}")
+ set(wingcc_LINK_FLAGS "-lgdi32;-lcomdlg32")
if(WITH_FREETYPE)
set(
wingcc_COMPILE_FLAGS
@@ -53,9 +54,9 @@
)
endif(WITH_FREETYPE)
set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${wingcc_LINK_FLAGS})
- else(GDI32_LIBRARY AND COMDLG32_LIBRARY)
- message(STATUS "Looking for gdi32 header and library - not found")
- message(STATUS "WARNING: Setting PLD_wingcc to OFF.")
- set(PLD_wingcc OFF CACHE BOOL "Enable wingcc device" FORCE)
- endif(GDI32_LIBRARY AND COMDLG32_LIBRARY)
+ #else(GDI32_LIBRARY AND COMDLG32_LIBRARY)
+ # message(STATUS "Looking for gdi32 header and library - not found")
+ # message(STATUS "WARNING: Setting PLD_wingcc to OFF.")
+ # set(PLD_wingcc OFF CACHE BOOL "Enable wingcc device" FORCE)
+ #endif(GDI32_LIBRARY AND COMDLG32_LIBRARY)
endif(PLD_wingcc)
diff -urN plplot-5.15.0/cmake/modules/wingdi.cmake plplot-5.15.0-wingdi-patch/cmake/modules/wingdi.cmake
--- plplot-5.15.0/cmake/modules/wingdi.cmake 2019-06-02 01:24:33.000000000 +0200
+++ plplot-5.15.0-wingdi-patch/cmake/modules/wingdi.cmake 2021-01-08 22:50:14.916626500 +0100
@@ -33,19 +33,19 @@
endif(PLD_wingdi AND NOT WIN32_OR_CYGWIN)
if(PLD_wingdi)
- message(STATUS "Looking for gdi32 header and library")
- find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
- if(GDI32_LIBRARY)
- find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
- find_library(COMCTL32_LIBRARY comctl32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
- endif(GDI32_LIBRARY)
- if(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
- message(STATUS "Looking for gdi32 header and library - found")
- set(wingdi_LINK_FLAGS "${GDI32_LIBRARY};${COMDLG32_LIBRARY};${COMCTL32_LIBRARY}")
+ #message(STATUS "Looking for gdi32 header and library")
+ #find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+ #if(GDI32_LIBRARY)
+ # find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+ # find_library(COMCTL32_LIBRARY comctl32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+ #endif(GDI32_LIBRARY)
+ #if(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
+ # message(STATUS "Looking for gdi32 header and library - found")
+ set(wingdi_LINK_FLAGS "-lgdi32;-lcomdlg32;-lcomctl32")
set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${wingdi_LINK_FLAGS})
- else(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
- message(STATUS "Looking for gdi32 header and library - not found")
- message(STATUS "WARNING: Setting PLD_wingdi to OFF.")
- set(PLD_wingdi OFF CACHE BOOL "Enable wingdi device" FORCE)
- endif(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
+ #else(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
+ # message(STATUS "Looking for gdi32 header and library - not found")
+ # message(STATUS "WARNING: Setting PLD_wingdi to OFF.")
+ # set(PLD_wingdi OFF CACHE BOOL "Enable wingdi device" FORCE)
+ #endif(GDI32_LIBRARY AND COMDLG32_LIBRARY AND COMCTL32_LIBRARY)
endif(PLD_wingdi)