Fix fltk-config --use-images with local image libs (#689)

CMake only: replace wrong variable names with correct ones. Affected
were all image libraries (jpeg, png) and zlib.

These variables had been renamed in an earlier commit when lots of
CMake code had been rewritten.
This commit is contained in:
Albrecht Schlosser 2023-02-28 14:47:33 +01:00
parent a3d89f7e28
commit fc5f0c13f2

View File

@ -82,7 +82,7 @@ endif ()
set (IMAGELIBS)
set (STATICIMAGELIBS)
if (FLTK_BUILTIN_JPEG_FOUND)
if (FLTK_USE_BUILTIN_JPEG)
list (APPEND IMAGELIBS -lfltk_jpeg)
list (APPEND STATICIMAGELIBS \$libdir/libfltk_jpeg.a)
else ()
@ -90,9 +90,9 @@ else ()
list (APPEND IMAGELIBS -ljpeg)
list (APPEND STATICIMAGELIBS -ljpeg)
endif (LIB_jpeg)
endif (FLTK_BUILTIN_JPEG_FOUND)
endif (FLTK_USE_BUILTIN_JPEG)
if (FLTK_BUILTIN_PNG_FOUND)
if (FLTK_USE_BUILTIN_PNG)
list (APPEND IMAGELIBS -lfltk_png)
list (APPEND STATICIMAGELIBS \$libdir/libfltk_png.a)
else ()
@ -100,9 +100,9 @@ else ()
list (APPEND IMAGELIBS -lpng)
list (APPEND STATICIMAGELIBS -lpng)
endif (LIB_png)
endif (FLTK_BUILTIN_PNG_FOUND)
endif (FLTK_USE_BUILTIN_PNG)
if (FLTK_BUILTIN_ZLIB_FOUND)
if (FLTK_USE_BUILTIN_ZLIB)
list (APPEND IMAGELIBS -lfltk_z)
list (APPEND STATICIMAGELIBS \$libdir/libfltk_z.a)
else ()
@ -110,7 +110,7 @@ else ()
list (APPEND IMAGELIBS -lz)
list (APPEND STATICIMAGELIBS -lz)
endif (LIB_zlib)
endif (FLTK_BUILTIN_ZLIB_FOUND)
endif (FLTK_USE_BUILTIN_ZLIB)
string (REPLACE ";" " " IMAGELIBS "${IMAGELIBS}")
string (REPLACE ";" " " STATICIMAGELIBS "${STATICIMAGELIBS}")