clangcodemodel.pro 3.72 KB
Newer Older
1 2 3
include(../../qtcreatorplugin.pri)
include(clang_installation.pri)

4 5 6
message("Building ClangCodeModel plugin with Clang from $$LLVM_INSTALL_DIR")
message("  INCLUDEPATH += $$LLVM_INCLUDEPATH")
message("  LIBS += $$LLVM_LIBS")
7 8 9 10 11 12 13 14 15 16 17 18 19

LIBS += $$LLVM_LIBS
INCLUDEPATH += $$LLVM_INCLUDEPATH
DEFINES += CLANGCODEMODEL_LIBRARY

unix:QMAKE_LFLAGS += -Wl,-rpath,\'$$LLVM_LIBDIR\'

contains(DEFINES, CLANG_COMPLETION) {
    HEADERS += clangcompletion.h clangcompleter.h completionproposalsbuilder.h
    SOURCES += clangcompletion.cpp clangcompleter.cpp completionproposalsbuilder.cpp
}

contains(DEFINES, CLANG_HIGHLIGHTING) {
20 21
    HEADERS += cppcreatemarkers.h
    SOURCES += cppcreatemarkers.cpp
22 23 24 25
}

SOURCES += \
    $$PWD/clangcodemodelplugin.cpp \
26 27
    $$PWD/clangeditordocumentparser.cpp \
    $$PWD/clangeditordocumentprocessor.cpp \
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    $$PWD/sourcemarker.cpp \
    $$PWD/symbol.cpp \
    $$PWD/sourcelocation.cpp \
    $$PWD/unit.cpp \
    $$PWD/utils.cpp \
    $$PWD/utils_p.cpp \
    $$PWD/semanticmarker.cpp \
    $$PWD/diagnostic.cpp \
    $$PWD/unsavedfiledata.cpp \
    $$PWD/fastindexer.cpp \
    $$PWD/pchinfo.cpp \
    $$PWD/pchmanager.cpp \
    $$PWD/clangprojectsettings.cpp \
    $$PWD/clangprojectsettingspropertiespage.cpp \
    $$PWD/raii/scopedclangoptions.cpp \
    $$PWD/clangmodelmanagersupport.cpp

HEADERS += \
    $$PWD/clangcodemodelplugin.h \
47 48
    $$PWD/clangeditordocumentparser.h \
    $$PWD/clangeditordocumentprocessor.h \
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    $$PWD/clang_global.h \
    $$PWD/sourcemarker.h \
    $$PWD/constants.h \
    $$PWD/symbol.h \
    $$PWD/cxraii.h \
    $$PWD/sourcelocation.h \
    $$PWD/unit.h \
    $$PWD/utils.h \
    $$PWD/utils_p.h \
    $$PWD/semanticmarker.h \
    $$PWD/diagnostic.h \
    $$PWD/unsavedfiledata.h \
    $$PWD/fastindexer.h \
    $$PWD/pchinfo.h \
    $$PWD/pchmanager.h \
    $$PWD/clangprojectsettings.h \
    $$PWD/clangprojectsettingspropertiespage.h \
    $$PWD/raii/scopedclangoptions.h \
    $$PWD/clangmodelmanagersupport.h

69 70 71 72 73 74
HEADERS += clangutils.h \
    cxprettyprinter.h

SOURCES += clangutils.cpp \
    cxprettyprinter.cpp

75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
contains(DEFINES, CLANG_INDEXING) {
    HEADERS += \
        $$PWD/clangindexer.h \
        $$PWD/clangsymbolsearcher.h \
        $$PWD/index.h \
        $$PWD/indexer.h
#        $$PWD/dependencygraph.h \

    SOURCES += \
        $$PWD/clangindexer.cpp \
        $$PWD/clangsymbolsearcher.cpp \
        $$PWD/index.cpp \
        $$PWD/indexer.cpp
#        $$PWD/dependencygraph.cpp \
}

equals(TEST, 1) {
    RESOURCES += \
        $$PWD/test/clang_tests_database.qrc

    HEADERS += \
        $$PWD/test/completiontesthelper.h

    SOURCES += \
        $$PWD/test/completiontesthelper.cpp \
        $$PWD/test/clangcompletion_test.cpp

102
    DISTFILES += \
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
        $$PWD/test/cxx_regression_1.cpp \
        $$PWD/test/cxx_regression_2.cpp \
        $$PWD/test/cxx_regression_3.cpp \
        $$PWD/test/cxx_regression_4.cpp \
        $$PWD/test/cxx_regression_5.cpp \
        $$PWD/test/cxx_regression_6.cpp \
        $$PWD/test/cxx_regression_7.cpp \
        $$PWD/test/cxx_regression_8.cpp \
        $$PWD/test/cxx_regression_9.cpp \
        $$PWD/test/cxx_snippets_1.cpp \
        $$PWD/test/cxx_snippets_2.cpp \
        $$PWD/test/cxx_snippets_3.cpp \
        test/cxx_snippets_4.cpp \
        test/objc_messages_1.mm \
        test/objc_messages_2.mm \
        test/objc_messages_3.mm
}

FORMS += $$PWD/clangprojectsettingspropertiespage.ui

macx {
    LIBCLANG_VERSION=3.3
    POSTL = install_name_tool -change "@executable_path/../lib/libclang.$${LIBCLANG_VERSION}.dylib" "$$LLVM_INSTALL_DIR/lib/libclang.$${LIBCLANG_VERSION}.dylib" "\"$${DESTDIR}/lib$${TARGET}.dylib\"" $$escape_expand(\\n\\t)
    !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
    QMAKE_POST_LINK = $$POSTL $$QMAKE_POST_LINK
}