[CMake] Unnecessary ordering breaks existing CMakeLists.txt

Dataflow dataflow at mtnl.net.in
Wed Aug 16 11:28:40 EDT 2006


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



More information about the CMake mailing list