From c87147578d229e7a2a01ccd063b0c4fe3f3ee24a Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 6 Feb 2015 17:34:23 +0000 Subject: [CMake] Add missing build libraries (STR #3011). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10556 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CMake/options.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CMake/options.cmake b/CMake/options.cmake index 39cbd24d4..0ab1311dd 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -296,3 +296,31 @@ if(OPTION_USE_XDBE AND HAVE_XDBE_H) else() set(FLTK_XDBE_FOUND FALSE) endif(OPTION_USE_XDBE AND HAVE_XDBE_H) + +####################################################################### +# add several libraries (STR #3011) +# FIXME: libraries may need reordering, and this version does not yet +# correctly support static linking and local zlib, png, and jpeg libs. + +if(LIB_fontconfig) + list(APPEND FLTK_LDLIBS -lfontconfig) +endif(LIB_fontconfig) + +if(HAVE_DLSYM) + list(APPEND FLTK_LDLIBS -ldl) +endif(HAVE_DLSYM) + +if(LIB_png) + list(APPEND IMAGELIBS -lpng) +endif(LIB_png) + +if(LIB_zlib) + list(APPEND IMAGELIBS -lz) +endif(LIB_zlib) + +if(LIB_jpeg) + list(APPEND IMAGELIBS -ljpeg) +endif(LIB_jpeg) + +string(REPLACE ";" " " IMAGELIBS "${IMAGELIBS}") +set(STATICIMAGELIBS "${IMAGELIBS}") -- cgit v1.2.3