Merge pull request #148 from admsasha/master

build for FreeBSD
This commit is contained in:
glixx 2019-07-01 08:04:13 +03:00 committed by GitHub
commit 3b37636d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

View File

@ -98,6 +98,12 @@ contains(USE_FTGL, ON){
DEFINES += NO_USE_FTGL
}
contains(NO_LANGS, ON){
message(building without languages)
DEFINES += NO_LANGS
}
RC_FILE = src/pianobooster.rc
OBJECTS_DIR = tmp

View File

@ -50,6 +50,11 @@ else(USE_FTGL)
add_compile_options("-DNO_USE_FTGL")
endif(USE_FTGL)
if (NO_LANGS)
add_compile_options("-DNO_LANGS")
endif(NO_LANGS)
# Finds Qt5 libraries
FIND_PACKAGE( Qt5 REQUIRED COMPONENTS Core Gui Widgets LinguistTools OpenGL Xml )
@ -64,7 +69,6 @@ IF(${CMAKE_SYSTEM} MATCHES "Linux")
ENDIF(${CMAKE_SYSTEM} MATCHES "Linux")
IF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
LINK_LIBRARIES (GL)
ENDIF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM} MATCHES "Windows")
@ -211,7 +215,7 @@ ENDIF(WIN32)
qt5_use_modules(pianobooster Core Gui Widgets LinguistTools OpenGL Xml)
target_link_libraries (pianobooster Qt5::Widgets Qt5::Xml Qt5::OpenGL ${FTGL_LIBRARY} ${RTMIDI_LIBRARY} ${JACK_LIBRARY})
target_link_libraries (pianobooster Qt5::Widgets Qt5::Xml Qt5::OpenGL ${OPENGL_LIBRARIES} ${FTGL_LIBRARY} ${RTMIDI_LIBRARY} ${JACK_LIBRARY})
INSTALL( FILES ../pianobooster.desktop DESTINATION share/applications )
INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin)

View File

@ -49,6 +49,7 @@ GuiPreferencesDialog::GuiPreferencesDialog(QWidget *parent)
}
void GuiPreferencesDialog::initLanguageCombo(){
#ifndef NO_LANGS
QString localeDirectory =
#ifdef Q_OS_WIN32
QApplication::applicationDirPath() + "/translations/";
@ -126,6 +127,7 @@ void GuiPreferencesDialog::initLanguageCombo(){
}
}
}
#endif
}
void GuiPreferencesDialog::init(CSong* song, CSettings* settings, CGLView * glView)

View File

@ -776,6 +776,7 @@ void QtWindow::loadTutorHtml(const QString & name)
}
void QtWindow::refreshTranslate(){
#ifndef NO_LANGS
QString localeDirectory =
#ifdef Q_OS_WIN32
QApplication::applicationDirPath() + "/translations/";
@ -860,4 +861,6 @@ void QtWindow::refreshTranslate(){
m_topBar->updateTranslate();
m_settings->updateWarningMessages();
m_settings->updateTutorPage();
#endif
}