Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clion: How to properly add images, xml, resources... to cmake

Tags:

c++

cmake

clion

I tried with copy but doesn't update on each build

like image 281
Pablo Rodríguez Avatar asked Mar 16 '23 01:03

Pablo Rodríguez


1 Answers

For this I used the configure_file command in Cmake, so the file is copied to the build directory. It's done every time when the file was modified.

configure_file(config.xml config.xml COPYONLY)

http://www.cmake.org/cmake/help/v3.0/command/configure_file.html

like image 123
ipa Avatar answered Mar 19 '23 23:03

ipa