[CMake] Dll API in static build

Totte Karlsson totte at dunescientific.com
Wed May 16 18:15:02 EDT 2012


Hi,
I am building a C++ library, using Cmake. When creating the build files from 
CMkae UI, I have a BUILD_SHARED_LIBS option, allowing the user to create a 
static, or a dll version of the library.

In addition to the 'main' library, and in the same Cmkae project, I have a C 
wrapper, that should always be compiled as a dll, linked to the main library 
(static or shared).

When un-checking the build shared libs option, the C API is built as a static 
lib. I guess that makes sense. But how can one over ride this, and force the C 
api to always be build as a shared lib?

-totte
-- 
.........................
Totte Karlsson, Ph.D.
Dune Scientific, LLC
425-296 1980 (office)
425-780 9648 (cell)
www.dunescientific.com
.........................



More information about the CMake mailing list