Using cmake 2.8
I would like to maintain the directory hierarchy while copying the header files from the source to the destination directory. For example, the header file that needs to be copied are abc/1.h, def/2.h and they should also be copied in the same order in the destination directly ( set via CMAKE_INSTALL_PREFIX )
This is what I have tried, but it just copies the header files and not the header files inclusive parent directory name
set(HEADERS "abc/1.h;def/2.h")
install(FILES ${HEADERS} DESTINATION include)
The final output should be dest_directory/abc/1.h and dest_directory/def/2.h.