run/debug executable in a custom folder with resources

已回答

My app depends on files in a specific folder. Currently I build manually, copy the exe there, and run it via CMD. I want to run/debug directly in CLion using the Run/Debug button, with the correct working directory so it finds its resources. How?

0

Hello!

What build system is your project based on? 

If it's based on CMake, please go to File | Settings | Build, Execution, Deployment | CMake and add -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=<absolute path to directory> to the CMake options field (<absolute path to directory> should be substituted with the absolute path to the directory where the binary should be generated). After that, please do Tools | CMake | Reset Cache and Reload Project.

0

请先登录再写评论。