[CMake] Generating shared libraries on Visual 8.0

Werner Smekal smekal at iap.tuwien.ac.at
Tue Sep 30 03:44:36 EDT 2008


Hi Julien,
>
> In our "Mastering CMake" book, it is said that if you do not specify  
> anything in ADD_LIBRARY, then it uses the BUILD_SHARED_LIBS variable  
> to determine if it should build static or shared libraries. Should  
> we set this variable to SHARED/STATIC or to 1/0 as it is recommended  
> in cmake 2.6 online documentation ? Maybe we did misread the book as  
> we are setting BUILD_SHARED_LIBS to SHARED or STATIC. The strange  
> thing is that it is working fine on linux-like OS ...

BUILD_SHARED_LIBS should be set to ON/OFF (maybe also 0/1), e.g. cmake  
-DBUILD_SHARED_LIBS=ON pathtosrc. Funny that it works in Linux  
though ....

Regards,
Werner

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: smekal at iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499



More information about the CMake mailing list