find_package(X11)
if (X11_FOUND)
    include(${CMAKE_CURRENT_LIST_DIR}/platform_x11.cmake)
elseif (Q_WS_WIN OR WIN32)
    include(${CMAKE_CURRENT_LIST_DIR}/platform_win.cmake)
elseif (Q_OS_MAC OR APPLE)
    include(${CMAKE_CURRENT_LIST_DIR}/platform_mac.cmake)
else()
    message(FATAL_ERROR "Unsupported platform! Supported are Windows, OS X, Linux/X11.")
endif()
