summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08f9160e..73846a20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,32 @@ if (${QTVERSION} VERSION_LESS 4.5.0)
message(FATAL_ERROR "You need Qt4.5, found ${QTVERSION}.")
endif()
+# Configure OS support
+if(Q_WS_X11)
+ set(ENABLE_X11 "1")
+ set(ENABLE_MAC "0")
+ set(ENABLE_WIN "0")
+ if(Q_WS_MAEMO_5)
+ set(AUTO_OS "MAEMO 5")
+ else()
+ set(AUTO_OS "X11")
+ endif()
+elseif(Q_WS_MAC)
+ set(ENABLE_X11 "0")
+ set(ENABLE_MAC "1")
+ set(ENABLE_WIN "0")
+ set(AUTO_OS "MAC")
+elseif(Q_WS_WIN)
+ set(ENABLE_X11 "0")
+ set(ENABLE_MAC "0")
+ set(ENABLE_WIN "1")
+ set(AUTO_OS "WIN")
+else()
+ message(FATAL_ERROR "OS not supported")
+endif()
+
+message(STATUS "Detected OS: ${AUTO_OS}")
+
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
find_program(GENERATOR generatorrunner REQUIRED)