Re: [CMake] Generating shared libraries on Visual 8.0

2008-09-30 Thread Michael Jackson
This is what I use: # Build shared libraries OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) SET (LIB_TYPE STATIC) SET (MXA_BUILT_AS_DYNAMIC_LIB) IF (BUILD_SHARED_LIBS) SET (LIB_TYPE SHARED) SET (MXA_BUILT_AS_DYNAMIC_LIB 1) IF (WIN32) ADD_DEFINITIONS("-DMXA_BUILT_AS_DYNAMIC_LIB"

Re: [CMake] Generating shared libraries on Visual 8.0

2008-09-30 Thread Werner Smekal
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

Re: [CMake] Generating shared libraries on Visual 8.0

2008-09-30 Thread Julien Michel
Stefan Buschmann a écrit : How do you create those libraries in your CMakeLists.txt? To build a shared library, you usually only need to specify "SHARED" when calling ADD_LIBRARY, e.g. ADD_LIBRARY(MyProject SHARED ${PROJECT_SOURCES}) If you want to decide whether to build static or dynamic li

Re: [CMake] Generating shared libraries on Visual 8.0

2008-09-29 Thread Stefan Buschmann
How do you create those libraries in your CMakeLists.txt? To build a shared library, you usually only need to specify "SHARED" when calling ADD_LIBRARY, e.g. ADD_LIBRARY(MyProject SHARED ${PROJECT_SOURCES}) If you want to decide whether to build static or dynamic libraries based on a variable

[CMake] Generating shared libraries on Visual 8.0

2008-09-29 Thread Julien Michel
Dear Cmake user, I am still having trouble when trying to generate shared libraries on visual (7.1 and 8.0). I am correctly taggin the __declspec(dllexport)/__declspec(dllimport) when choosing SHARED_LIBRARIES in the cmake configuration process. But When I open the properties of a given li