Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-30 Thread Julia Jacobson

With your help, everything seems to work now.
My final subdirectory src/CMakeLists.txt looks like this:

SET(FLTK_DIR C:/Program Files/fltk-1.1.9/)
SET(FLTK_BASE_LIBRARY C:/Program Files/fltk-1.1.9/lib/)
SET(FLTK_FORMS_LIBRARY C:/Program Files/fltk-1.1.9/lib/)
SET(FLTK_GL_LIBRARY C:/Program Files/fltk-1.1.9/lib/)
SET(FLTK_IMAGES_LIBRARY C:/Program Files/fltk-1.1.9/lib/)
SET(FLTK_INCLUDE_DIR C:/Program Files/fltk-1.1.9/include/)
SET(FLTK_SKIP_FLUID TRUE)
FIND_PACKAGE(FLTK REQUIRED)
if( FLTK_FOUND )
include_directories( ${FLTK_INCLUDE_DIR} )
add_executable( hello main.cpp )
target_link_libraries( hello ${FLTK_LIBRARIES} )
else( FLTK_FOUND )
message(FATAL_ERROR Could not find FLTK)
endif( FLTK_FOUND )

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.
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.

Would it help to add the FLTK directory to the Windows PATH variable?


Am Mittwoch, den 29.12.2010, 20:03 +0100 schrieb Julia Jacobson:

Thanks for your answer. The file FindFLTK.cmake exists within my CMake
installation, but I still get an error message:
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91
(MESSAGE):
Could NOT find FLTK (missing: FLTK_LIBRARIES FLTK_FLUID_EXECUTABLE)
This is probably due to the fact that I haven't indicated anywhere where
to find my FLTK installation (i.e. C:\Program Files\fltk-1.1.10).


Actually the module file (here FindFLTK) should find the libraries on
any platforms, but in this case...

Before FIND_PACKAGE(FLTK REQUIRED) insert:

SET(FLTK_DIR C:/Program Files/fltk-1.1.10) # NO backslash!

If you did not install fluid)
SET(FLTK_SKIP_FLUID TRUE)

FIND_PACKAGE(...

Micha

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-30 Thread Julia Jacobson

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.


Would it help to add the FLTK directory to the Windows PATH variable?

In this case not. FindFLTK does not use it.


Well, but another solution that works for me is to rename the fluid 
application from fluidd.exe to fluid.exe and add the directory where it 
can be found to the PATH variable of the local Windows user.

Like this, CMake now finds the correct path of the FLTK installation.
Whether this solution is better than adding absolute PATHs to the 
CMakeLists.txt file depends on one's point of view.

The solution is at least worth while considering.

Thanks again for all your help and sorry for the noise,
Julia

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-29 Thread 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.
Do I really need this file, where can I get it and how do use it 
together with CMake.
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.

Thanks in advance,
Julia
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FLTKConfig.cmake on Microsoft Windows

2010-12-29 Thread Julia Jacobson
Thanks for your answer. The file FindFLTK.cmake exists within my CMake 
installation, but I still get an error message:
CMake Error at C:/Program Files/CMake 
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 
(MESSAGE):

Could NOT find FLTK (missing: FLTK_LIBRARIES FLTK_FLUID_EXECUTABLE)
This is probably due to the fact that I haven't indicated anywhere where 
to find my FLTK installation (i.e. C:\Program Files\fltk-1.1.10).




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

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake