[CMake] Unnecessary ordering breaks existing CMakeLists.txt

Dataflow dataflow at mtnl.net.in
Wed Aug 16 12:20:51 EDT 2006


Hi Brad,

1) While choosing libraries to be linked for debug/release, I am getting the
following error:
----
It is impossible to order the linker search path in such a way that
libraries specified as full paths will be picked by the linker.
Directories and libraries involved are:
Directory: i:\Projects\dcls\winbuild\Debug contains:
Library: i:/Projects/dcls/winbuild/Release/dfslib.lib

Directory: i:\Projects\dcls\winbuild\Release contains:
Library: i:/Projects/dcls/winbuild/Debug/dfslib.lib
----
This is confusing at best!! How does the Release directory contain the debug
lib and vice varsa?

Is this because (as per windows convention) both the libs use the same name
'dfslib.lib'? (It is a plain static library.)
Nowhere I am using 'LINK_DIRECTORIES' any longer.
Any suggestions to resolve this?

2) Can I suggest to change the 'Error' dialog (of ccmake) to use a read-only
edit field instead of a static field, so that the error messages can be
easily copied for pasting... That will avoid having to type the long error
messages (such as above) by hand.

3) The brain teaser..
Debug = debug
Release = release
MinSizeRel = optimized
RelWithDebInfo = ????

Thanks!
- Rajiv





----- Original Message ----- 
From: "Dataflow" <dataflow at mtnl.net.in>
To: "Brad King" <brad.king at kitware.com>
Cc: <cmake at cmake.org>
Sent: Wed, 16 Aug 2006 8:58 PM
Subject: Re: [CMake] Unnecessary ordering breaks existing CMakeLists.txt


>
> ----- Original Message ----- 
> From: "Brad King" <brad.king at kitware.com>
> To: "Dataflow" <dataflow at vsnl.com>
> Cc: <cmake at cmake.org>
> Sent: Wed, 16 Aug 2006 8:51 PM
> Subject: Re: [CMake] Unnecessary ordering breaks existing CMakeLists.txt
>
>
> > Dataflow wrote:
> > > ----- Original Message ----- 
> > > From: "Brad King" <brad.king at kitware.com>
> > >> find_package(foo)
> > >> target_link_libraries(app ${foo_libraries})
> > >>
> > >> where foo_libraries contains something like
> > >> "/path/to/libfoo1.so;/path/to/libfoo2.so".
> > >
> > > Tried that, but could not figure out how exactly to specify the
> libraries
> > > under Windows, where the debug/release libraries need to be picked
> > > appropriately. Giving both paths makes CMake pick up the first one,
> instead
> > > of one matching the needed build type. Your help (with a case where
the
> lib
> > > is also made by CMake - this ought to be directly supported... and
> > > otherwise) will be most appreciated.
> >
> > FOO_LIBRARIES can be set like this:
> >
> > find_library(FOO1_LIBRARY_DEBUG NAMES foo1d ...)
> > find_library(FOO1_LIBRARY_RELEASE NAMES foo1 ...)
> > find_library(FOO2_LIBRARY_DEBUG NAMES foo2d ...)
> > find_library(FOO2_LIBRARY_RELEASE NAMES foo2 ...)
> > set(FOO1_LIBRARY debug ${FOO1_LIBRARY_DEBUG}
> >                  release ${FOO1_LIBRARY_RELEASE})
> > set(FOO2_LIBRARY debug ${FOO2_LIBRARY_DEBUG}
> >                  release ${FOO2_LIBRARY_RELEASE})
> > set(FOO_LIBRARIES ${FOO1_LIBRARY} ${FOO2_LIBRARY})
> >
> > See FindQt4 for a non-trivial example of finding alot of libraries with
> > multiple configurations:
> >
> >
>
http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/FindQt4.cmake?root=CMake&view=markup
>
> Ok, thanks for the pointer. Will use a scheme similar to what you have
> indicated.
>
>
> >
> > > The wiki example shows only Unix case.
> >
> > Where did you see this example on the Wiki?
>
> I am referring to:
> http://www.cmake.org/Wiki/CMake_HowToFindInstalledSoftware
>
> - Rajiv
>
> >
> > Thanks,
> > -Brad
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



More information about the CMake mailing list