[CMake] Passing requirements to users

Alexander Neundorf a.neundorf-work at gmx.net
Wed May 24 02:31:37 EDT 2006


> -------- Original-Nachricht --------
> Datum: Wed, 24 May 2006 00:09:12 +0100
> Von: James Mansion <james at wgold.demon.co.uk>
> An: <cmake at cmake.org>
> Betreff: [CMake] Passing requirements to users
> 
> (Another stupid noob question, sorry!)
> 
> bjam has a handy feature where I can define a build
> for a library and specify that a project that uses
> the library will automatically get certain settings,
> such as an appropriate #include and defines.
> 
> I don't seem to be able to do this automatically.
> 
> Have I missed something?

For external libs it usually works this way;

find_package(jpeg REQUIRED)

add_definitions(${JPEG_DEFINITIONS})
include_directories(${JPEG_INCLUDES})

...

target_link_libraries(myApp ${JPEG_LIBRARIES})

I.e. there are modules for each library, and these modules (should) define a standard set of variables whioch give you the required information.

Bye
Alex



-- 


Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
      Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
    


More information about the CMake mailing list