Skip to content

Commit

Permalink
Define subtarget INSTALLS in each of subtarget's .pro (#145)
Browse files Browse the repository at this point in the history
Otherwise subtargets will have their install recipes missing from the
final Makefile due to not being produced in the .pro files defining
them, nor existing beforehand.
  • Loading branch information
rplociennik authored and krzemin committed Apr 20, 2018
1 parent cee059d commit a740129
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 32 deletions.
14 changes: 10 additions & 4 deletions cli/cli.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ RCC_DIR = tmp
OBJECTS_DIR = tmp
INCLUDEPATH = src

include(../qnapi.pri)
include(../libqnapi/libqnapi.pri)

unix {
TARGET = qnapic
DESTDIR = ../
DESTDIR = $${OUTDIR}
CONFIG += link_pkgconfig
PKGCONFIG += libmediainfo
}
Expand All @@ -37,11 +38,16 @@ macx {
QMAKE_CXXFLAGS_X86_64 = -mmacosx-version-min=10.8
}

!win32 {
target.path = $${INSTALL_PREFIX}/bin
INSTALLS += target
}

win32 {
CONFIG += nostrip
RC_FILE = ../win32/qnapi.rc
RC_FILE = $${OUTDIR}/qnapi.rc
TARGET = qnapic
target.path = ../win32/out

target.path = $${INSTALL_PREFIX}
INSTALLS += target
}

29 changes: 18 additions & 11 deletions gui/gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ RCC_DIR = tmp
OBJECTS_DIR = tmp
INCLUDEPATH = src

include(../qnapi.pri)
include(../libqnapi/libqnapi.pri)

unix:!macx {
Expand All @@ -77,31 +78,37 @@ macx {
HEADERS += src/utils/infoplistdockicon.h

TARGET = QNapi
DESTDIR = ../macx/
DESTDIR = $${OUTDIR}

LIBS += -framework CoreFoundation
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
QMAKE_CXXFLAGS_X86_64 = -mmacosx-version-min=10.8
ICON = ../macx/qnapi.icns
QMAKE_INFO_PLIST = ../macx/Info.plist
7ZIP_BINARY.files = ../macx/content/7za
ICON = $${OUTDIR}/qnapi.icns
QMAKE_INFO_PLIST = $${OUTDIR}/Info.plist
7ZIP_BINARY.files = $${OUTDIR}/content/7za
7ZIP_BINARY.path = Contents/Resources
LIBMEDIAINFO.files = ../deps/libmediainfo/lib/libmediainfo.0.dylib
LIBMEDIAINFO.path = Contents/MacOS
QMAKE_BUNDLE_DATA += 7ZIP_BINARY LIBMEDIAINFO
}

!win32 {
SOURCES += src/qcumber/qinterprocesschannel.cpp
HEADERS += src/qcumber/qinterprocesschannel.h

!macx {
target.path = $${INSTALL_PREFIX}/bin
INSTALLS += target
}
}

win32 {
CONFIG += nostrip
SOURCES += src/qcumber/qinterprocesschannel_win32.cpp
HEADERS += src/qcumber/qinterprocesschannel_win32.h
RC_FILE = ../win32/qnapi.rc
RC_FILE = $${OUTDIR}/qnapi.rc
TARGET = qnapi
target.path = ../win32/out
INSTALLS += target
}

!win32 {
SOURCES += src/qcumber/qinterprocesschannel.cpp
HEADERS += src/qcumber/qinterprocesschannel.h
target.path = $${INSTALL_PREFIX}
INSTALLS += target
}
13 changes: 13 additions & 0 deletions qnapi.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
unix:!macx {
OUTDIR = $${PWD}
INSTALL_PREFIX = /usr
}

macx {
OUTDIR = $${PWD}/macx
}

win32 {
OUTDIR = $${PWD}/win32
INSTALL_PREFIX = $${OUTDIR}/out
}
21 changes: 4 additions & 17 deletions qnapi.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,11 @@ no_gui:SUBDIRS -= gui

TRANSLATIONS += translations/qnapi_it.ts translations/qnapi_pl.ts

include(qnapi.pri)

unix {
INSTALL_PREFIX = /usr
DATADIR=$${INSTALL_PREFIX}/share

!no_cli {
cli_target.files = qnapic
cli_target.path = $${INSTALL_PREFIX}/bin
INSTALLS += cli_target
}

!macx:!no_gui {
gui_target.files = qnapi
gui_target.path = $${INSTALL_PREFIX}/bin
INSTALLS += gui_target
}

doc.path = $${INSTALL_PREFIX}/share/doc/qnapi
doc.files = doc/ChangeLog \
doc/LICENSE \
Expand Down Expand Up @@ -69,8 +58,6 @@ macx:!no_gui {
}

win32 {
INSTALL_PREFIX = win32/out

QMAKE_STRIP = echo

p7zip.files = win32/content/7za.exe
Expand All @@ -91,8 +78,8 @@ win32 {

DEPLOYWIN_FLAGS = --no-translations --no-quick-import --no-system-d3d-compiler --no-angle --no-webkit --no-webkit2
deploywin.commands += windeployqt $${DEPLOYWIN_FLAGS}
!no_cli:deploywin.commands += win32/out/qnapic.exe
!no_gui:deploywin.commands += win32/out/qnapi.exe
!no_cli:deploywin.commands += $${INSTALL_PREFIX}/qnapic.exe
!no_gui:deploywin.commands += $${INSTALL_PREFIX}/qnapi.exe

platform.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows.dll
platform.path = $${INSTALL_PREFIX}/platforms
Expand Down

0 comments on commit a740129

Please sign in to comment.