[CMake] INSTALL DIRECTORY patterns highly confusing

Dan Kegel dank at kegel.com
Wed Oct 15 22:11:35 EDT 2014


On Wed, Oct 15, 2014 at 6:49 PM, Dan Kegel <dank at kegel.com> wrote:
> The doc could use some more examples.  I am having a hard
> time figuring out how to install a directory tree but exclude
> files matching .gitignore and Makefile.in.

This turned out to work for me:

install (
  DIRECTORY ${samples_SOURCE_DIR}
  DESTINATION "src"
  PATTERN "*.in" EXCLUDE
  PATTERN ".gitignore" EXCLUDE
)

but lord help me, it took me the longest damn time.


More information about the CMake mailing list