aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-05-19 14:20:18 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-05-19 17:39:56 -0300
commitb830e6696627e1c740e7f93f7978c604a59ee7ac (patch)
tree7d375d14693b6d5b1530d6de9e4fbbc31ef4526f /CMakeLists.txt
parent101a3f0e33a747e0627acb2429c01acac9a88798 (diff)
Implemented SO detection support.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
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 08f9160e5..73846a203 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)