[CMake] static libs and more

Alin M Elena alin.elena at qub.ac.uk
Thu Jul 17 18:25:43 EDT 2008


Hi All,

I do not really think is any need to test if the lib is static or dynamic. In 
real life you should already now that.

Let us take as an example a package XXX we know from documentation that 
provides a static link libA.lib and a dynamic link libB.lib (windows case).

i want to write a module findXXX.cmake that I can use in a find_package command,

if I want a dynamic link i can use
find_package(XXX)
if I want static
find_package(XXX USE_STATIC)

somewhere inside I will have

if (USE_STATIC)
  give me libA.lib
else
 give me libB.lib
endif

So, in my line of thoughts there is no need to test the nature of the two 
libs. I assume their nature based on the documentation.

Alin

-- 
______________________________________________________________________ 
 "...if the universities will not study useless subjects, who will?" 
                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk 
alin.elena at qub.ac.uk
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080717/944620a3/attachment.htm>


More information about the CMake mailing list