<div>Subject: Finding libraries on Windows platform<br><br>--------<br><br>I am using CMake 2.8 on Windows XP to create a Visual Studio 2010 solution. The problem I am having is that I cannot get CMake to find libraries on the system. These libraries were created by us for other project. Here is the CMake module for finding one of those libraries:<br>
<br>IF(UNIX)<br> FIND_PATH ( TARGET_INCLUDE_DIR interface.hpp /usr/include/target /usr/local/include/target)<br> FIND_LIBRARY ( TARGET_LIBRARY NAMES target PATH /usr/lib /usr/local/lib)<br>ELSE(UNIX)<br> FIND_PATH ( TARGET_INCLUDE_DIR interface.hpp<br>
    $ENV{TARGET_INCLUDE_DIR}<br>   &quot;C:/Program Files/target/include&quot;<br> &quot;C:/Program Files (x86)/target/include&quot;<br> &quot;C:/Program Files (x86)/target 1.0.0/include&quot;<br> DOC &quot;If you installed Target where did you install it?&quot; )<br>
<br> FIND_LIBRARY ( TARGET_LIBRARY NAMES sgp4 PATH<br>   $ENV{TARGET_LIBRARY}<br>   &quot;C:/Program Files/target&quot;<br>   &quot;C:/Program Files (x86)/target&quot;<br>   &quot;C:/Program Files (x86)/target 1.0.0&quot; )<br>
ENDIF(UNIX)<br><br>IF (TARGET_INCLUDE_DIR AND TARGET_LIBRARY)<br> SET(TARGET_FOUND TRUE)<br>ENDIF(TARGET_INCLUDE_DIR AND TARGET_LIBRARY)<br><br>IF (TARGET_FOUND)<br> IF (NOT target_FIND_QUIETLY)<br>   MESSAGE(STATUS &quot;Found Target: ${TARGET_LIBRARY}&quot;)<br>
 ENDIF (NOT target_FIND_QUIETLY)<br>ELSE (TARGET_FOUND)<br> IF (target_FIND_REQUIRED)<br>   MESSAGE(FATAL_ERROR &quot;Could not find Target&quot;)<br> ENDIF (target_FIND_REQUIRED)<br>ENDIF (TARGET_FOUND)<br><br>The macro is finding the include header fine but is always failing to find the library.<br>
</div>
<div>Stephen<br></div>