vcpkg/ports/fltk/findlibsfix.patch

48 lines
1.6 KiB
Diff
Raw Normal View History

2017-01-16 04:08:53 +08:00
diff --git a/CMake/resources.cmake b/CMake/resources.cmake
index 57173f2..149aa62 100644
2017-01-16 04:08:53 +08:00
--- a/CMake/resources.cmake
+++ b/CMake/resources.cmake
@@ -52,10 +52,8 @@ include (FindPkgConfig)
fl_find_header (HAVE_ALSA_ASOUNDLIB_H alsa/asoundlib.h)
fl_find_header (HAVE_DLFCN_H dlfcn.h)
fl_find_header (HAVE_GL_GLU_H GL/glu.h)
-fl_find_header (HAVE_LIBPNG_PNG_H libpng/png.h)
fl_find_header (HAVE_LOCALE_H locale.h)
fl_find_header (HAVE_OPENGL_GLU_H OpenGL/glu.h)
-fl_find_header (HAVE_PNG_H png.h)
fl_find_header (HAVE_STDIO_H stdio.h)
fl_find_header (HAVE_STRINGS_H strings.h)
fl_find_header (HAVE_SYS_SELECT_H sys/select.h)
@@ -64,6 +62,17 @@ fl_find_header (HAVE_SYS_STDTYPES_H sys/stdtypes.h)
fl_find_header (HAVE_X11_XREGION_H "X11/Xlib.h;X11/Xregion.h")
fl_find_header (HAVE_XDBE_H "X11/Xlib.h;X11/extensions/Xdbe.h")
2017-01-16 04:08:53 +08:00
+find_package(PNG REQUIRED)
+if(PNG_FOUND)
+ set(LIB_png ${PNG_LIBRARIES})
+ set(HAVE_PNG_H ${PNG_FOUND})
+
+endif()
+find_package(ZLIB REQUIRED)
+if(ZLIB_FOUND)
+ set(LIB_zlib ${ZLIB_LIBRARIES})
+endif()
+
if (WIN32 AND NOT CYGWIN)
# we don't use pthreads on Windows (except for Cygwin, see options.cmake)
set (HAVE_PTHREAD_H 0)
@@ -171,12 +180,10 @@ find_library (LIB_GL GL)
find_library (LIB_MesaGL MesaGL)
find_library (LIB_GLEW GLEW)
find_library (LIB_jpeg jpeg)
-find_library (LIB_png png)
-find_library (LIB_zlib z)
2017-01-16 04:08:53 +08:00
mark_as_advanced (LIB_dl LIB_fontconfig LIB_freetype)
mark_as_advanced (LIB_GL LIB_MesaGL LIB_GLEW)
-mark_as_advanced (LIB_jpeg LIB_png LIB_zlib)
+mark_as_advanced (LIB_jpeg)
2017-01-16 04:08:53 +08:00
#######################################################################
# functions