Skip to content

Commit

Permalink
fix: parse config.pri failed
Browse files Browse the repository at this point in the history
Change-Id: I0da217ca1a976db1c354aaba7288873ca7584b11
  • Loading branch information
Iceyer committed Jan 27, 2018
1 parent 07acf5b commit a9b3321
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/config.pri
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ win32* {
}

isEmpty(VERSION) {
PKG_CONFIG = $$first($$list(($$pkgConfigExecutable()))

PKG_CONFIG_EXE = $$first($$list($$pkgConfigExecutable()))
isEmpty(LIB_INSTALL_DIR) {
dtk_version_module = $$system($$PKG_CONFIG --variable=libdir dtkcore)
dtk_version_module = $$system($$PKG_CONFIG_EXE --variable=libdir dtkcore)
dtk_version_module = $$dtk_version_module/libdtk/modules/version.pri
exists($$dtk_version_module): include($$dtk_version_module)
else: VERSION = $$system($$PKG_CONFIG --modversion dtkcore)
else: VERSION = $$system($$PKG_CONFIG_EXE --modversion dtkcore)
} else {
dtk_version_module = $$LIB_INSTALL_DIR/libdtk/modules/version.pri
exists($$dtk_version_module): include($$dtk_version_module)
else: VERSION = $$system($$PKG_CONFIG --modversion dtkcore)
else: VERSION = $$system($$PKG_CONFIG_EXE --modversion dtkcore)
}

isEmpty(VERSION): error(VERSION is empty)
Expand Down
2 changes: 2 additions & 0 deletions src/lib.pri
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ isEmpty(LIB_INSTALL_DIR) {
target.path = $$LIB_INSTALL_DIR
}

message("Build dtkwidget version: $${VERSION}")

QMAKE_PKGCONFIG_LIBDIR = $$target.path
QMAKE_PKGCONFIG_VERSION = $$VERSION
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
Expand Down

0 comments on commit a9b3321

Please sign in to comment.