cmake: on macOS absorb mupp_plot into the mupp.app bundle.

This commit is contained in:
suter_a 2018-06-12 13:56:08 +02:00
parent 7f82ecb9e7
commit 2d5d7d3d81
2 changed files with 7 additions and 3 deletions

View File

@ -1669,7 +1669,7 @@ void PmuppGui::startMuppPlot()
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString cmd = QString("%1/bin/mupp_plot").arg(MUPP_PREFIX);
#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
cmd = QString("/Applications/bin/mupp_plot"); // as35 not yet ready
cmd = QString("/Applications/mupp.app/Contents/MacOS/mupp_plot"); // as35 not yet ready
#endif
QString workDir = QString("./");
QStringList arg;
@ -1687,7 +1687,7 @@ void PmuppGui::startMuppPlot()
fMuppPlot->start(cmd, arg);
if (!fMuppPlot->waitForStarted()) {
// error handling
QString msg(tr("Could not execute the output command: ")+cmd[0]);
QString msg(tr("Could not execute the output command: ")+cmd);
QMessageBox::critical( 0,
tr("Fatal error"),
msg,

View File

@ -64,4 +64,8 @@ target_include_directories(mupp_plot
target_link_libraries(mupp_plot ${ROOT_LIBRARIES})
#--- install ------------------------------------------------------------------
install(TARGETS mupp_plot DESTINATION bin)
if (APPLE)
install(TARGETS mupp_plot DESTINATION /Applications/mupp.app/Contents/MacOS)
else (APPLE)
install(TARGETS mupp_plot DESTINATION bin)
endif (APPLE)