I have a cross-platform (Windows, Mac, iOS) CMake project that needs to copy binary resources (images, audio, text files, etc.) to the final application. ![]() # Make sure resource files get installed into macOS/iOS. CMake: copydirectory custom command fails on macOS. + set(test_bin_dir "$ copy-sdl-test-resources) Target_link_libraries(sdltests_utils PRIVATE SDå ::Headers)įile(GLOB RESOURCE_FILES *.bmp *.wav *.hex moose.dat utf8.txt) In your example the wildcard is expanded by the shell so CMake sees many arguments. The 'remove' signature documents support for multiple files but 'copy' does not. +++ -32,11 +32,35 add_library(sdltests_utils OBJECT The two relevant 'cmake -E' signatures are: copy and: remove -f .The build system should take care of dependencies. compilecommands. I am building target inside a folder and is called via addsubdirectory.The folder has its own CMakeLists.txt file. Instructions Install the Windows Subsystem for. I have a CMakeLists.txt in the root of my project with CMAKEEXPORTCOMPILECOMMANDS turned on. Subject: cmake: copy sources to binary directory in separate targetÄon't do it in POST_BUILD to avoid multiple parallel buildsĪlso don't use copy_if_different, but unconditionally copy it. If the transfer is local (that is, between file systems mounted on the same.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |