diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/autobuild/detect_xcode.sh | 2 | ||||
-rw-r--r-- | tools/autobuild/ios.sh | 14 | ||||
-rw-r--r-- | tools/mkspecs/iphonesimulator-llvm/qmake.conf | 128 | ||||
-rw-r--r-- | tools/mkspecs/iphonesimulator-llvm/qplatformdefs.h | 97 |
4 files changed, 236 insertions, 5 deletions
diff --git a/tools/autobuild/detect_xcode.sh b/tools/autobuild/detect_xcode.sh index a57c9ac78b..47501241dd 100644 --- a/tools/autobuild/detect_xcode.sh +++ b/tools/autobuild/detect_xcode.sh @@ -15,7 +15,7 @@ KNOWN_IOS_SDK_SIMULATOR_PATHS=( \ # Returns 1 in case of not found and 0 in case of success PrintIOSSDKPath() { PATHS_ARRAY="${KNOWN_IOS_SDK_PATHS[@]}" - if [[ $1 == "simulator" ]]; then + if [[ $1 == *simulator* ]]; then for path in "${KNOWN_IOS_SDK_SIMULATOR_PATHS[@]}"; do if [ -d "${path}" ]; then echo "${path}" diff --git a/tools/autobuild/ios.sh b/tools/autobuild/ios.sh index c06785b2e9..9fcb2d8322 100644 --- a/tools/autobuild/ios.sh +++ b/tools/autobuild/ios.sh @@ -7,7 +7,7 @@ LOCAL_DIRNAME="$(dirname "$0")" #LOCAL_DIRNAME="${PWD}/$(dirname "$0")" if [[ $# < 1 ]]; then - echo "Usage: $0 <debug|release|production|simulator> [clean]" + echo "Usage: $0 <debug|release|production|simulator|simulator-release> [clean]" exit 1 fi CONFIGURATION="$1" @@ -29,9 +29,15 @@ fi SHADOW_DIR_BASE="$LOCAL_DIRNAME/../../../omim-iphone" -if [[ $CONFIGURATION == "simulator" ]]; then - SHADOW_DIR="${SHADOW_DIR_BASE}sim-debug" - MKSPEC="$LOCAL_DIRNAME/../mkspecs/iphonesimulator-clang" +if [[ $CONFIGURATION == *simulator* ]]; then + if [[ $CONFIGURATION == "simulator-release" ]]; then + SHADOW_DIR="${SHADOW_DIR_BASE}sim-release" + QMAKE_PARAMS="CONFIG+=release" + else + SHADOW_DIR="${SHADOW_DIR_BASE}sim-debug" + QMAKE_PARAMS="CONFIG+=debug" + fi + MKSPEC="$LOCAL_DIRNAME/../mkspecs/iphonesimulator-llvm" else SHADOW_DIR="${SHADOW_DIR_BASE}-${CONFIGURATION}" MKSPEC="$LOCAL_DIRNAME/../mkspecs/iphonedevice-llvm" diff --git a/tools/mkspecs/iphonesimulator-llvm/qmake.conf b/tools/mkspecs/iphonesimulator-llvm/qmake.conf new file mode 100644 index 0000000000..c8487264b1 --- /dev/null +++ b/tools/mkspecs/iphonesimulator-llvm/qmake.conf @@ -0,0 +1,128 @@ +# +# qmake configuration for iphone simulator +# + +# Don't forget to set PATH in QT creator project environment +# to include /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin +# where gcc an all tools are actually resides + +IPHONE_SDK_PATH = $$(SDK_ROOT) +isEmpty( IPHONE_SDK_PATH ) : error(Please set SDK_ROOT environment variable) + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += x86 hide_symbols warn_on dwarf2 app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl +QMAKE_INCREMENTAL_STYLE = sublib + +QMAKE_CC = llvm-gcc +QMAKE_CXX = llvm-g++ +QMAKE_OBJECTIVE_CC = $$QMAKE_CC -fobjc-abi-version=2 -fobjc-legacy-dispatch + +QMAKE_RESOURCE = + +QMAKE_EXTENSION_SHLIB = dylib + +QMAKE_LIBDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] +QMAKE_INCDIR_OPENGL = + +QMAKE_FIX_RPATH = install_name_tool -id + +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_OPENGL = +QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL +QMAKE_LIBS_THREAD = + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +#QMAKE_AR = ar cq +QMAKE_AR = libtool -static -arch_only i386 -syslibroot $$IPHONE_SDK_PATH -o +#QMAKE_RANLIB = ranlib -s + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $$QMAKE_COPY +QMAKE_COPY_DIR = $$QMAKE_COPY -R +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p + +QMAKE_PREFIX_SHLIB = lib +QMAKE_PREFIX_STATICLIB = lib +QMAKE_EXTENSION_STATICLIB = a + +QMAKE_COMPILER_DEFINES += +DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=40000 +QMAKE_CFLAGS += --sysroot=$$IPHONE_SDK_PATH -fmessage-length=0 -fpascal-strings -fasm-blocks +QMAKE_CFLAGS += -pipe -mmacosx-version-min=10.6 +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O3 -funroll-loops +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += +QMAKE_CFLAGS_STATIC_LIB += +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} + +QMAKE_CFLAGS_X86 += -arch i386 +QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386 +QMAKE_CFLAGS_DWARF2 += -gdwarf-2 + +QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch + +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_PPC += -arch ppc +QMAKE_CXXFLAGS_X86 += -arch i386 +QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2 +QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + +QMAKE_INCDIR_EGL += $$IPHONE_SDK_PATH/System/Library/Frameworks/OpenGLES.framework + +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC +QMAKE_LFLAGS += -headerpad_max_install_names +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace +QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_PPC += -arch ppc +QMAKE_LFLAGS_X86 += -arch i386 +QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} +# -all_load requred to make Objective-C categories work in static builds. +QMAKE_LFLAGS_STATIC_LIB += -all_load + +QMAKE_PCH_OUTPUT_EXT = .gch + +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/tools/mkspecs/iphonesimulator-llvm/qplatformdefs.h b/tools/mkspecs/iphonesimulator-llvm/qplatformdefs.h new file mode 100644 index 0000000000..1573958912 --- /dev/null +++ b/tools/mkspecs/iphonesimulator-llvm/qplatformdefs.h @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $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 |