make library defines more consistency

Change-Id: I211d511667d5b9c8f518bfbe750aca4483baff62
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tim Jenssen
2016-12-12 14:23:52 +01:00
parent 1ff8b46d0a
commit 1898ba5ad3
29 changed files with 30 additions and 30 deletions

View File

@@ -29,7 +29,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstddef> #include <cstddef>
#if defined(GLSL_BUILD_LIB) #if defined(GLSL_LIBRARY)
# define GLSL_EXPORT Q_DECL_EXPORT # define GLSL_EXPORT Q_DECL_EXPORT
#elif defined(GLSL_BUILD_STATIC_LIB) #elif defined(GLSL_BUILD_STATIC_LIB)
# define GLSL_EXPORT # define GLSL_EXPORT

View File

@@ -1,5 +1,5 @@
DEFINES += \ DEFINES += \
GLSL_BUILD_LIB GLSL_LIBRARY
include(../../qtcreatorlibrary.pri) include(../../qtcreatorlibrary.pri)
include(glsl-lib.pri) include(glsl-lib.pri)

View File

@@ -4,7 +4,7 @@ QtcLibrary {
name: "GLSL" name: "GLSL"
cpp.defines: base.concat([ cpp.defines: base.concat([
"GLSL_BUILD_LIB" "GLSL_LIBRARY"
]) ])
Depends { name: "Qt.gui" } Depends { name: "Qt.gui" }

View File

@@ -1,5 +1,5 @@
contains(CONFIG, dll) { contains(CONFIG, dll) {
DEFINES += LANGUAGEUTILS_BUILD_DIR DEFINES += LANGUAGEUTILS_LIBRARY
} else { } else {
DEFINES += LANGUAGEUTILS_BUILD_STATIC_LIB DEFINES += LANGUAGEUTILS_BUILD_STATIC_LIB
} }

View File

@@ -6,7 +6,7 @@ Project {
QtcDevHeaders { } QtcDevHeaders { }
QtcLibrary { QtcLibrary {
cpp.defines: base.concat(["LANGUAGEUTILS_BUILD_DIR"]) cpp.defines: base.concat(["LANGUAGEUTILS_LIBRARY"])
cpp.optimization: "fast" cpp.optimization: "fast"
Depends { name: "Qt.core" } Depends { name: "Qt.core" }

View File

@@ -27,7 +27,7 @@
#include <qglobal.h> #include <qglobal.h>
#if defined(LANGUAGEUTILS_BUILD_DIR) #if defined(LANGUAGEUTILS_LIBRARY)
# define LANGUAGEUTILS_EXPORT Q_DECL_EXPORT # define LANGUAGEUTILS_EXPORT Q_DECL_EXPORT
#elif defined(LANGUAGEUTILS_BUILD_STATIC_LIB) #elif defined(LANGUAGEUTILS_BUILD_STATIC_LIB)
# define LANGUAGEUTILS_EXPORT # define LANGUAGEUTILS_EXPORT

View File

@@ -4,7 +4,7 @@ include(../../qtcreatorlibrary.pri)
!isEmpty(QT.svg.name): QT += svg !isEmpty(QT.svg.name): QT += svg
else: DEFINES += QT_NO_SVG else: DEFINES += QT_NO_SVG
DEFINES += QMT_LIBRARY DEFINES += MODELING_LIBRARY
INCLUDEPATH += $$PWD $$PWD/qtserialization/inc INCLUDEPATH += $$PWD $$PWD/qtserialization/inc

View File

@@ -3,7 +3,7 @@ import qbs 1.0
QtcLibrary { QtcLibrary {
name: "Modeling" name: "Modeling"
cpp.defines: base.concat("QMT_LIBRARY") cpp.defines: base.concat("MODELING_LIBRARY")
cpp.includePaths: base.concat([ cpp.includePaths: base.concat([
".", ".",
"./qtserialization/inc", "./qtserialization/inc",

View File

@@ -27,7 +27,7 @@
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#if defined(QMT_LIBRARY) #if defined(MODELING_LIBRARY)
# define QMT_EXPORT Q_DECL_EXPORT # define QMT_EXPORT Q_DECL_EXPORT
#else #else
# define QMT_EXPORT Q_DECL_IMPORT # define QMT_EXPORT Q_DECL_IMPORT

View File

@@ -1,5 +1,5 @@
contains(CONFIG, dll) { contains(CONFIG, dll) {
DEFINES += QMLDEBUG_LIB DEFINES += QMLDEBUG_LIBRARY
} else { } else {
DEFINES += QMLDEBUG_STATIC_LIB DEFINES += QMLDEBUG_STATIC_LIB
} }

View File

@@ -6,7 +6,7 @@ Project {
QtcDevHeaders { } QtcDevHeaders { }
QtcLibrary { QtcLibrary {
cpp.defines: base.concat("QMLDEBUG_LIB") cpp.defines: base.concat("QMLDEBUG_LIBRARY")
Depends { name: "Qt"; submodules: ["gui", "network"] } Depends { name: "Qt"; submodules: ["gui", "network"] }
Depends { name: "Utils" } Depends { name: "Utils" }

View File

@@ -25,7 +25,7 @@
#pragma once #pragma once
#if defined(QMLDEBUG_LIB) #if defined(QMLDEBUG_LIBRARY)
# define QMLDEBUG_EXPORT Q_DECL_EXPORT # define QMLDEBUG_EXPORT Q_DECL_EXPORT
#elif defined(QMLDEBUG_STATIC_LIB) #elif defined(QMLDEBUG_STATIC_LIB)
# define QMLDEBUG_EXPORT # define QMLDEBUG_EXPORT

View File

@@ -1,5 +1,5 @@
contains(CONFIG, dll) { contains(CONFIG, dll) {
DEFINES += BUILD_QMLEDITORWIDGETS_LIB DEFINES += QMLEDITORWIDGETS_LIBRARY
} else { } else {
DEFINES += BUILD_QMLEDITORWIDGETS_STATIC_LIB DEFINES += BUILD_QMLEDITORWIDGETS_STATIC_LIB
} }

View File

@@ -4,7 +4,7 @@ QtcLibrary {
name: "QmlEditorWidgets" name: "QmlEditorWidgets"
cpp.defines: base.concat([ cpp.defines: base.concat([
"BUILD_QMLEDITORWIDGETS_LIB" "QMLEDITORWIDGETS_LIBRARY"
]) ])
cpp.optimization: "fast" cpp.optimization: "fast"

View File

@@ -27,7 +27,7 @@
#include <qglobal.h> #include <qglobal.h>
# if defined(BUILD_QMLEDITORWIDGETS_LIB) # if defined(QMLEDITORWIDGETS_LIBRARY)
# define QMLEDITORWIDGETS_EXPORT Q_DECL_EXPORT # define QMLEDITORWIDGETS_EXPORT Q_DECL_EXPORT
# elif defined(BUILD_QMLJSDEBUGGER_STATIC_LIB) # elif defined(BUILD_QMLJSDEBUGGER_STATIC_LIB)
# define QMLEDITORWIDGETS_EXPORT # define QMLEDITORWIDGETS_EXPORT

View File

@@ -42,13 +42,13 @@
# define QT_QML_BEGIN_NAMESPACE # define QT_QML_BEGIN_NAMESPACE
# define QT_QML_END_NAMESPACE # define QT_QML_END_NAMESPACE
# ifdef QMLJS_BUILD_DIR # ifdef QMLJS_LIBRARY
# define QML_PARSER_EXPORT Q_DECL_EXPORT # define QML_PARSER_EXPORT Q_DECL_EXPORT
# elif QML_BUILD_STATIC_LIB # elif QML_BUILD_STATIC_LIB
# define QML_PARSER_EXPORT # define QML_PARSER_EXPORT
# else # else
# define QML_PARSER_EXPORT Q_DECL_IMPORT # define QML_PARSER_EXPORT Q_DECL_IMPORT
# endif // QMLJS_BUILD_DIR # endif // QMLJS_LIBRARY
#else // !QT_CREATOR #else // !QT_CREATOR
# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE # define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@@ -1,5 +1,5 @@
contains(CONFIG, dll) { contains(CONFIG, dll) {
DEFINES += QMLJS_BUILD_DIR DEFINES += QMLJS_LIBRARY
} else { } else {
DEFINES += QML_BUILD_STATIC_LIB DEFINES += QML_BUILD_STATIC_LIB
} }

View File

@@ -1,4 +1,4 @@
DEFINES += QMLJS_BUILD_DIR DEFINES += QMLJS_LIBRARY
include(../../qtcreatorlibrary.pri) include(../../qtcreatorlibrary.pri)
include(qmljs-lib.pri) include(qmljs-lib.pri)

View File

@@ -6,7 +6,7 @@ Project {
QtcDevHeaders { } QtcDevHeaders { }
QtcLibrary { QtcLibrary {
cpp.defines: base.concat(["QMLJS_BUILD_DIR"]) cpp.defines: base.concat(["QMLJS_LIBRARY"])
cpp.optimization: "fast" cpp.optimization: "fast"
Depends { name: "ExtensionSystem" } Depends { name: "ExtensionSystem" }

View File

@@ -27,7 +27,7 @@
#include <qglobal.h> #include <qglobal.h>
#if defined(QMLJS_BUILD_DIR) #if defined(QMLJS_LIBRARY)
# define QMLJS_EXPORT Q_DECL_EXPORT # define QMLJS_EXPORT Q_DECL_EXPORT
#elif defined(QML_BUILD_STATIC_LIB) #elif defined(QML_BUILD_STATIC_LIB)
# define QMLJS_EXPORT # define QMLJS_EXPORT

View File

@@ -1,5 +1,5 @@
QT += gui network QT += gui network
DEFINES += QSSH_LIBRARY DEFINES += QTCSSH_LIBRARY
include(../../qtcreatorlibrary.pri) include(../../qtcreatorlibrary.pri)

View File

@@ -7,7 +7,7 @@ Project {
QtcDevHeaders { } QtcDevHeaders { }
QtcLibrary { QtcLibrary {
cpp.defines: base.concat(["QSSH_LIBRARY"]).concat(botanDefines) cpp.defines: base.concat(["QTCSSH_LIBRARY"]).concat(botanDefines)
cpp.includePaths: botanIncludes cpp.includePaths: botanIncludes
cpp.dynamicLibraries: botanLibs cpp.dynamicLibraries: botanLibs
cpp.enableExceptions: true cpp.enableExceptions: true

View File

@@ -27,7 +27,7 @@
#include <QtGlobal> #include <QtGlobal>
#if defined(QSSH_LIBRARY) #if defined(QTCSSH_LIBRARY)
# define QSSH_EXPORT Q_DECL_EXPORT # define QSSH_EXPORT Q_DECL_EXPORT
#else #else
# define QSSH_EXPORT Q_DECL_IMPORT # define QSSH_EXPORT Q_DECL_IMPORT

View File

@@ -1,5 +1,5 @@
contains(CONFIG, dll) { contains(CONFIG, dll) {
DEFINES += QTCREATOR_UTILS_LIB DEFINES += UTILS_LIBRARY
} else { } else {
DEFINES += QTCREATOR_UTILS_STATIC_LIB DEFINES += QTCREATOR_UTILS_STATIC_LIB
} }

View File

@@ -9,7 +9,7 @@ Project {
QtcLibrary { QtcLibrary {
cpp.defines: base.concat([ cpp.defines: base.concat([
"QTCREATOR_UTILS_LIB", "UTILS_LIBRARY",
"QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath('/' + qtc.ide_bin_path, "QTC_REL_TOOLS_PATH=\"" + FileInfo.relativePath('/' + qtc.ide_bin_path,
'/' + qtc.ide_libexec_path) + "\"" '/' + qtc.ide_libexec_path) + "\""
]) ])

View File

@@ -27,7 +27,7 @@
#include <qglobal.h> #include <qglobal.h>
#if defined(QTCREATOR_UTILS_LIB) #if defined(UTILS_LIBRARY)
# define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT # define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT
#elif defined(QTCREATOR_UTILS_STATIC_LIB) // Abuse single files for manual tests #elif defined(QTCREATOR_UTILS_STATIC_LIB) // Abuse single files for manual tests
# define QTCREATOR_UTILS_EXPORT # define QTCREATOR_UTILS_EXPORT

View File

@@ -1,7 +1,7 @@
QTC_LIB_DEPENDS += cplusplus utils extensionsystem QTC_LIB_DEPENDS += cplusplus utils extensionsystem
include(../../../qttest.pri) include(../../../qttest.pri)
include($$IDE_SOURCE_TREE/src/rpath.pri) include($$IDE_SOURCE_TREE/src/rpath.pri)
DEFINES += QMLJS_BUILD_DIR DEFINES += QMLJS_LIBRARY
QT += qml xml QT += qml xml
# direct dependency on qmljs for quicker turnaround when editing them # direct dependency on qmljs for quicker turnaround when editing them

View File

@@ -12,7 +12,7 @@ SOURCES += \
tst_testtrie.cpp tst_testtrie.cpp
TEMPLATE = app TEMPLATE = app
DEFINES += QMLJS_BUILD_DIR DEFINES += QMLJS_LIBRARY
DISTFILES += \ DISTFILES += \
listAll.data \ listAll.data \

View File

@@ -5,7 +5,7 @@ QtcAutotest {
Depends { name: "QmlJS" } Depends { name: "QmlJS" }
files: [ "tst_testtrie.h", "tst_testtrie.cpp" ] files: [ "tst_testtrie.h", "tst_testtrie.cpp" ]
cpp.defines: base.concat([ cpp.defines: base.concat([
'QMLJS_BUILD_DIR', 'QMLJS_LIBRARY',
'QTCREATORDIR="' + project.ide_source_tree + '"', 'QTCREATORDIR="' + project.ide_source_tree + '"',
'TESTSRCDIR="' + path + '"' 'TESTSRCDIR="' + path + '"'
]) ])