Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6989949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:16:52+00:00 2026-05-27T19:16:52+00:00

I have a source directory structure: projectSource |—src |—include |—CMakeLists.txt and would like an

  • 0

I have a source directory structure:

projectSource
|---src
|---include
|---CMakeLists.txt

and would like an install directory structure of

projectInstall
|---bin
|---include
|---lib

My source directory tree is all under version control, so each source folder contains an additional .svn/ directory. What’s the easiest way to install all header files from projectSource/include to projectInstall/include, while skipping over the .svn directories?

I’d like to use something like:

set( PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include )
include_directories( ${PROJECT_INCLUDE_DIR} )
install(DIRECTORY ${PROJECT_INCLUDE_DIR}/
    DESTINATION "include"
    FILES_MATCHING PATTERN "*.h"
    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

but even though I’m (attempting to) install only files matching *.h, I’m still picking up the .svn/ directory and contents.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:16:53+00:00Added an answer on May 27, 2026 at 7:16 pm

    You can add EXCLUDE keyword to the PATTERN:

    install(DIRECTORY ${PROJECT_INCLUDE_DIR}/
        DESTINATION "include"
        FILES_MATCHING
        PATTERN "*.h"
        PATTERN ".svn" EXCLUDE
        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following directory structure. root --src ---tests src contains the source &
Let's say I have this directory structure: SConstruct src/ a.cpp b.cpp include/ a.h b.h
I have a directory structure & build.xml like this /path-to-project/src/prj1 /path-to-project/src/prj2 /path-to-project/tests /path-to-project/tests/build.xml I
I have the following directory structure on my Apache web root. I would like
I have directory structure like following: analytics / / \ \ conf script src
I have source in a bunch of subdirectories like: src/widgets/apple.cpp src/widgets/knob.cpp src/tests/blend.cpp src/ui/flash.cpp In
I have an Eclipse project with the following directory structure: MyProj >> src/main/java >>
The directory structure of my Silverlight project is like the following: \Bin - MainModule.xap
I have a project where the directory structure is like this: $projectroot | +---------------+----------------+
I have directory structure: DIR |-component_name |-source |-setup.exe |-another_component_name |-source |-setup.exe |-yet_another_component_name |-source |-setup.exe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.