# Install all the header files in Include/

set(includedir ${INCLUDE_BUILD_DIR})
file(GLOB_RECURSE hfiles RELATIVE ${includedir} "${includedir}/*")

foreach(file ${hfiles})
    get_filename_component(path ${file} PATH)
    install(FILES ${includedir}/${file} DESTINATION ${INCLUDE_INSTALL_DIR}/${path} COMPONENT Development)
endforeach(file)

# Install all the header files in Include/

set(includedir ${INCLUDE_BUILD_DIR})
file(GLOB_RECURSE hfiles RELATIVE ${includedir} "${includedir}/*")

foreach(file ${hfiles})
    get_filename_component(path ${file} PATH)
    if(WIN32)
        file(COPY ${includedir}/${file} DESTINATION ${CMAKE_BINARY_DIR}/${INCLUDE_INSTALL_DIR}/${path})
    endif()
    install(FILES ${includedir}/${file} DESTINATION ${INCLUDE_INSTALL_DIR}/${path} COMPONENT Development)
endforeach(file)

Fix distutils.test_get_python_inc on windows copying headers into build dir
Fix distutils.test_get_python_inc on windows copying headers into build dir
