Added possibility to compile without GUI
parent
532e4ec95f
commit
77b93a367c
|
@ -7,7 +7,9 @@ project (whyblocked
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(LIBXDG_BASEDIR REQUIRED libxdg-basedir)
|
pkg_check_modules(LIBXDG_BASEDIR REQUIRED libxdg-basedir)
|
||||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
if(NOT WITHOUT_GUI)
|
||||||
|
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||||
|
endif()
|
||||||
find_package(Qt5LinguistTools)
|
find_package(Qt5LinguistTools)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
@ -44,8 +46,9 @@ target_link_libraries(whyblocked
|
||||||
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs)
|
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs)
|
||||||
install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS whyblocked DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
if(NOT WITHOUT_QT)
|
if(NOT WITHOUT_GUI)
|
||||||
add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp ${QM_FILES})
|
add_executable(whyblocked-gui src/interface_qt.cpp src/whyblocked.cpp
|
||||||
|
${QM_FILES})
|
||||||
target_link_libraries(whyblocked-gui
|
target_link_libraries(whyblocked-gui
|
||||||
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs
|
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp stdc++fs
|
||||||
Qt5::Widgets)
|
Qt5::Widgets)
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <QTranslator>
|
||||||
|
#include <QLibraryInfo>
|
||||||
#include "version.hpp"
|
#include "version.hpp"
|
||||||
#include "whyblocked.hpp"
|
#include "whyblocked.hpp"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue