Skip to content

Instantly share code, notes, and snippets.

@floatflower
Created November 21, 2017 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floatflower/400f9150429a56590f280a0c49ae243f to your computer and use it in GitHub Desktop.
Save floatflower/400f9150429a56590f280a0c49ae243f to your computer and use it in GitHub Desktop.
SubdirProject source code tree.
#include "barlib.h"
BarLib::BarLib()
{
}
#ifndef BARLIB_H
#define BARLIB_H
#include "barlib_global.h"
class BARLIBSHARED_EXPORT BarLib
{
public:
BarLib();
};
#endif // BARLIB_H
#-------------------------------------------------
#
# Project created by QtCreator 2017-11-21T15:35:06
#
#-------------------------------------------------
QT -= gui
TARGET = BarLib
TEMPLATE = lib
DEFINES += BARLIB_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
barlib.cpp
HEADERS += \
barlib.h \
barlib_global.h
unix {
target.path = /usr/lib
INSTALLS += target
}
release: DESTDIR = build/release
debug: DESTDIR = build/debug
OBJECTS_DIR = $$DESTDIR/.obj
MOC_DIR = $$DESTDIR/.moc
RCC_DIR = $$DESTDIR/.qrc
UI_DIR = $$DESTDIR/.ui
#ifndef BARLIB_GLOBAL_H
#define BARLIB_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(BARLIB_LIBRARY)
# define BARLIBSHARED_EXPORT Q_DECL_EXPORT
#else
# define BARLIBSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // BARLIB_GLOBAL_H
QT -= gui
CONFIG += c++11 console
CONFIG -= app_bundle
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp
release: DESTDIR = build/release
debug: DESTDIR = build/debug
OBJECTS_DIR = $$DESTDIR/.obj
MOC_DIR = $$DESTDIR/.moc
RCC_DIR = $$DESTDIR/.qrc
UI_DIR = $$DESTDIR/.ui
#include <QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
TEMPLATE = subdirs
SUBDIRS += \
BarLib \
FooApp
CONFIG += ordered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment