Re: [CMake] find_library questions

2010-08-04 Thread David Cole
find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX})


CMAKE_SHARED_LIBRARY_SUFFIX includes the "." though -- so take the "." out
of the above line.



On Wed, Aug 4, 2010 at 3:53 PM, Alexander Neundorf
wrote:

> On Wednesday 04 August 2010, Dennis Schridde wrote:
> > On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote:
> > > >> 1) Is it
> >
> > possible to
> >
> > > retrieve the path where find_library found the library?
> >
> > E.g. so I can setup
> >
> > > ..._LIBRARY_DIR correctly.
> > >
> > > Yes, see
> >
> > GET_FILENAME_COMPONENT.
> >
> > > 2) Is it possible to disable the "lib" prefix
> >
> > that find_library always seems to prepend when searching? I have a
> library
> >
> > that is called "thelibrary.so" instead of "libthelibrary.so".
> >
> > > Yes,
> >
> > specify name that you want to find. Like "NAMES libMyLib MyLib"
> > Ah, so NAMES
> >  specifies the literal name, while giving just  as a
> parameter
> > to find_library will prepend "lib" and append ".so"?
>
> No, Denis was only almost right.
>
> If one of the names has a suffix, this one is treated as a full filename
> and
> nothing will be prepended/appended.
> So
> find_library(THELIB NAMES thelibrary.so)
> or
> find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX})
> should do what you want.
>
> Alex
> ___
> 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
>
___
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] find_library questions

2010-08-04 Thread Alexander Neundorf
On Wednesday 04 August 2010, Dennis Schridde wrote:
> On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote:
> > >> 1) Is it
>
> possible to
>
> > retrieve the path where find_library found the library?
>
> E.g. so I can setup
>
> > ..._LIBRARY_DIR correctly.
> >
> > Yes, see
>
> GET_FILENAME_COMPONENT.
>
> > 2) Is it possible to disable the "lib" prefix
>
> that find_library always seems to prepend when searching? I have a library
>
> that is called "thelibrary.so" instead of "libthelibrary.so".
>
> > Yes,
>
> specify name that you want to find. Like "NAMES libMyLib MyLib"
> Ah, so NAMES
>  specifies the literal name, while giving just  as a parameter
> to find_library will prepend "lib" and append ".so"?

No, Denis was only almost right.

If one of the names has a suffix, this one is treated as a full filename and 
nothing will be prepended/appended.
So
find_library(THELIB NAMES thelibrary.so)
or 
find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX})
should do what you want.

Alex
___
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] Double linking / linking static libraries

2010-08-04 Thread Dennis Schridde
On Wednesday 04 August 2010 14:37:03 Eric Noulard wrote:
> 2010/8/4 Dennis
Schridde :
> > Otherwise I will suggest an update to our
admins. (Is
> > cmake-2.8 available for Fedora 12?)
> 
> Official F12 repo
contains 2.6.4
>
download.fedora.redhat.com/pub/fedora/linux/updates/12/i386/cmake-2.6.4-5.f

> c12.i686.rpm
> 
> Official F13 repo contains 2.8.0
>
download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/

> Packages/cmake-2.8.0-2.fc13.i686.rpm
> 
> Fedora/RedHat Rawhide contains
2.8.2
>
download.fedora.redhat.com/pub/fedora/linux/development/rawhide/i386/os/Pac

> kages/cmake-2.8.2-2.fc14.i686.rpm
> 
> Your sysadmin may probably rebuild a
2.8.2 RPM for F13 using the
> RawHide source rpm.
> 
> In any case they
should be able to build 2.8.2 RPM from CMake 2.8.2
> source using CPack
RPM.

Thank you! We downloaded the Fedora 14/rawhide SRPM and built
cmake-2.8.2-2 using that. It works fine.

Thanks to Clinton, too!

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] Dependencies on imported libraries

2010-08-04 Thread Dennis Schridde
On Sunday 01 August 2010 20:50:05 Dennis Schridde wrote:
> I just notice that
this command does not do what I expected it to do:
> 
> set_property(TARGET
MyLib PROPERTY IMPORTED_LOCATION
> "${MYLIB_DIR}/build")
> 
> Apparently it
sets the path to the *file* that is
> MyLib, not to the directory it is in.
Is there a property to set the path
> to the *directory*?
> With CMake
guessing how the library is named, based on the
> platform and the type of
library? (Should be rather easy, just assume that
> it has the same name as
a library that CMake would generate.)
Does anyone have a suggestion how to
do this?

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] Misleading error message when enforcing version from foo-config-version.cmake

2010-08-04 Thread Brad King
On 08/04/2010 11:30 AM, Brad King wrote:
>> find_package(Foo 6.6.6 REQUIRED NO_MODULE)
>>
>> and 6.6.6 is a non-valid version (i.e., PACKAGE_VERSION_COMPATIBLE is
>> set to FALSE in foo-config-version.cmake), then I get the error message
>> that foo-config.cmake is not found, instead of something related to the
>> request of an incompatible version.
> 
> IMO there is no difference between finding incompatible versions
> and no versions at all.  The required package is not present.

Oops, I hit send too soon.

I meant to add that the default message should be reworded when
a version has been requested.  The user reading the message should
be told what version he/she needs to find.  Take a look at the
source under Source/cmFindPackageCommand.cxx and send a proposed
patch.

Thanks,
-Brad
___
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] Misleading error message when enforcing version from foo-config-version.cmake

2010-08-04 Thread Brad King
On 08/04/2010 11:03 AM, Adolfo Rodríguez Tsouroukdissian wrote:
> The foo-config.cmake file is located OK, and:
> 
> find_package(Foo REQUIRED NO_MODULE)
> 
> works as expected.

Sorry, I mis-read your message.  The find_package call example clears it up.

> Now, if I do:
> 
> find_package(Foo 6.6.6 REQUIRED NO_MODULE)
> 
> and 6.6.6 is a non-valid version (i.e., PACKAGE_VERSION_COMPATIBLE is
> set to FALSE in foo-config-version.cmake), then I get the error message
> that foo-config.cmake is not found, instead of something related to the
> request of an incompatible version.

IMO there is no difference between finding incompatible versions
and no versions at all.  The required package is not present.

-Brad
___
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] Double linking / linking static libraries

2010-08-04 Thread Clinton Stimpson

FindQt4.cmake has been fixed so it doesn't potentially introduce this double 
linking problem.
If you can upgrade, 2.8 would help you.

Clint

On Aug 4, 2010, at 2:51 AM, Dennis Schridde wrote:

> I searched some more and found a trigger for this
> behaviour:
> 
> --
> PROJECT(test)
> cmake_minimum_required(VERSION
> 2.6)
> 
> find_package(Qt4
> REQUIRED)
> include(${QT_USE_FILE})
> 
> set(Boost_ADDITIONAL_VERSIONS 1.38 1.39
> 1.40 1.41 1.42)
> find_package(Boost REQUIRED COMPONENTS
> thread)
> 
> find_package(GLU REQUIRED)
> 
> find_package(JPEG
> REQUIRED)
> 
> ADD_EXECUTABLE(test test.cpp)
> TARGET_LINK_LIBRARIES(test
> ${QT_LIBRARIES} ${GLU_LIBRARY} ${Boost_LIBRARIES}
> ${JPEG_LIBRARIES})
> --
> 
> Removing either include(QTUSEFILE) or find(GLU)
> will make the double-linking go away. If both are present, jpeg and
> boost-thread will be double-linked:
> 
>  without find(GLU)
> 
> /usr/bin/c++ -fPIC CMakeFiles/test.dir/test.cpp.o  -o test
> -rdynamic -lQtGui -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor
> -lXinerama -lXfixes -lfreetype -lfontconfig -lXext -lX11 -lm -lQtCore -lz
> -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl -lboost_thread-mt -ljpeg 
> 
> with find(GLU) ---
> /usr/bin/c++ -fPIC CMakeFiles/test.dir/test.cpp.o  -o
> test -rdynamic -lQtGui -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor
> -lXinerama -lXfixes -lfreetype -lfontconfig -lXext -lX11 -lm -lQtCore -lz
> -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl -lGLU -lGL -lSM -lICE -lX11
> -lXext -lboost_thread-mt -ljpeg -lXi -lXrender -lXrandr -lXcursor -lXinerama
> -lXfixes -lfreetype -lfontconfig -lm -lQtCore -lz -lgthread-2.0 -lglib-2.0
> -lrt -lpthread -ldl -lGLU -lGL -lboost_thread-mt -ljpeg 
>  
> 
> I am
> using Fedora release 12 and cmake version 2.6-patch 4.
> The issue is not
> reproducible on Gentoo/Linux and cmake version 2.8.1.
> 
> Is cmake-2.6 still
> being maintained? Otherwise I will suggest an update to our admins. (Is
> cmake-2.8 available for Fedora 12?)
> 
> --Dennis
> ___
> 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

___
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] Misleading error message when enforcing version from foo-config-version.cmake

2010-08-04 Thread Adolfo Rodríguez Tsouroukdissian
2010/8/4 Brad King 

> On 08/04/2010 10:25 AM, Adolfo Rodríguez Tsouroukdissian wrote:
> > I'm writing a package config file foo-config.cmake, and I'm providing
> > version checking via the foo-config-version.cmake. Everything works
> > fine, but I've noticed that when version checking fails, the reported
> > error message is uninformative and misleading. It states:
>
> If you call
>
>  find_package(Foo NO_MODULE)
>
> you will get a better error message.
>

Different error message, but not better. I may have not been clear enough on
the situation. The foo-config.cmake file is located OK, and:

find_package(Foo REQUIRED NO_MODULE)

works as expected. Now, if I do:

find_package(Foo 6.6.6 REQUIRED NO_MODULE)

and 6.6.6 is a non-valid version (i.e., PACKAGE_VERSION_COMPATIBLE is set to
FALSE in foo-config-version.cmake), then I get the error message that
foo-config.cmake is not found, instead of something related to the request
of an incompatible version.

Cheers,

Adolfo


> > 
> > Could not find module FindFoo.cmake or a configuration file for
> >   package Foo.
> >
> >   Adjust CMAKE_MODULE_PATH to find FindFoo.cmake or set Foo_DIR
> >   to the directory containing a CMake configuration file for Foo.  The
> >   file will have one of the following names:
> >
> > FooConfig.cmake
> > foo-config.cmake
> > 
> >
> > I would expect something more in the lines of "Unable to find a
> > compatible Foo version.", which I can still provide in my
> > foo-config-version.cmake. I guess I would just like the above message
> > not to be shown to prevent user confusion (foo-config.cmake exists and
> > can be found). Does this sound like a ticket?.
>
> No, the current behavior is intentional.  The problem is that find_package
> has two modes.  First it looks for a FindXXX.cmake file and loads that if
> it finds one (module mode).  If it does not then it looks for XXXConfig
> (config mode) with XXX_DIR.  When the command was originally created we
> assumed that anyone that wants it to use FindXXX would ensure that it is
> in the CMAKE_MODULE_PATH before calling find_package(XXX).  Therefore we
> made the default error message talk about just XXX_DIR and not mention
> the module mode at all.  This is the type of message you seem to want.
> However, people that *did* want to use FindXXX in module mode but failed
> to put it in the CMAKE_MODULE_PATH complained that the error message
> gave no information about missing FindXXX and talked only about XXX_DIR.
>
> Now the message talks about both options.
>
> -Brad
> ___
> 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
>
___
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] eliminating -blibpath on AIX

2010-08-04 Thread Verweij, Arjen
Patch Modules/Platform/AIX.cmake ?

>-Original Message-
>From: Dave Semeraro [mailto:semer...@ncsa.illinois.edu]
>Sent: woensdag 4 augustus 2010 16:42
>To: Verweij, Arjen
>Subject: Re: [CMake] eliminating -blibpath on AIX
>
>
>Arjen and Denis, Neither suggestion worked. There seems to be no way to
>get rid of the -blibpath:/usr/lib:lib at the end of the link command.
>Unfortunately, it seems that under aix this is all that goes into the
>loader section of the executable and so all the other libs that are
>linked are not found. I can get around this with the LIBPATH env
>variable but I really dont want to. If there is no -blibpath at link
>time the loader section of the executable gets packed with the
>directories specified by the -L option to ld. Which is what I want. I
>suppose I can go the other route and just include all those libraries in
>the -blibpath option string. Not the most elegant solution. But then
>again elegance is overrated.
>
>Dave
>- Original Message -
>> SKIP_BUILD_RPATH ?
>>
>> >-Original Message-
>> >From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
>> >Behalf
>> >Of Dave Semeraro
>> >Sent: woensdag 4 augustus 2010 15:58
>> >To: cmake@cmake.org
>> >Subject: [CMake] eliminating -blibpath on AIX
>> >
>> >
>> >Hello,
>> >
>> >I am building projects on an AIX system and I want the contents of
>> >the
>> >link.txt file to not include the -blibpath information at the end. I
>> >have tried all combinations of the CMAKE_SKIP_RPATH and other rpath
>> >related commands and can not get rid of it. I have read the rpath
>> >info
>> >on the wiki. Is there a setting for cmake that will allow me to do
>> >this
>> >or do I have to edit the link.txt files by hand. I would rather not
>> >do
>> >that as there are lots of them.
>> >
>> >Best,
>> >Dave Semeraro
>> >NCSA - University of Illinois
>> >___
>> >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
>> ___
>> 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
___
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] Misleading error message when enforcing version from foo-config-version.cmake

2010-08-04 Thread Brad King
On 08/04/2010 10:25 AM, Adolfo Rodríguez Tsouroukdissian wrote:
> I'm writing a package config file foo-config.cmake, and I'm providing
> version checking via the foo-config-version.cmake. Everything works
> fine, but I've noticed that when version checking fails, the reported
> error message is uninformative and misleading. It states:

If you call

  find_package(Foo NO_MODULE)

you will get a better error message.

> 
> Could not find module FindFoo.cmake or a configuration file for
>   package Foo.
> 
>   Adjust CMAKE_MODULE_PATH to find FindFoo.cmake or set Foo_DIR
>   to the directory containing a CMake configuration file for Foo.  The
>   file will have one of the following names:
> 
> FooConfig.cmake
> foo-config.cmake
> 
> 
> I would expect something more in the lines of "Unable to find a
> compatible Foo version.", which I can still provide in my
> foo-config-version.cmake. I guess I would just like the above message
> not to be shown to prevent user confusion (foo-config.cmake exists and
> can be found). Does this sound like a ticket?.

No, the current behavior is intentional.  The problem is that find_package
has two modes.  First it looks for a FindXXX.cmake file and loads that if
it finds one (module mode).  If it does not then it looks for XXXConfig
(config mode) with XXX_DIR.  When the command was originally created we
assumed that anyone that wants it to use FindXXX would ensure that it is
in the CMAKE_MODULE_PATH before calling find_package(XXX).  Therefore we
made the default error message talk about just XXX_DIR and not mention
the module mode at all.  This is the type of message you seem to want.
However, people that *did* want to use FindXXX in module mode but failed
to put it in the CMAKE_MODULE_PATH complained that the error message
gave no information about missing FindXXX and talked only about XXX_DIR.

Now the message talks about both options.

-Brad
___
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] eliminating -blibpath on AIX

2010-08-04 Thread Brad King
On 08/04/2010 09:57 AM, Dave Semeraro wrote:
> I am building projects on an AIX system and I want the contents of the 
> link.txt file to not include the -blibpath information at the end. I have 
> tried all combinations of the CMAKE_SKIP_RPATH and other rpath related 
> commands and can not get rid of it. I have read the rpath info on the wiki. 
> Is there a setting for cmake that will allow me to do this or do I have to 
> edit the link.txt files by hand. I would rather not do that as there are lots 
> of them. 

This should do it:

  set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH "")

See the comment in "Modules/Platform/AIX.cmake" in the CMake
installation.  Also see the "libpath" comments in the source
tree at "Source/cmComputeLinkInformation.cxx".

-Brad
___
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] Misleading error message when enforcing version from foo-config-version.cmake

2010-08-04 Thread Adolfo Rodríguez Tsouroukdissian
Hi all,

I'm writing a package config file foo-config.cmake, and I'm providing
version checking via the foo-config-version.cmake. Everything works fine,
but I've noticed that when version checking fails, the reported error
message is uninformative and misleading. It states:


Could not find module FindFoo.cmake or a configuration file for
  package Foo.

  Adjust CMAKE_MODULE_PATH to find FindFoo.cmake or set Foo_DIR
  to the directory containing a CMake configuration file for Foo.  The
  file will have one of the following names:

FooConfig.cmake
foo-config.cmake


I would expect something more in the lines of "Unable to find a compatible
Foo version.", which I can still provide in my foo-config-version.cmake. I
guess I would just like the above message not to be shown to prevent user
confusion (foo-config.cmake exists and can be found). Does this sound like a
ticket?.

TIA,

Adolfo

-- 
Adolfo Rodríguez Tsouroukdissian, Ph. D.

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
contener información privilegiada y/o confidencial que está dirigida
exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
destinatario indicado, o el empleado encargado de su entrega a dicha
persona, por favor, notifíquelo inmediatamente y remita el mensaje original
a la dirección de correo electrónico indicada. Cualquier copia, uso o
distribución no autorizados de esta comunicación queda estrictamente
prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
contain confidential information which is privileged and intended only for
the individual or entity to whom they are addressed.  If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution or use of this e-mail and/or accompanying document(s) is
strictly prohibited.  If you have received this e-mail in error, please
immediately notify the sender at the above e-mail address.
___
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] eliminating -blibpath on AIX

2010-08-04 Thread Verweij, Arjen
SKIP_BUILD_RPATH ?

>-Original Message-
>From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf
>Of Dave Semeraro
>Sent: woensdag 4 augustus 2010 15:58
>To: cmake@cmake.org
>Subject: [CMake] eliminating -blibpath on AIX
>
>
>Hello,
>
>I am building projects on an AIX system and I want the contents of the
>link.txt file to not include the -blibpath information at the end. I
>have tried all combinations of the CMAKE_SKIP_RPATH and other rpath
>related commands and can not get rid of it. I have read the rpath info
>on the wiki. Is there a setting for cmake that will allow me to do this
>or do I have to edit the link.txt files by hand. I would rather not do
>that as there are lots of them.
>
>Best,
>Dave Semeraro
>NCSA - University of Illinois
>___
>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
___
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] eliminating -blibpath on AIX

2010-08-04 Thread Dave Semeraro

Hello,

I am building projects on an AIX system and I want the contents of the link.txt 
file to not include the -blibpath information at the end. I have tried all 
combinations of the CMAKE_SKIP_RPATH and other rpath related commands and can 
not get rid of it. I have read the rpath info on the wiki. Is there a setting 
for cmake that will allow me to do this or do I have to edit the link.txt files 
by hand. I would rather not do that as there are lots of them. 

Best,
Dave Semeraro
NCSA - University of Illinois
___
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] linking large lib on windows 64 bit

2010-08-04 Thread Verweij, Arjen
Hi,

I'm trying to link my project on Windows. Part of the task is constructing a 
big archive. Relevant compilers: Intel C/C++, Intel Fortran, Microsoft VS 2005 
SE SP1.

Apparently the link line is too long (expanded command line lib bla too long).

I have attempted to circumvent it with:

# create a C++ static library
#SET(CMAKE_CXX_CREATE_STATIC_LIBRARY  "lib ${CMAKE_CL_NOLOGO}  
/out:  ")
 SET(CMAKE_CXX_CREATE_STATIC_LIBRARY  "lib ${CMAKE_CL_NOLOGO}  
/out: ${CMAKE_START_TEMP_FILE}  ${CMAKE_END_TEMP_FILE} ")

according to http://www.itk.org/Bug/view.php?id=7217 - but cmake doesn't fill 
in the link flags. Is Bill's suggestion to patch Windows-cl.cmake the fix, or 
is it fix otherwise?

Regards,
Arjen
___
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] Double linking / linking static libraries

2010-08-04 Thread Eric Noulard
2010/8/4 Dennis Schridde :
>
> I am
> using Fedora release 12 and cmake version 2.6-patch 4.
> The issue is not
> reproducible on Gentoo/Linux and cmake version 2.8.1.
>
> Is cmake-2.6 still being maintained?

I don't think so.
I think Bill told that 2.6.4 was the last release for 2.6.x.

> Otherwise I will suggest an update to our admins. (Is
> cmake-2.8 available for Fedora 12?)

Official F12 repo contains 2.6.4
download.fedora.redhat.com/pub/fedora/linux/updates/12/i386/cmake-2.6.4-5.fc12.i686.rpm

Official F13 repo contains 2.8.0
download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/Packages/cmake-2.8.0-2.fc13.i686.rpm

Fedora/RedHat Rawhide contains 2.8.2
download.fedora.redhat.com/pub/fedora/linux/development/rawhide/i386/os/Packages/cmake-2.8.2-2.fc14.i686.rpm

Your sysadmin may probably rebuild a 2.8.2 RPM for F13 using the
RawHide source rpm.

In any case they should be able to build 2.8.2 RPM from CMake 2.8.2
source using CPack RPM.



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.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] Can cmake be used to build WDK driver applications?

2010-08-04 Thread Ryan Pavlik

 On 8/4/10 4:16 AM, Mr Shore wrote:

Hi all,
I'm going to develop a WDK 
 driver , not 
sure whether cmake can help simplify the makefiles this time?

Thanks!

Should be doable, though I haven't tried it.  You'll need to find or 
create find_package modules for the WDK components you need, and you may 
also need to add a custom command post_build to sign the binary.


Ryan

--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com/

___
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] Can cmake be used to build WDK driver applications?

2010-08-04 Thread Mr Shore
Hi all,

I'm going to develop a
WDKdriver ,
not sure whether cmake can help simplify the makefiles this time?

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

Re: [CMake] Double linking / linking static libraries

2010-08-04 Thread Dennis Schridde
I searched some more and found a trigger for this
behaviour:

--
PROJECT(test)
cmake_minimum_required(VERSION
2.6)

find_package(Qt4
REQUIRED)
include(${QT_USE_FILE})

set(Boost_ADDITIONAL_VERSIONS 1.38 1.39
1.40 1.41 1.42)
find_package(Boost REQUIRED COMPONENTS
thread)

find_package(GLU REQUIRED)

find_package(JPEG
REQUIRED)

ADD_EXECUTABLE(test test.cpp)
TARGET_LINK_LIBRARIES(test
${QT_LIBRARIES} ${GLU_LIBRARY} ${Boost_LIBRARIES}
${JPEG_LIBRARIES})
--

Removing either include(QTUSEFILE) or find(GLU)
will make the double-linking go away. If both are present, jpeg and
boost-thread will be double-linked:

 without find(GLU)

/usr/bin/c++ -fPIC CMakeFiles/test.dir/test.cpp.o  -o test
-rdynamic -lQtGui -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor
-lXinerama -lXfixes -lfreetype -lfontconfig -lXext -lX11 -lm -lQtCore -lz
-lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl -lboost_thread-mt -ljpeg 

with find(GLU) ---
/usr/bin/c++ -fPIC CMakeFiles/test.dir/test.cpp.o  -o
test -rdynamic -lQtGui -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXcursor
-lXinerama -lXfixes -lfreetype -lfontconfig -lXext -lX11 -lm -lQtCore -lz
-lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl -lGLU -lGL -lSM -lICE -lX11
-lXext -lboost_thread-mt -ljpeg -lXi -lXrender -lXrandr -lXcursor -lXinerama
-lXfixes -lfreetype -lfontconfig -lm -lQtCore -lz -lgthread-2.0 -lglib-2.0
-lrt -lpthread -ldl -lGLU -lGL -lboost_thread-mt -ljpeg 
 

I am
using Fedora release 12 and cmake version 2.6-patch 4.
The issue is not
reproducible on Gentoo/Linux and cmake version 2.8.1.

Is cmake-2.6 still
being maintained? Otherwise I will suggest an update to our admins. (Is
cmake-2.8 available for Fedora 12?)

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] find_library questions

2010-08-04 Thread Dennis Schridde
On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote:
> >> 1) Is it
possible to
> 
> retrieve the path where find_library found the library?
E.g. so I can setup
> ..._LIBRARY_DIR correctly.
> 
> Yes, see
GET_FILENAME_COMPONENT.
> 
> 2) Is it possible to disable the "lib" prefix
>
that find_library always seems to prepend when searching? I have a library
>
that is called "thelibrary.so" instead of "libthelibrary.so".
> 
> Yes,
specify name that you want to find. Like "NAMES libMyLib MyLib"
Ah, so NAMES
 specifies the literal name, while giving just  as a parameter
to find_library will prepend "lib" and append ".so"?
Or is that automatism
also included when specifying NAMES , but more alternatives are
tried?

Thank you for your answers,
Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] find_library questions

2010-08-04 Thread Denis Scherbakov
>> 1) Is it possible to
retrieve the path where find_library found the library? E.g. so I can setup
..._LIBRARY_DIR correctly.

Yes, see GET_FILENAME_COMPONENT.

2) Is it possible to disable the "lib" prefix
that find_library always seems to prepend when searching? I have a library
that is called "thelibrary.so" instead of "libthelibrary.so".

Yes, specify name that you want to find. Like "NAMES libMyLib MyLib"

Denis


  

___
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] find_library questions

2010-08-04 Thread Dennis Schridde
Hello!

I have two questions concerning find_library:

1) Is it possible to
retrieve the path where find_library found the library? E.g. so I can setup
..._LIBRARY_DIR correctly.

2) Is it possible to disable the "lib" prefix
that find_library always seems to prepend when searching? I have a library
that is called "thelibrary.so" instead of "libthelibrary.so".

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] Double linking / linking static libraries

2010-08-04 Thread Dennis Schridde
On Wednesday 04 August 2010 09:14:29 Ryan Pavlik wrote:
>   On 8/4/10 2:06
AM, Denis Scherbakov wrote:
> >>> * I also set link_directories to paths
containing the
> > 
> > libraries.
> > 
> > This is wrong. LINK_DIRECTORIES
should be a list of directories, where
> > libraries might be located, but
not the libraries itself.
> 
> Or better yet, skip the link_directories
command and use full paths to
> your libraries (as a find script should do)
as arguments to
> target_link_libraries.
> 
> Do you have any circular
dependencies?  If you do, libraries will need
> to be linked twice to get
all of the symbols resolved properly, in which
> case this is a
feature.
Shouldn't be. In fact all libraries seem to be linked two times.
This includes things like GL, GLU, Boost, Qt. I do not think there are any
dependencies involving them (except maybe Qt -> GL/GLU, but certainly not
the other way round).

> Is the double-linking actually causing a
> failure
to build?
Yes, it causes a build failure when I try to link the static
library (some DLL loader containing just two functions).

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] Double linking / linking static libraries

2010-08-04 Thread Dennis Schridde
On Wednesday 04 August 2010 09:06:06 Denis Scherbakov wrote:
> >> * I also
set link_directories to paths containing the libraries.
> 
> This is wrong.
LINK_DIRECTORIES should be a list of directories, where
> libraries might be
located, but not the libraries itself.
Er, sorry, I meant to paths to
directories containing the libraries:

link_directories(${QT_LIBRARY_DIR}
${GLU_LIBRARY_DIR} ${OPENMESH_LIBRARY_DIR} ${BOOST_LIBRARY_DIR}
${VIRTUOSE_LIBRARY_DIR})

In fact most of these directories are empty,
except for the Qt and Boost paths. (Still these two are linked two
times.)


Brings me to another question:
Is it possible to get the path to
the library from find_library?

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
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] Double linking / linking static libraries

2010-08-04 Thread Ryan Pavlik

 On 8/4/10 2:06 AM, Denis Scherbakov wrote:

* I also set link_directories to paths containing the

libraries.

This is wrong. LINK_DIRECTORIES should be a list of directories, where 
libraries might be located, but not the libraries itself.

Or better yet, skip the link_directories command and use full paths to 
your libraries (as a find script should do) as arguments to 
target_link_libraries.


Do you have any circular dependencies?  If you do, libraries will need 
to be linked twice to get all of the symbols resolved properly, in which 
case this is a feature.  Is the double-linking actually causing a 
failure to build?


Ryan

--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com/

___
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] Double linking / linking static libraries

2010-08-04 Thread Denis Scherbakov
>> * I also set link_directories to paths containing the
libraries.

This is wrong. LINK_DIRECTORIES should be a list of directories, where 
libraries might be located, but not the libraries itself.


  

___
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