Created
November 3, 2013 09:57
-
-
Save llCorvinSll/7288566 to your computer and use it in GitHub Desktop.
Qt subdirs project and setup deps between subprojects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include( ../common.pri ) | |
TEMPLATE = app | |
SOURCES += main.cpp | |
LIBS += -L../logic -llogic \ | |
-L../gui -lgui | |
# Will build the final executable in the main project directory. | |
TARGET = ../project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Includes common configuration for all subdirectory .pro files. | |
INCLUDEPATH += . .. | |
TEMPLATE = lib | |
#remove main.cpp to prevent multiple compilation | |
SOURCES -= main.cpp | |
# The following keeps the generated files at least somewhat separate | |
# from the source files. | |
UI_DIR = uics | |
MOC_DIR = mocs | |
OBJECTS_DIR = objs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include( ../common.pri ) | |
FORMS += gui.ui | |
HEADERS += gui.h | |
SOURCES += gui.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include( ../common.pri ) | |
HEADERS += logic.h | |
SOURCES += logic.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEMPLATE = subdirs | |
SUBDIRS = logic \ | |
gui | |
# build must be last: | |
CONFIG += ordered | |
SUBDIRS += build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project_dir/ | |
-project.pro | |
-common.pri | |
-logic/ | |
----logic.pro | |
----some logic files | |
-gui/ | |
----gui.pro | |
----gui files | |
-build/ | |
----build.pro | |
----main.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment