Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am facing an issue in my project during install with CMakeList.

What I want to do, is, during installation, copy files from a folder1 to DESTINATION, and then copy others files from another folder2 but in the same DESTINATION. The issue is that I want an override of common files folder1 by folder2.

My current code:

Install files from folder1

install(DIRECTORY ${folder1} DESTINATION ${CMAKE_INSTALL_PREFIX}/MyFolderDestination
        COMPONENT MyComponent
        PATTERN ".svn" EXCLUDE
        PATTERN "*.pro" EXCLUDE)

Install files from folder2

install(DIRECTORY ${folder2} DESTINATION ${CMAKE_INSTALL_PREFIX}/MyFolderDestination
        COMPONENT MyComponent
        PATTERN ".svn" EXCLUDE
        PATTERN "*.pro" EXCLUDE)

But this is not working, as it doesn't override files, or at least not all... Do you have any idea ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
250 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...