I am having a bit of trouble getting this sorted out. I set set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
in one of my cmakelists.txt file and it works almost as expected. If I use the terminal to build everything goes where it needs to and then I can reference the relative location of my files and folders from my c code BUT if I use xcode to build the same program, xcode seems to append a Debug or Release to the end of my path breaking all my c code. sample output below // terminal // /Users/user/FOLDER/project/build/bin/ // /Users/user/FOLDER/project/build/bin/resources/ // xcode // /Users/user/FOLDER/project/build/bin/Debug/ // /Users/user/FOLDER/project/build/bin/Debug/resources/ // clion // /ad053ed7/ad053ed7/Debug/bin/ // /ad053ed7/ad053ed7/Debug/bin/resources/ As you can see I am getting three different outputs based on the same cmake file using 3 ways of building. is there a way to make these filenames consistent so that I when I try to load some resources my code doesn't break?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake