Build all apps into same folder, to allow dev versions to run without
install
This commit is contained in:
committed by
Craig Drummond
parent
b8526f4b2b
commit
1db2b4a02a
@@ -63,6 +63,11 @@ option(ENABLE_MUSICBRAINZ "Enable MusicBrianz libraries (either this or CDDB req
|
||||
option(ENABLE_MTP "Enable MTP library (required to support MTP devices)" ON)
|
||||
option(ENABLE_AVAHI "Enable automatic mpd server discovery" ${UNIX})
|
||||
|
||||
# Build all apps into top-level folder, so that can run dev versions without install
|
||||
if (NOT WIN32 AND NOT APPLE)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_AVAHI)
|
||||
find_package(Avahi)
|
||||
macro_log_feature(AVAHI_FOUND "Avahi Support" "Automatic MPD-Server Detection" "https://www.avahi.org/" FALSE "" "")
|
||||
|
||||
@@ -742,6 +742,11 @@ QString Utils::helper(const QString &app)
|
||||
#elif defined Q_OS_MAC
|
||||
return fixPath(QCoreApplication::applicationDirPath())+app;
|
||||
#else
|
||||
// Check for helpers in same folder as main exe, so that can test dev versions without install.
|
||||
QString local = fixPath(QCoreApplication::applicationDirPath())+app;
|
||||
if (QFile::exists(local)) {
|
||||
return local;
|
||||
}
|
||||
return QString(INSTALL_PREFIX "/" LINUX_LIB_DIR "/")+QCoreApplication::applicationName()+constDirSep+app;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user