Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I can think of a few different options:</p> <ol> <li><p>Have CMake put all your executables in the same folder, as described in <a href="https://stackoverflow.com/questions/6594796/how-do-i-make-cmake-output-into-a-bin-dir">this question</a>. Then you can use <code>../Tiles</code> or <code>../../Tiles</code> or whatever as you've been doing. Note, however, that you might want to consider setting this on a per-target basis instead of globally, e.g., using:</p> <pre><code>set_target_properties( my_target PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) </code></pre> <p>Setting <code>CMAKE_RUNTIME_OUTPUT_DIRECTORY</code> works fine, but some people consider it to be the 'old' way of doing it. (Depending on your needs, you might also want to set <code>LIBRARY_OUTPUT_DIRECTORY</code>, and possibly <code>ARCHIVE_OUTPUT_DIRECTORY</code>.)</p></li> <li><p>Use an environmental variable (e.g., <code>CONTENT_ROOT</code> or some-such) to locate the resources. Hard-code a default that makes sense for production, but let developers override it for their particular work flow.</p></li> <li>Look into cross-platform resource libaries (something like Qt's QRC files, but perhaps not tied to Qt).</li> <li>Try the CMake modules listed in <a href="http://www.cmake.org/Wiki/CMake_FAQ#Can_CMake_set_the_Debugging.2FWorking_Directory_property_in_Visual_Studio_projects.3F" rel="nofollow noreferrer">this FAQ answer</a> to change Visual Studio's working/debugging directory.</li> </ol> <p>Actually, a combination of 1 and 2 is probably your best bet...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload