Hi,

There are 2 problems I got.

The first one is that CMake cannot find Boost library, which I just unzipped it to the above directory, since I only need some headers, no linking required. How find_package(boost) works? How can I make it find the boost library automatically, without manually specify the boost location?

FindBoost.cmake looks in some standard directories:

SET(_boost_INCLUDE_SEARCH_DIRS C:/boost/include C:/boost "$ENV{ProgramFiles}/boost" /sw/local/include )

Otherwise, you need to tell cmake where you installed Boost, how should cmake else know? I do

set( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} path_to_boost_parent/ boost_1_38_0 )

FindBoost.cmake is then able to pick up the boost library.


The second problem is that, for gtkmm, CMake found gtkmm, it is good, however, it breaks the path, "E:\Program Files\gtkmm" to "E: \Program", and treat "Files\gtkmm" as the second arguments. So, in generated MSVC project file, the include directories setting is :

"E:\Program Files\boost_1_38_0";E:\Program;

Which cause fail to compile my project using generated MSVC project. And in CMakeCache.txt, there are many things like:

GTKMM_CFLAGS:INTERNAL=Files/gtkmm/include/gtkmm-2.4;Files/gtkmm/lib/ gtkmm-2.4/include;Files/gtkmm/include/glibmm-2.4;Files/gtkmm/lib/ glibmm-2.4/include;Files/gtkmm/include/giomm-2.4;Files/gtkmm/lib/ giomm-2.4/include;Files/gtkmm/include/gdkmm-2.4;Files/gtkmm/lib/ gdkmm-2.4/include;Files/gtkmm/include/pangomm-1.4;Files/gtkmm/ include/atkmm-1.6;Files/gtkmm/include/gtk-2.0;-mms-bitfields;Files/ gtkmm/include/sigc++-2.0;Files/gtkmm/lib/sigc++-2.0/include;Files/ gtkmm/include/glib-2.0;Files/gtkmm/lib/glib-2.0/include;Files/gtkmm/ lib/gtk-2.0/include;Files/gtkmm/include/cairomm-1.0;Files/gtkmm/ include/pango-1.0;Files/gtkmm/include/cairo;Files/gtkmm/include/ libpng12;Files/gtkmm/include/atk-1.0;-IE:/Program
GTKMM_INCLUDEDIR:INTERNAL=E:/Program;Files/gtkmm/include

Is this a bug of CMake? or anything I missed?

Might be a bug in FindGTKMM.cmake since it obviously works for FindBoost.cmake. I assume that the first is not well tested on Win32 platform.

Regards,
Werner

Thanks.

_______________________________________________
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

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499

_______________________________________________
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

Reply via email to