<div class="gmail_quote">On Mon, Jan 19, 2009 at 4:44 PM, Adam Weiss <span dir="ltr">&lt;<a href="mailto:cseadam%2Bcmake@gmail.com">cseadam+cmake@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am still fairly new to cmake, and I am not sure how to make<br>
configurations. &nbsp;Let me see if I can provide some more details.<br>
<br>
The hope is that a third party can run:<br>
<br>
mkdir build<br>
cd build<br>
cmake ..<br>
make<br>
<br>
and have both libraries built. &nbsp;A less graceful way I was considering<br>
was to have cmake copy all the files that need the flag set and then<br>
use the copies to build the second version of the library. &nbsp;If you<br>
could elaborate on how to build configurations of a library I would<br>
appreciate it.</blockquote><div><br>Sounds like you could call add_library() twice and use the COMPILE_FLAGS property on each target?<br><br>set(my_SRCS foo.h foo.cc)<br><br>add_library(foo ${my_SRCS})<br>set_target_properties(foo PROPERTIES COMPILE_FLAGS &quot;-DFOO&quot;)<br>
<br>add_library(foo2 ${my_SRCS})<br>set_target_properties(foo2 PROPERTIES COMPILE_FLAGS &quot;-DFOO2&quot;)<br><br></div></div><br>-- <br>Philip Lowman<br>