What is different about the CMake command configure_file on Windows?

前端 未结 1 661
感情败类
感情败类 2021-02-09 12:13

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

相关标签:
1条回答
  • 2021-02-09 12:50

    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 讨论(0)
提交回复
热议问题