I have a project with the following structure:
MainProject.pro
ExecProject.pro
LibProject.pro
As you can guess there is a dependency between the ExecProject and the LibProject.
My problem is that when debugging I cannot step into the LibProject source code (even if the code is executed).
Here is the MainProject.pro file contents :
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
LibProject \
ExecProject
ExecProject.dependes = LibProject
The LibProject.pro file content:
TARGET = LibProject
TEMPLATE = lib
CONFIG = staticlib
DEFINES += LIBPROJECT_LIBRARY
SOURCES += LibProject.cpp
HEADERS += LibProject.h\
LibProject_global.h
And the ExecProject.pro file content:
QT += core
TARGET = ExecProject
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += ../LibProject
LIBS += -L../LibProject -lLibProject
Does anyone have an idea?
I finally solved my problem using .pri files for my libs and using the following command in my .pro file:
include(path/to/my/lib/mylib.pri)
My project hierarchy is as follow:
root
\app
\app1
\app2
\libs
\lib1
- class1.h
- class1.cpp
- class2.h
- class2.cpp
\lib2