[CMake] FLTKConfig.cmake on Microsoft Windows

Micha Renner Micha.Renner at t-online.de
Wed Dec 29 09:30:38 EST 2010


Am Mittwoch, den 29.12.2010, 12:13 +0100 schrieb Julia Jacobson:
> Hello everybody out there using CMake,
> 
> A project I would like to build with CMake uses FLTK.
> The CMakeLists.txt file references to FLTK:
> ...
> SET(FLTK_INCLUDE_DIR C:/Programs/fltk)
> FIND_PACKAGE(FLTK REQUIRED)

> ...
> However, CMake tells me that I can't find the file FLTKConfig.cmake, 
> which indeed doesn't exist on my Windows installation.
If CMake cannot find FindFLTK.cmake or FLTKConfig.cmake take a look into
C:\Program Files\CMake 2.8\share\cmake-2.8\Modules or where ever you
have installed CMake. Here you should find FindFLTK.cmake. If this file
exists and CMake cannot find it, then you have an installation problem
with CMake.

> Do I really need this file, where can I get it and how do use it 
> together with CMake.
You need FindFLTK.cmake or FLTKConfig.cmake because CMake loads this
file during the call of FIND_PACKAGE. You should have FindFLTK.cmake
already, see above.

> Moreover, is there a way to make the value of FLTK_INCLUDE_DIR more 
> portable? My CMakeLists.txt file like it is would obviously not work
> under linux.
Out-comment the line: SET(FLTK_INCLUDE_DIR C:/Programs/fltk). It is not
an good idea to set FLTK_INCLUDE_DIR in a CMakeLists.txt file, since
FLTK_INCLUDE_DIR is defined and set in FindFLTK.cmake or
FLTKConfig.cmake

Micha




More information about the CMake mailing list