install(
    TARGETS ${GDKMM_TARGET} ${GTKMM_TARGET}
    RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
    LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
    ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)

if (INSTALL_HEADERS)
    set(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include)

    install(
        FILES ${CMAKE_CURRENT_BINARY_DIR}/gdkmmconfig.h
        DESTINATION ${INSTALL_INCLUDEDIR}
    )

    install(
        FILES ${CMAKE_CURRENT_BINARY_DIR}/gtkmmconfig.h
        DESTINATION ${INSTALL_INCLUDEDIR}
    )

    install(FILES ${GDKMM_HEADERS} DESTINATION ${INSTALL_INCLUDEDIR})
    install(FILES ${GDKMM_SUBHEADERS} DESTINATION ${INSTALL_INCLUDEDIR}/gdkmm)
    install(FILES ${GTKMM_HEADERS} DESTINATION ${INSTALL_INCLUDEDIR})
    install(FILES ${GTKMM_SUBHEADERS} DESTINATION ${INSTALL_INCLUDEDIR}/gtkmm)
endif()
