开发者

What is different about the CMake command configure_file on Windows?

开发者 https://www.devze.com 2022-12-08 03:50 出处:网络
On linux I am using a command such as: configure_file(dot_alpha_16.bmp test/dot_samples/dot_alpha_16.bmp COPYONLY)

On linux I am using a command such as:

configure_file(dot_alpha_16.bmp test/dot_samples/dot_alpha_16.bmp COPYONLY)

to copy some unit test files to the build directory. On windows the files aren't getting copied. Is there a spec开发者_运维知识库ific reason why this happens?


You have to specify the complete directory path. The following works on Windows and takes out-of-source builds into account too:

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dot_alpha_16.bmp
    ${CMAKE_CURRENT_BINARY_DIR}/test/dot_samples/dot_alpha_16.bmp COPYONLY)
0

精彩评论

暂无评论...
验证码 换一张
取 消