Documentation updates (STR #568)

More CMake updates (STR #499)

The Watcom C++ compiler needed a small change (STR #567)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2004-10-18 20:29:58 +00:00
parent bf910884cc
commit ca005c4067
13 changed files with 1058 additions and 943 deletions

View File

@ -1,6 +1,9 @@
CHANGES IN FLTK 1.1.5
- Documentation updates (STR #570)
- Documentation updates (STR #568, STR #570)
- More CMake updates (STR #499)
- The Watcom C++ compiler needed a small change (STR
#567)
- Added DESTDIR support and now remove all man pages for
the "uninstall" target (STR #545)
- Fix PNG drawing on buggy WIN32 graphics cards (STR

View File

@ -32,6 +32,18 @@ IF(WIN32)
ENDIF(NOT CYGWIN)
ENDIF(WIN32)
SET(FLTK_X11 1)
SET(FLTK_APPLE 0)
IF(APPLE)
OPTION(FLTK_APPLE_X11 "Use X11 on Mac instead of Carbon" OFF)
MARK_AS_ADVANCED(FLTK_APPLE_X11)
IF(NOT FLTK_APPLE_X11)
SET(FLTK_APPLE 1)
SET(FLTK_X11 0)
OPTION(FLTK_QUARTZ "Use Quartz instead of Quickdraw" OFF)
ENDIF(NOT FLTK_APPLE_X11)
ENDIF(APPLE)
IF(UNIX)
INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
@ -61,6 +73,7 @@ MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
ENDIF(${VARIABLE})
ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
CHECK_INCLUDE_FILE_CONCAT("GL/glu.h" HAVE_GL_GLU_H)
CHECK_INCLUDE_FILE_CONCAT("OpenGL/glu.h" HAVE_OPENGL_GLU_H)
CHECK_INCLUDE_FILE_CONCAT("dirent.h" HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
CHECK_INCLUDE_FILE_CONCAT("strings.h" HAVE_STRINGS_H)
@ -106,6 +119,7 @@ ENDIF(${SIZEOF_INT} MATCHES "^4$")
IF(${SIZEOF_INT} MATCHES "^8$")
SET(U64 "unsigned")
ELSE(${SIZEOF_INT} MATCHES "^8$")
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
IF(${SIZEOF_LONG} MATCHES "^8$")
SET(U64 "unsigned long")
ENDIF(${SIZEOF_LONG} MATCHES "^8$")
@ -189,8 +203,6 @@ MARK_AS_ADVANCED(JPEG_LIBRARY)
SUBDIRS(jpeg)
ENDIF(FLTK_USE_SYSTEM_JPEG)
# Set an option to build the png library or not
OPTION(FLTK_USE_SYSTEM_PNG "Use's system png" ON)
IF(FLTK_USE_SYSTEM_PNG)
@ -208,11 +220,78 @@ MARK_AS_ADVANCED(PNG_LIBRARY)
SUBDIRS(png)
ENDIF(FLTK_USE_SYSTEM_PNG)
SUBDIRS(src)
SUBDIRS(fluid)
SET(FLTK_CREATE_SYMLINKS 1)
IF(WIN32)
IF(NOT UNIX)
SET(FLTK_CREATE_SYMLINKS 0)
ENDIF(NOT UNIX)
ENDIF(WIN32)
MACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION)
IF(EXISTS "${DESTINATION}")
ELSE(EXISTS "${DESTINATION}")
EXEC_PROGRAM(ln ARGS -s
"${SOURCE}"
"${DESTINATION}" OUTPUT_VARIABLE ln_output
RETURN_VALUE ln_retval)
IF("${ln_retval}" GREATER 0)
MESSAGE(FATAL_ERROR "Problem creatin symlink from \"${SOURCE}\" to \"${DESTINATION}\":\n${ln_output}")
ENDIF("${ln_retval}" GREATER 0)
ENDIF(EXISTS "${DESTINATION}")
ENDMACRO(SAFE_CREATE_SYMLINK SOURCE DESTINATION)
# If this is out-of-source build, then copy FL directory
FILE(GLOB FLTK_HEADER_FILES "${FLTK_SOURCE_DIR}/FL/*")
FOREACH(file ${FLTK_HEADER_FILES})
GET_FILENAME_COMPONENT(ext "${file}" EXT)
GET_FILENAME_COMPONENT(namewe "${file}" NAME_WE)
GET_FILENAME_COMPONENT(name "${file}" NAME)
STRING(COMPARE EQUAL "${ext}" ".h" lower_case_h)
STRING(COMPARE EQUAL "${ext}" ".H" upper_case_h)
IF(lower_case_h OR upper_case_h)
SET(outfile_h "${FLTK_BINARY_DIR}/FL/${namewe}.h")
SET(outfile_H "${FLTK_BINARY_DIR}/FL/${namewe}.H")
CONFIGURE_FILE("${file}" "${outfile_H}" COPYONLY IMMEDIATE)
# IF(FLTK_CREATE_SYMLINKS)
# SAFE_CREATE_SYMLINK("${outfile_H}" "${outfile_h}")
# ENDIF(FLTK_CREATE_SYMLINKS)
ELSE(lower_case_h OR upper_case_h)
STRING(COMPARE EQUAL "${ext}" ".r" mac_resource_file)
IF(mac_resource_file)
SET(outfile "${FLTK_BINARY_DIR}/FL/${name}")
CONFIGURE_FILE("${file}" "${outfile}" COPYONLY IMMEDIATE)
ENDIF(mac_resource_file)
ENDIF(lower_case_h OR upper_case_h)
ENDFOREACH(file)
IF(FLTK_CREATE_SYMLINKS)
SAFE_CREATE_SYMLINK(
"${FLTK_BINARY_DIR}/FL"
"${FLTK_BINARY_DIR}/Fl")
SAFE_CREATE_SYMLINK(
"${FLTK_BINARY_DIR}/FL/gl.H"
"${FLTK_BINARY_DIR}/FL/gl.h")
# Create the symlinks
FILE(READ ${FLTK_SOURCE_DIR}/fltk.list.in SYMLINKSFILE)
STRING(REGEX MATCHALL "(l 0000 root sys .includedir/)([^(\n)])+"
SYMLINKS ${SYMLINKSFILE})
FOREACH(var ${SYMLINKS} )
IF("${var}" MATCHES ".H")
STRING(REGEX MATCH "(/F)([^(\n)])+" tmp ${var})
STRING(REGEX MATCH "(/F)([^( )])+" in ${tmp})
STRING(REGEX MATCH "( )([^(\n)])+" out ${tmp})
STRING(REGEX REPLACE "( )" "" out ${out})
SAFE_CREATE_SYMLINK("${FLTK_BINARY_DIR}/FL/${out}" "${FLTK_BINARY_DIR}/${in}")
ENDIF("${var}" MATCHES ".H")
ENDFOREACH(var)
ENDIF(FLTK_CREATE_SYMLINKS)
# Set the fluid executable path
SET(FLUID_COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fluid)
@ -220,9 +299,10 @@ SET(FLUID_COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/fluid)
OPTION(BUILD_TESTS "Build the tests" ON)
IF(BUILD_TESTS)
SUBDIRS(test)
ENABLE_TESTING()
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
ENDIF(BUILD_TESTS )
#Genereate the configuration file
SET(FLTK_EXECUTABLE_DIRS ${EXECUTABLE_OUTPUT_PATH})
SET(FLTK_LIBRARY_DIRS ${LIBRARY_OUTPUT_PATH})

View File

@ -1,5 +1,5 @@
/*
* "$Id: filename.H,v 1.11.2.4.2.14 2004/04/11 04:38:54 easysw Exp $"
* "$Id: filename.H,v 1.11.2.4.2.15 2004/10/18 20:29:54 easysw Exp $"
*
* Filename header file for the Fast Light Tool Kit (FLTK).
*
@ -51,7 +51,7 @@ inline int fl_filename_relative(char *to, const char *from) { return fl_filename
# endif /* __cplusplus */
# if defined(WIN32) && !defined(__CYGWIN__)
# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
struct dirent {char d_name[1];};
@ -65,6 +65,10 @@ struct dirent {char d_name[1];};
# include <sys/types.h>
# include "/usr/include/dirent.h"
# elif defined(__WATCOMC__)
# include <sys/types.h>
# include <direct.h>
# else
/*
* WARNING: on some systems (very few nowadays?) <dirent.h> may not exist.
@ -127,5 +131,5 @@ FL_EXPORT int fl_filename_list(const char *d, struct dirent ***l,
#endif /* FL_FILENAME_H */
/*
* End of "$Id: filename.H,v 1.11.2.4.2.14 2004/04/11 04:38:54 easysw Exp $".
* End of "$Id: filename.H,v 1.11.2.4.2.15 2004/10/18 20:29:54 easysw Exp $".
*/

View File

@ -1,10 +1,10 @@
/*
* "$Id: configh.cmake.in,v 1.1.2.1 2004/09/13 02:12:40 easysw Exp $"
* "$Id: configh.cmake.in,v 1.1.2.2 2004/10/18 20:29:54 easysw Exp $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
* @configure_input@
*
* Copyright 1998-2003 by Bill Spitzak and others.
* Copyright 1998-2004 by Bill Spitzak and others.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -98,6 +98,30 @@
#define USE_XDBE HAVE_XDBE
/*
* USE_QUARTZ:
*
* Use Quartz instead of Quickdraw on Apple Mac OS X machines.
* FLTK was originally ported to Quickdraw which is no longer
* supported by Apple. If USE_QUARTZ is defined, FLTK will be
* compiled using Quartz instead. This flag has no meaning on
* other operating systems.
*/
#cmakedefine FLTK_APPLE
#ifdef FLTK_APPLE
#cmakedefine FLTK_QUARTZ
#ifdef FLTK_QUARTZ
#define USE_QUARTZ 1
#define __APPLE_QUARTZ__
#undef __APPLE_QD__
#else
#define USE_QUARTZ 0
#undef __APPLE_QUARTZ__
#define __APPLE_QD__
#endif
#endif
/*
* HAVE_OVERLAY:
*
@ -230,5 +254,5 @@
#endif
/*
* End of "$Id: configh.cmake.in,v 1.1.2.1 2004/09/13 02:12:40 easysw Exp $".
* End of "$Id: configh.cmake.in,v 1.1.2.2 2004/10/18 20:29:54 easysw Exp $".
*/

View File

@ -346,7 +346,7 @@ with your application use:
<UL><PRE>
#include &quot;icon.xbm&quot;
fl_opendisplay(); // needed if display has not been previously opened
fl_open_display(); // needed if display has not been previously opened
Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display),
icon_bits, icon_width, icon_height);

View File

@ -161,9 +161,13 @@ SET(CFILES
vsnprintf.c
)
# We need ansi c-flags, especially on HP
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
ADD_LIBRARY(fltk ${CPPFILES} ${CFILES})
TARGET_LINK_LIBRARIES(fltk ${FLTK_PLATFORM_DEPENDENT_LIBS})
TARGET_LINK_LIBRARIES(fltk ${FLTK_PLATFORM_DEPENDENT_LIBS} ${CMAKE_THREAD_LIBS_INIT})
IF(X11_FOUND)
TARGET_LINK_LIBRARIES(fltk ${X11_LIBRARIES})