<div dir="ltr">Hi there,<div><br></div><div style>I have modified FindZLIB.cmake and FindPNG.cmake, because I want to specify a separate release and debug library for MSVC to link to.</div><div style><br></div><div style>The problem is, my libraries are not in any standard place.</div>

<div style>I want to use cmake-gui, run cmake and punch in exactly where these libraries live.</div><div style><br></div><div style>So I have a call in FindPNG, like this:</div><div style><div>  find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES_RELEASE} )</div>

<div><br></div><div style>which it will not find.</div><div style><br></div><div style>at the bottom, there is:</div><div style><div>mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY  PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)</div>

<div><br></div><div><br></div><div style>My problem is, PNG_LIBRARY_DEBUG/RELEASE do NOT appear in cmake-gui.</div><div style>Only PNG_PNG_INCLUDE_DIR and PNG_LIBRARY show up.</div><div style><br></div><div style><br></div>

<div style>Is this because if Find_Target() doesn&#39;t find anything, it does not define the variable at all?</div><div style><br></div><div style>This creates a problem.  If find_target doesn&#39;t find the target, the variable is not defined, and thus the user isn&#39;t given the chance to input the correct location.</div>

<div style><br></div><div style>Note that PNG_LIBRARY is not good enough, because you can&#39;t specify a set of optimized/debug libraries in the slot.</div><div style><br></div><div style>My only choice seems to be to hack the cmake files to define the PNG_RELEASE_LIBRARY variable.  Which is not ideal, because I&#39;m compiling VTK, this is not my own project, so I&#39;ll have to maintain a patch just for this hack.</div>

<div style><br></div><div style>thanks,</div><div style>Paul</div><div style><br></div></div></div></div>