right, but I think static/shared are mutually exclusive.&nbsp; I can't choose static and shared, which I can with autotools.<br>
<br><br><div><span class="gmail_quote">On 8/3/05, <b class="gmail_sendername">William A. Hoffman</b> &lt;<a href="mailto:billlist@nycap.rr.com">billlist@nycap.rr.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 08:30 AM 8/3/2005, Doug Henry wrote:<br>&gt;thanks.&nbsp;&nbsp;its
not a real problem, but if I didn't have to compile twice that would
obviously be better :-)&nbsp;&nbsp;Right now I just tack on -static to
the target name and have two targets.&nbsp;&nbsp;I'm basically trying
to loosely simulate the autotools functionality where you can
independently switch on/off shared and static (--disable-shared
--enable-static).<br><br>I think you want the BUILD_SHARED_LIBS flag.&nbsp;&nbsp;If you add the libraries without specifying static or<br>shared, then the global BUILD_SHARED_LIBS is used instead.&nbsp;&nbsp;This works just like autoconfs --enable-shared
<br>and --enable-static.<br><br><br>ADD_LIBRARY: Add an library to the project using the specified source files.<br><br>&nbsp;&nbsp;ADD_LIBRARY(libname [SHARED | STATIC | MODULE]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source1 source2 ... sourceN)<br><br>
Adds
a library target. SHARED, STATIC or MODULE keywords are used to set the
library type. If the keyword MODULE appears, the library type is set to
MH_BUNDLE on systems which use dyld. On systems without dyld, MODULE is
treated like SHARED. If no keywords appear as the second argument, the
type defaults to the current value of BUILD_SHARED_LIBS. If this
variable is not set, the type defaults to STATIC.<br><br><br>-Bill<br><br></blockquote></div><br>