qxtglobalshortcut/cmake/platform.cmake

23 lines
579 B
CMake
Raw Permalink Normal View History

2025-08-27 15:39:56 +08:00
option(platform_found "platform search" OFF)
if (Q_OS_MAC OR APPLE)
2025-08-27 10:53:32 +08:00
include(${CMAKE_CURRENT_LIST_DIR}/platform_mac.cmake)
2025-08-27 15:39:56 +08:00
set(platform_found ON)
endif()
if (Q_WS_WIN OR WIN32)
include(${CMAKE_CURRENT_LIST_DIR}/platform_win.cmake)
set(platform_found ON)
endif()
if (NOT platform_found)
find_package(X11)
if (X11_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/platform_x11.cmake)
set(platform_found ON)
endif()
endif()
if (NOT platform_found)
2025-08-27 10:53:32 +08:00
message(FATAL_ERROR "Unsupported platform! Supported are Windows, OS X, Linux/X11.")
endif()