<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <span class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial,sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; background-color: rgb(245, 245, 245);"><span
        class="hps">Hi,<br>
        <br>
      </span><span class="hps"></span></span><span
      class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial,sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; background-color: rgb(245, 245, 245);"><span
        class="hps">Management by</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">CMake</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">works
        well under</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">Windows with Visual Studio</span><span
        class="Apple-converted-space"> </span><span class="hps">and </span><span
        class="hps">Linux</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">with GCC.<br>
        The&nbsp; paths of the several libraries are found</span></span><small><small><span
          class="Apple-style-span" style="color: rgb(51, 51, 51);
          font-family: arial, sans-serif; font-size: 24px; font-style:
          normal; font-variant: normal; font-weight: normal;
          letter-spacing: normal; line-height: normal; orphans: 2;
          text-align: -webkit-auto; text-indent: 0px; text-transform:
          none; white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-text-decorations-in-effect: none;
          -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
          0px; background-color: rgb(245, 245, 245); "><span class="hps">.</span></span></small></small><br>
    <span class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial,sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; background-color: rgb(245, 245, 245);"><span
        class="hps">Now, I want to</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">compile
        an application</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">window</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">on linux</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">with</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">mingw.</span></span><br>
    <br>
    My cross compilation file is as follows :<br>
    <span class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial, sans-serif; font-size: 24px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect:
      none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
      0px; background-color: rgb(245, 245, 245); "><span class="hps"></span></span><span
      style="color:#1F497D"><br>
      # this one is important<o:p></o:p></span>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_SYSTEM_NAME
        Windows)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">#this one not so
        much<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">#SET(CMAKE_SYSTEM_VERSION
        1)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"># specify the cross
        compiler<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_C_COMPILER&nbsp;&nbsp;
        /usr/bin/i586-mingw32msvc-gcc)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_CXX_COMPILER
        /usr/bin/i586-mingw32msvc-g++)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"># where is the
        target environment<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_FIND_ROOT_PATH
        /usr/i586-mingw32msvc/ /home/code/dependencies/
        /home/code/dependencies/lib/)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"># search for
        programs in the build host directories<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
        NEVER)<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D"># for libraries and
        headers in the target directories<o:p></o:p></span></p>
    <p class="MsoNormal"><span style="color:#1F497D">SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
        ONLY)<o:p></o:p></span></p>
    <span style="color:#1F497D">SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
      ONLY)</span><br>
    <br>
    <span class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial, sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect:
      none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
      0px; background-color: rgb(245, 245, 245); "><span class="hps">Windows</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">libraries</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">are not</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">found</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">in</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">my files</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">findXXX.cmake</span></span><br>
    <br>
    <span class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial,sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; background-color: rgb(245, 245, 245);"><span
        class="hps">How</span><span class="Apple-converted-space">&nbsp;</span><span
        class="hps">the variable</span><span
        class="Apple-converted-space">&nbsp;</span><span class="hps">should
        be set </span><span class="hps">CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
        and&nbsp;</span><span class=""> </span></span><span
      style="color:#1F497D">CMAKE_FIND_ROOT_PATH_MODE_INCLUDE</span><span
      class="Apple-style-span" style="color: rgb(51, 51, 51);
      font-family: arial, sans-serif; font-size: 16px; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect:
      none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
      0px; background-color: rgb(245, 245, 245); "><span class="">?<br>
        <br>
        Thanks for your help,<br>
        Julien<br>
      </span></span><br>
  </body>
</html>