Copy all files with given extension to output directory using CMake

后端 未结 3 728
长情又很酷
长情又很酷 2020-12-24 11:26

I\'ve seen that I can use this command in order to copy a directory using cmake:

file(COPY \"myDir\" DESTINATION \"myDestination\")

(from t

3条回答
  •  一生所求
    2020-12-24 12:23

    I've found the solution by myself:

    file(GLOB MY_PUBLIC_HEADERS
      "myDir/*.h"
    )
    file(COPY ${MY_PUBLIC_HEADERS} DESTINATION myDestination)
    

提交回复
热议问题