[CMake] [patch] cmake-2.8.1 and png-1.4.2

2010-06-19 Thread Thomas Klausner
Hi!

I've updated png in pkgsrc to 1.4.2 and had to fix some programs to
compile against that version.

cmake didn't find the png library at all, since it was renamed
(again). The attached patch fixes the problem, please include it in
the next release.

Thanks,
 Thomas
$NetBSD: patch-ad,v 1.7 2010/06/13 22:44:03 wiz Exp $

--- Modules/FindPNG.cmake.orig  2010-04-06 14:45:31.0 +
+++ Modules/FindPNG.cmake
@@ -33,7 +33,7 @@ if(ZLIB_FOUND)
   /usr/local/include/libpng # OpenBSD
   )
 
-  set(PNG_NAMES ${PNG_NAMES} png libpng png12 libpng12)
+  set(PNG_NAMES ${PNG_NAMES} png libpng png12 libpng12 png14 libpng14)
   find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
 
   if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
___
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] Need some help building OS X Framework

2010-06-19 Thread Flavio Castelli
Hello, I'm the maintainer of qjson[1], a qt-based library. I'm trying
to use cmake to build a OS X framework but I have some problems.
I have not been able to find updated information neither on the
mailing list nor on the wiki. So at the "Tests/Framework" project
shipped with cmake sources.
I made some changes to my code and I have been able to build a
framework of my library. Unfortunately the framework doesn't contain
the headers of my library.

This [2] is my modified CMakeLists.txt file, could you help me finding
what is wrong?

I'm using cmake 2.8.1 built using mac ports on OS X 10.5.8

Thanks in advance,
Flavio

[1] http://qjson.sourceforge.net/
[2] http://gitorious.org/qjson/qjson/blobs/osx/src/CMakeLists.txt
___
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] Ralph Barth/AEH/DBS/GDB ist außer Haus .

2010-06-19 Thread Ralph . Barth

Ralph Barth will be out of the office starting  19.06.2010 and will be
returning on 30.06.2010.

Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.




Deutsche Börse Systems AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Reto Francioni
Executive Board/Vorstand:
Michael Kuhn (Chief Executive Officer/Vorsitzender),
Yves Baguet (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gerhard Leßmann.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister:
Local court/Amtsgericht Frankfurt am Main HRB 42413.

-
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead

___
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] Various problems deploying a python module

2010-06-19 Thread Janosch Peters

On 2010-06-18 08:29:25 +0200, Michael Hertling said:


On 06/17/2010 04:23 PM, Janosch Peters wrote:

I have two python frameworks on my mac: Python2.5 which comes with OS
X, and python2.6 from macports. If I just use
FIND_PACKAGE(PythonInterp) and FIND_PACKAGE(PythonLibs) I end up
getting the python2.6 interpreter from macports but the python2.5 libs
from OS X.


Have you already tried variables like CMAKE_PREFIX_PATH et al. to
direct the find functions to your preferred python installation?


I tried CMAKE_PREFIX_PATH and also CMAKE_FRAMEWORK_PATH but the 
behaviour did not change. So I digged a bit into the modules code and 
found out that the default macports framework prefix is already 
recognized when looking for frameworks. However, as you can see in the 
snippet below (it's from FindPythonLib), cmake just adds -framework 
Python which apperantly defaults to the apple provided frameworks. It 
seems to me that you cannot change that behaviour in any way, but by 
changing the FindPythonLibs code. Correct me if Im wrong.


BTW, the macro CMAKE_FIND_FRAMEWORKS doesent care about 
CMAKE_FRAMEWORK_PATH at all. I would consider that a bug.


I think the way to go would be to change CMAKE_FIND_FRAMEWORKS to make 
it recognise CMAKE_FRAMEWORK_PATH and use the first framework found in 
it to pass it to the "-frameworks" option and if none is found, just 
default to the apple system framework.


For the time being, I think I have to stick to my (very ugly) solution.

cheers,
Janosch


= Snippet from FindPythonLibs ==

# Python Should be built and installed as a Framework on OSX
IF(Python_FRAMEWORKS)
 # If a framework has been selected for the include path,
 # make sure "-framework" is used to link it.
 IF("${PYTHON_INCLUDE_DIR}" MATCHES "Python\\.framework")
   SET(PYTHON_LIBRARY "")
   SET(PYTHON_DEBUG_LIBRARY "")
 ENDIF("${PYTHON_INCLUDE_DIR}" MATCHES "Python\\.framework")
 IF(NOT PYTHON_LIBRARY)
   SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python 
Framework" FORCE)

 ENDIF(NOT PYTHON_LIBRARY)
 IF(NOT PYTHON_DEBUG_LIBRARY)
   SET (PYTHON_DEBUG_LIBRARY "-framework Python" CACHE FILEPATH 
"Python Framework" FORCE)

 ENDIF(NOT PYTHON_DEBUG_LIBRARY)
ENDIF(Python_FRAMEWORKS)


___
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] vcproj2cmake.rb script: announcing new version / hosting questions

2010-06-19 Thread Andreas Mohr
On Mon, Jun 14, 2010 at 09:54:58AM -0400, Bill Hoffman wrote:
> On 6/14/2010 8:31 AM, Mike Jackson wrote:
>> Put the scripts in the cmake wiki and put it into the public domain.
>> Easiest for all.
>>
>
> To be compatible with CMake, I would say a BSD license would be the  
> best.  gitorious might be a good starting place.  We tried the converter  
> here, and it created some odd CMAKE_BUILD_TYPE stuff in the CMake files,  
> that looked like it would not work with the IDE generators.  
> CMAKE_BUILD_TYPE is NOT used for IDE project files.

JFYI:

I just created http://sourceforge.net/projects/vcproj2cmake/ ,
indicating BSD license and pushing the files into a GIT repository
(content still is pretty rough, no README, licensing, usage parts
or example files yet).

CMake Wiki links have been updated, too.

Current version should now be able to handle multi-configuration generators
in a much better way (though I still haven't tried it yet ;).

Andreas Mohr
___
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] Cmake and Libltdl

2010-06-19 Thread Carlos Lopez Gonzalez
On  Fri, 18 
Jun 2010 11:23:48 +0200 Andreas Mohr wrote:

>On Thu, Jun 17, 2010 at 10:25:10AM 
-0400, cmake-requ...@cmake.org wrote:
>> Hi,
>> I'm new to 
cmake and want to port a C++ project which is now built using autotools 
to cmake build system.
>> The project has some libraries (we call 
them modules) which are used in two applications. The applications uses 
lt_dladdsearchdir to add the path where to search the modules and >then 
uses the lt_dlopenext and lt_dlsym to register the modules.
>> When using cmake, do I need to use ltdl as well or will cmake replace the 
way the libraries are found and registered?
>
>I'm now using a CMake setup with ltdl as well, and AFAIK there are no
>special "usability 
improvements" provided for plugins to be loaded via ltdl.
>
>Probably one needs to add lt_dladdsearchdir() to match all the various 
>differing
>plugin library paths that the CMake configuration might produce on various 
platforms
'>til one's nose gets green...
>
>However, of course a 
probably very elegant solution is to add a
>PROJ_PLUGIN_DIR_BUILD=... 
and/or PROJ_PLUGIN_DIR_INSTALL=...
>to COMPILE_DEFINITIONS property or add_definitions(),
>and then to simply use that in the project source to achieve a precise path:
>#ifndef PROJ_PLUGIN_DIR_BUILD
>#define 
PROJ_PLUGIN_DIR_BUILD "some_random_hardcoded_fallback"
>#endif
>lt_dladdsearchdir(PROJ_PLUGIN_DIR_BUILD);
>lt_dladdsearchdir("random_hardcoded_dir_a");
>lt_dladdsearchdir("random_hardcoded_dir_b");
>
>
>PROJ_PLUGIN_DIR_BUILD could probably be figured out using things such as
>${LIBRARY_OUTPUT_PATH} or ${CMAKE_BINARY_DIR}/...
>
>Andreas Mohr

Hi Andreas

As mentioned in the other reply, the application loads the libraries in a book 
of libraries using the ltdl utilities. 
None of the usage of the libraries are hardcoded  because they are instantiated 
based on the name of the library needed.
I now understand what's the libltdl usage and why it is not replaced by the 
cmake ability to link the libraries in a dynamic way.
Wish me good luck with the implementation of the migration.
Thanks you all.

Carlos López
http://synfig.org



  
___
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] CMake Digest, Vol 74, Issue 62

2010-06-19 Thread Carlos Lopez Gonzalez

>On Fri, 18 Jun 2010 10:40:46 +0200 Michael Hertling wrote:

>On 06/17/2010 11:29 AM, Carlos Lopez Gonzalez wrote:
>> Hi,
>> I'm new to cmake and want to port a C++ project which is now built using 
>> autotools to cmake build system.
>> The project has some libraries (we call them modules) which are used in two 
>> applications. The applications uses lt_dladdsearchdir to add the path where 
>> to search the modules and >then uses the lt_dlopenext and lt_dlsym to 
>> register the modules.
>> When using cmake, do I need to use ltdl as well or will cmake replace the 
>> way the libraries are found and registered?
>
>If your project's libraries are actually to be loaded dynamically at
>the behest of the applications, i.e. "dlopened", you further need a
>library to achieve this as it is a runtime affair and, thus, beyond
>CMake's scope, so stay with libltdl or switch to the simpler libdl,
>e.g., if you want to get rid of the libtool stuff. In either case,
>you should build dlopened libraries with ADD_LIBRARY(...MODULE...)
>in order to prevent other binaries to link against them explicitly.
>
>If your libraries don't need to be dlopened - your question somewhat
>seems to be targeted on this - you should build them as ordinary shared
>libraries with ADD_LIBRARY(...SHARED...) and link other binaries against
>them with TARGET_LINK_LIBRARIES(), so the runtime linker automatically
>takes care to load them when the applications are launched. To ensure
>they are found after being installed at a perhaps unusual location,
>look at CMake's RPATH support, e.g.:
>
>
>
>'hope that helps.
>
>Regards,
>
>Michael


Hi Michael, now it makes much more sense. For whom has curiosity the project in 
particular is Synfig (http://synfig.org)
Synfig is a a2D vector animation program and it has layers, importers and 
exporters. In Synfig, layers, importers and exporters
instances are created based on a "book" of layers, importers or exporters. The 
program reads from file or from the user interaction 
what's the layer it needs to create based on the layer's name, what's the 
exporter it needs to create based on the extension of the file to 
export or what's the importer to instantiate based on the extension of the file 
which is being imported. So each "module" (layer, importer
or exporter) is never called directly (like any other library) by the class 
name but by a "factory" (a pointer to the constructor) that is stored
at the start up of the application in a book (std:map) of modules. So in one 
way or other, the application needs to know the pointer to the 
module before it is needed, so that's the reason for use libltdl. 
Thanks for pointing me to libld which I'll take a look. 
In any case, the ADD_LIBRARY are needed, right?

Thanks 

Carlos López


  
___
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