Copy All Files With Given Extension To Output Directory Using CMake


Answer :

I've found the solution by myself:



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


this also works for me:



install(DIRECTORY "myDir/" 
DESTINATION "myDestination"
FILES_MATCHING PATTERN "*.h" )


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable