summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorBrian Jensen <Jensen.J.Brian@gmail.com>2013-11-11 20:13:14 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-05 15:41:32 (GMT)
commit1d24a83365c2360c064563c15cb09ec8e5f6670a (patch)
treecdfb508a81090c1cb258ef1cf04a66a21a1ae59d /mkspecs
parent085f851bd8431a30bc84ee20bdb5c5aa51949f4e (diff)
downloadQt-1d24a83365c2360c064563c15cb09ec8e5f6670a.zip
Qt-1d24a83365c2360c064563c15cb09ec8e5f6670a.tar.gz
Qt-1d24a83365c2360c064563c15cb09ec8e5f6670a.tar.bz2
Enable building with clang / libc++ on OS X 10.9 Mavericks
A minimalistic change to enable building with clang / libc++ on OS X 10.9 Mavericks. The configure script now avoids overriding build settings when using clang/libc++. Added a new build configuration with settings specific to clang/libc++ on OS X. Task-number: QTBUG-34652 Change-Id: Iaedaff7c06e9818a5f2ee0d6db93fbe3b2e65e28 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/unsupported/macx-clang-libc++/Info.plist.app22
-rw-r--r--mkspecs/unsupported/macx-clang-libc++/Info.plist.lib18
-rw-r--r--mkspecs/unsupported/macx-clang-libc++/qmake.conf27
-rw-r--r--mkspecs/unsupported/macx-clang-libc++/qplatformdefs.h97
4 files changed, 164 insertions, 0 deletions
diff --git a/mkspecs/unsupported/macx-clang-libc++/Info.plist.app b/mkspecs/unsupported/macx-clang-libc++/Info.plist.app
new file mode 100644
index 0000000..187a8e0
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang-libc++/Info.plist.app
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.@EXECUTABLE@</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/unsupported/macx-clang-libc++/Info.plist.lib b/mkspecs/unsupported/macx-clang-libc++/Info.plist.lib
new file mode 100644
index 0000000..63f1a94
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang-libc++/Info.plist.lib
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/unsupported/macx-clang-libc++/qmake.conf b/mkspecs/unsupported/macx-clang-libc++/qmake.conf
new file mode 100644
index 0000000..d012bad3
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang-libc++/qmake.conf
@@ -0,0 +1,27 @@
+#
+# qmake configuration for Clang on OS X
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
+TEMPLATE = app
+CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-macx.conf)
+include(../../common/clang.conf)
+
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 # Libc++ is available from 10.7 onwards
+
+QMAKE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+QMAKE_LFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+
+QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-clang-libc++/qplatformdefs.h b/mkspecs/unsupported/macx-clang-libc++/qplatformdefs.h
new file mode 100644
index 0000000..cadc2ae
--- /dev/null
+++ b/mkspecs/unsupported/macx-clang-libc++/qplatformdefs.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+#define QT_NO_LIBRARY_UNLOAD
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#include "../../common/posix/qplatformdefs.h"
+
+#undef QT_OPEN_LARGEFILE
+#undef QT_SOCKLEN_T
+#undef QT_SIGNAL_IGNORE
+
+#define QT_OPEN_LARGEFILE 0
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#define QT_SIGNAL_IGNORE (void (*)(int))1
+
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+
+#endif // QPLATFORMDEFS_H