diff -upr /home/toby/development/svn/fltk/branch-1.3-r6970/src//CMakeLists.txt src//CMakeLists.txt --- /home/toby/development/svn/fltk/branch-1.3-r6970/src//CMakeLists.txt 2010-07-26 12:08:34.947829872 +0200 +++ src//CMakeLists.txt 2010-07-26 12:10:34.290829872 +0200 @@ -1,3 +1,7 @@ +IF(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +ENDIF(COMMAND cmake_policy) + SET(CPPFILES Fl.cxx Fl_Adjuster.cxx @@ -190,30 +194,30 @@ IF(X11_FOUND) TARGET_LINK_LIBRARIES(fltk ${X11_LIBRARIES}) ENDIF(X11_FOUND) -IF(OPENGL_FOUND) - ADD_LIBRARY(fltk_gl ${GLCPPFILES}) - INSTALL_TARGETS(/lib fltk_gl) - TARGET_LINK_LIBRARIES(fltk_gl fltk ${OPENGL_LIBRARIES}) - SET_TARGET_PROPERTIES(fltk_gl - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) -ENDIF(OPENGL_FOUND) - -ADD_LIBRARY(fltk_forms ${FLCPPFILES}) -INSTALL_TARGETS(/lib fltk_forms) -TARGET_LINK_LIBRARIES(fltk_forms fltk) -SET_TARGET_PROPERTIES(fltk_forms - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) - -ADD_LIBRARY(fltk_images ${IMGCPPFILES}) -INSTALL_TARGETS(/lib fltk_images) -TARGET_LINK_LIBRARIES(fltk_images fltk ${FLTK_PNG_LIBRARIES} - ${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES}) -SET_TARGET_PROPERTIES(fltk_images - PROPERTIES - VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} - SOVERSION ${FLTK_VERSION_PATCH}) - +#IF(OPENGL_FOUND) +# ADD_LIBRARY(fltk_gl ${GLCPPFILES}) +# INSTALL_TARGETS(/lib fltk_gl) +# TARGET_LINK_LIBRARIES(fltk_gl fltk ${OPENGL_LIBRARIES}) +# SET_TARGET_PROPERTIES(fltk_gl +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +#ENDIF(OPENGL_FOUND) + +#ADD_LIBRARY(fltk_forms ${FLCPPFILES}) +#INSTALL_TARGETS(/lib fltk_forms) +#TARGET_LINK_LIBRARIES(fltk_forms fltk) +#SET_TARGET_PROPERTIES(fltk_forms +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +# +#ADD_LIBRARY(fltk_images ${IMGCPPFILES}) +#INSTALL_TARGETS(/lib fltk_images) +#TARGET_LINK_LIBRARIES(fltk_images fltk ${FLTK_PNG_LIBRARIES} +# ${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES}) +#SET_TARGET_PROPERTIES(fltk_images +# PROPERTIES +# VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR} +# SOVERSION ${FLTK_VERSION_PATCH}) +# diff -upr /home/toby/development/svn/fltk/branch-1.3-r6970/src//filename_list.cxx src//filename_list.cxx --- /home/toby/development/svn/fltk/branch-1.3-r6970/src//filename_list.cxx 2010-07-26 12:08:34.596829871 +0200 +++ src//filename_list.cxx 2010-07-26 12:10:34.343829872 +0200 @@ -77,8 +77,8 @@ int fl_filename_list(const char *d, dire Fl_File_Sort_F *sort) { #ifndef HAVE_SCANDIR int n = scandir(d, list, 0, sort); -#elif defined(HAVE_SCANDIR_POSIX) - // POSIX (2008) defines the comparison function like this: +#elif defined(__hpux) || defined(__CYGWIN__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 10 ) + // HP-UX, Cygwin and POSIX (2008) define the comparison function like this: int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); #elif defined(__osf__) // OSF, DU 4.0x diff -upr /home/toby/development/svn/fltk/branch-1.3-r6970/src//fl_font_xft.cxx src//fl_font_xft.cxx --- /home/toby/development/svn/fltk/branch-1.3-r6970/src//fl_font_xft.cxx 2010-07-26 12:08:34.594829871 +0200 +++ src//fl_font_xft.cxx 2010-07-26 12:10:34.355829872 +0200 @@ -128,6 +128,8 @@ void fl_font(Fl_Font fnum, Fl_Fontsize s fl_fontsize = f; #if XFT_MAJOR < 2 fl_xfont = f->font->u.core.font; +#else + fl_xfont = NULL; // invalidate #endif // XFT_MAJOR < 2 fl_xftfont = (void*)f->font; } @@ -413,6 +415,19 @@ static XFontStruct* load_xfont_for_xft2( default: name--; // no prefix, restore name } + // map generic Xft names to customary XLFD faces + if (!strcmp(name, "sans")) { + name = "helvetica"; + } else if (!strcmp(name, "mono")) { + name = "courier"; + } else if (!strcmp(name, "serif")) { + name = "times"; + } else if (!strcmp(name, "screen")) { + name = "lucidatypewriter"; + } else if (!strcmp(name, "dingbats")) { + name = "zapf dingbats"; + } + // first, we do a query with no prefered size, to see if the font exists at all snprintf(xlfd, 128, "-*-*%s*-%s-%c-*--*-*-*-*-*-*-*-*", name, weight, slant); // make up xlfd style name xgl_font = XLoadQueryFont(fl_display, xlfd); diff -upr /home/toby/development/svn/fltk/branch-1.3-r6970/src//Fl_lock.cxx src//Fl_lock.cxx --- /home/toby/development/svn/fltk/branch-1.3-r6970/src//Fl_lock.cxx 2009-05-31 13:06:24.000000000 +0200 +++ src//Fl_lock.cxx 2010-07-26 12:10:34.335829872 +0200 @@ -187,6 +187,7 @@ int Fl::awake(Fl_Awake_Handler func, voi See also: \ref advanced_multithreading */ #ifdef WIN32 +# include # include # include # include