<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    You can use:<br>
    <br>
    <code>set_target_properties(${target}-static PROPERTIES
      COMPILE_DEFINITIONS RR_STATIC)</code><br>
    <br>
    For full details, run:<br>
    <br>
    <code>cmake --help-property COMPILE_DEFINITIONS</code><br>
    <br>
    Cheers,<br>
    Fraser.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/06/2012 23:39, Totte Karlsson
      wrote:<br>
    </div>
    <blockquote cite="mid:4FD7C52F.6030709@dunescientific.com"
      type="cite">Hi,
      <br>
      I have a CMakeLists.txt that creates both a shared and static lib.
      <br>
      In short it looks something like this:
      <br>
      <br>
      add_definitions(-DEXPORT_RR)
      <br>
      add_library(${target}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHARED ${rrSources})
      <br>
      add_library(${target}-static&nbsp;&nbsp;&nbsp;&nbsp; STATIC ${rrSources})
      <br>
      <br>
      <br>
      The problem being that for the static version, the flag
      <br>
      -DRR_STATIC should be defined.
      <br>
      <br>
      How can one achieve that?
      <br>
      <br>
      -totte
      <br>
      <br>
      --
      <br>
      <br>
      Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
      <br>
      <br>
      Visit other Kitware open-source projects at
      <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
      <br>
      <br>
      Please keep messages on-topic and check the CMake FAQ at:
      <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
      <br>
      <br>
      Follow this link to subscribe/unsubscribe:
      <br>
      <a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
      <br>
    </blockquote>
    <br>
    <br>
  </body>
</html>