cmake choose platforms TG-52 #closed
This commit is contained in:
parent
15b99ff02d
commit
3e3cc7b19e
|
|
@ -1,10 +1,22 @@
|
||||||
find_package(X11)
|
option(platform_found "platform search" OFF)
|
||||||
if (X11_FOUND)
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/platform_x11.cmake)
|
if (Q_OS_MAC OR APPLE)
|
||||||
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)
|
include(${CMAKE_CURRENT_LIST_DIR}/platform_mac.cmake)
|
||||||
else()
|
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)
|
||||||
message(FATAL_ERROR "Unsupported platform! Supported are Windows, OS X, Linux/X11.")
|
message(FATAL_ERROR "Unsupported platform! Supported are Windows, OS X, Linux/X11.")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue