[CMake] FLTKConfig.cmake on Microsoft Windows

Micha Renner Micha.Renner at t-online.de
Thu Dec 30 08:35:21 EST 2010


Am Donnerstag, den 30.12.2010, 11:01 +0100 schrieb Julia Jacobson:

> What grieves me is that the CMake code I had prepared in linux looked 
> really nice (without any absolute paths and so on), but the file for 
> Windows doesn't.
I think, the problem with FindFLTK is, that it has never been tested on
Windows. If you take a look at FindFLTK you will detect the following
lines:
  # if FLTK was not built using CMake
    # Find fluid executable.
    FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid)

    # Use location of fluid to help find everything else.
    

So on Windows everything is based on finding "fluid". If this fails then
the whole detection-mechanism of finding the other components collapse.

> Truth be told, what's the point of using CMake here instead of a 
> Makefile? Simply rewriting the build script doesn't cause that more work 
> either.
Of course not. A CMake-script should run everywhere without changes.
(I can hear my teacher, I know). A well written find module should take
into account that it runs on different platforms with different
locations of the libraries. If all this fails, it should be allowed that
the user can give a hint where to search. (That was the reason for
FLTK_DIR).

> Would it help to add the FLTK directory to the Windows PATH variable?
In this case not. FindFLTK does not use it.

Micha




More information about the CMake mailing list