Hi,

I need to write a FindModule which search static and shared version of my lib. 
I need both on my project (there is a diff between static and dynamic lib).

I would like to import my lib using add_library : 

add_library(Foo::MyLib STATIC IMPORTED)
add_library(Foo::MyLib SHARED IMPORTED)

This one will not works (same name) and I will not be able to distinguish 
static and shared. 
By default, I would like that MyLib point to shared (what find_library find by 
default). But If I specify something (what ?), I would like to use static lib 
during link.

target_link_libraries(myProg Foo::MyLib) -> link to shared version

do something()
target_link_libraries(myProg Foo::MyLib) -> link to static version 
restore shared ?

I would like to know what is the standard name, convention to import library 
static and shared ? (MyLib.a and MyLib.so)
* Two names ? (Foo::MyLib, Foo::MyLibStatic) ? (Foo::MyLib, Foo::Static::MyLib) 
?
* Two configurations ? How to use it ?

Thank you,

John


___________________________________________________________
Mode, hifi, maison,… J'achète malin. Je compare les prix avec Voila.fr 
http://shopping.voila.fr/
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to