diff options
-rw-r--r-- | 3rd-party/SingleApplication/CMakeLists.txt | 30 | ||||
-rw-r--r-- | 3rd-party/breakpad/CMakeLists.txt | 13 | ||||
-rw-r--r-- | CMakeLists.txt | 66 | ||||
-rw-r--r-- | doc/Building.asciidoc | 64 | ||||
-rw-r--r-- | doc/CMakeLists.txt | 12 | ||||
-rw-r--r-- | lib/about/CMakeLists.txt | 20 | ||||
-rw-r--r-- | lib/addressbar/CMakeLists.txt | 19 | ||||
-rw-r--r-- | lib/bookmarks/CMakeLists.txt | 28 | ||||
-rw-r--r-- | lib/configuration/CMakeLists.txt | 24 | ||||
-rw-r--r-- | lib/configuration/defaults.h.in | 14 | ||||
-rw-r--r-- | lib/downloads/CMakeLists.txt | 19 | ||||
-rw-r--r-- | lib/urlfilter/CMakeLists.txt | 22 | ||||
-rw-r--r-- | lib/web/CMakeLists.txt | 18 | ||||
-rw-r--r-- | linux/makepkg/PKGBUILD | 2 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | plugins/ConfigurationEditor/CMakeLists.txt | 30 | ||||
-rw-r--r-- | plugins/ProfileEditor/CMakeLists.txt | 47 | ||||
-rw-r--r-- | src/CMakeLists.txt | 117 | ||||
-rw-r--r-- | test/CMakeLists.txt | 31 | ||||
-rwxr-xr-x | tools/config.py | 7 |
20 files changed, 41 insertions, 544 deletions
diff --git a/3rd-party/SingleApplication/CMakeLists.txt b/3rd-party/SingleApplication/CMakeLists.txt deleted file mode 100644 index 97fe7d7..0000000 --- a/3rd-party/SingleApplication/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -#set(CMAKE_AUTOUIC ON) -#set(CMAKE_AUTORCC ON) - -add_library(SingleApplication - SingleApplication.git/singleapplication.cpp - SingleApplication.git/singleapplication.h - SingleApplication.git/singleapplication_p.cpp - SingleApplication.git/singleapplication_p.h -) - -target_include_directories(SingleApplication PUBLIC SingleApplication.git) - -target_link_libraries(SingleApplication - Qt5::Core Qt5::Network Qt5::Widgets -) - -target_compile_definitions(SingleApplication - PRIVATE QAPPLICATION_CLASS=QApplication -) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - target_link_libraries(SingleApplication - Advapi32 - ) -endif() diff --git a/3rd-party/breakpad/CMakeLists.txt b/3rd-party/breakpad/CMakeLists.txt deleted file mode 100644 index 56e30dc..0000000 --- a/3rd-party/breakpad/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - - find_package(PkgConfig REQUIRED) - - # if you do not have breakpad installed, use the build.sh script and uncomment this -# if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/install") -# message(FATAL_ERROR "Could not find breakpad build, see 3rd-party/breakpad/build.sh") -# endif () -# set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_LIST_DIR}/install/lib/pkgconfig" ) - - pkg_check_modules(BREAKPAD REQUIRED IMPORTED_TARGET breakpad-client) - -endif() # linux system
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index f75bba4..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -cmake_minimum_required(VERSION 3.10.0) -project(smolbote) - -find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED) -find_package(Boost 1.66 COMPONENTS program_options REQUIRED) -find_package(ECM 1.6.0 NO_MODULE) - -# add cmake/ to module path -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -include(FeatureSummary) -include(VendorConfig) - -if(CONFIG_USEPLASMA) - find_package(KF5 "5.6.0" COMPONENTS Wallet WindowSystem REQUIRED) -endif(CONFIG_USEPLASMA) - -if(CONFIG_USEBREAKPAD) - find_package(Threads REQUIRED) - add_subdirectory(3rd-party/breakpad) -endif(CONFIG_USEBREAKPAD) - -# Global C++ settings -set(CMAKE_CXX_STANDARD 17) - -# configure a header file to pass version information -configure_file("${PROJECT_SOURCE_DIR}/src/version.h.in" "${PROJECT_BINARY_DIR}/src/version.h") - -add_subdirectory(3rd-party/SingleApplication) - -add_subdirectory(lib/about) -add_subdirectory(lib/addressbar) -add_subdirectory(lib/bookmarks) -add_subdirectory(lib/downloads) -add_subdirectory(lib/configuration) -add_subdirectory(lib/web) -add_subdirectory(lib/urlfilter) - -add_subdirectory(plugins/ProfileEditor) -add_subdirectory(plugins/ConfigurationEditor) - -add_subdirectory(src) - -add_subdirectory(doc) - -#if(CONFIG_TESTS) - enable_testing() - find_package(Qt5 COMPONENTS Test REQUIRED) - add_subdirectory(test) -#endif(CONFIG_TESTS) - -# Summarize -message(STATUS "=== Configuration summary ===") -message(STATUS "Building ${CONFIG_POI_NAME} (${CONFIG_POI_EXE}) ${poi_Build}") -message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}") -message(STATUS "Generator: ${CMAKE_GENERATOR}") -message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") -message(STATUS "CXX compiler: ${CMAKE_CXX_COMPILER_ID}") -message(STATUS "CXX flags: ${CMAKE_CXX_FLAGS}") -message(STATUS "CXX flags dbg: ${CMAKE_CXX_FLAGS_DEBUG}") -message(STATUS "CXX flags rel: ${CMAKE_CXX_FLAGS_RELEASE}") -message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") -message(STATUS "Install bindir ${CONFIG_INSTALL_BINDIR}") -message(STATUS "Install libdir ${CONFIG_INSTALL_LIBDIR}") -message(STATUS "Install plugins ${CONFIG_INSTALL_PLUGINDIR}") - -feature_summary(WHAT ALL) diff --git a/doc/Building.asciidoc b/doc/Building.asciidoc index 431d1e7..f1927de 100644 --- a/doc/Building.asciidoc +++ b/doc/Building.asciidoc @@ -13,11 +13,19 @@ | Version 1.66 | Components: program_options -| cmake -| Version 3.10 -| Anything supporting modern cmake +| link:https://mesonbuild.com/[meson] +| Version 0.48 +| -| Compiler +| ninja +| +| Requirement of meson + +| python3 +| +| Requirement both of meson, and some scripts in tools/ + +| A compiler | C++17 support | gcc 7+; clang 4+; on Windows only MSVC is supported due to QtWebEngine @@ -36,43 +44,37 @@ generate a makefile, build the program and install it. # clone the repository git clone https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git smolbote.git cd smolbote.git + +# These two submodules are required git submodule init git submodule update 3rd-party/SingleApplication/SingleApplication.git +git submodule update tools/Kconfiglib +# generate build.ninja +mkdir build +meson build -# generate makefile -mkdir build && cd build -cmake -DCMAKE_BUILD_TYPE=Release .. - -# make && make install -make -j4 -make install +# make +ninja ---- -You can also use ccmake (cmake curses interface) or cmake-gui. +=== Configuring smolbote +smolbote uses Kconfig to store and customize default application settings such +as keyboard shortcuts and paths. You can edit these settings by running +`tools/Kconfiglib/menuconfig.py` in the repository root. -=== vendor.cmake -vendor.cmake contains various settings to customize the way in which the program -functions. The available options and their values may change with revisions. -When changing vendor.cmake, make sure to have all values defined in the preset. +When building, tools/config.py is used to load `platform-name/.config` and +generate a header file. - -DVendor=path/to/custom-vendor.cmake +=== Configuring meson +Run `meson configure` in the build directory to list available options. -=== Compiler flags -cmake does not set any C++ flags by default, including no optimization flags. -You need to set these yourself if your build system doesn't set any either. +Use `meson configure -Doption=value` change them. Ninja will regenerate its +build file on next run. -- On gcc/clang, no optimize flags are set by default, setting at least -O2 is -recommended; check vendor.cmake. - -=== Install prefix (`-DCMAKE_INSTALL_PREFIX`) -Sets the install location prefix. Install targets are only set on Release builds. - -- windows: Binary is written to bin/, and plugins to bin/plugins. -- others: Binary will be written to bin/, and plugins to lib/smolbote/. - -// Using Breakpad -include::Building/Breakpad.asciidoc[] +See the link:https://mesonbuild.com/Quick-guide.html[meson documentation] for +more information on how to use meson. // Compiling on Windows include::Building/Windows.asciidoc[] + diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt deleted file mode 100644 index c1a5bf2..0000000 --- a/doc/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -if(UNIX) - -add_custom_target(manpage - BYPRODUCTS "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz" - COMMAND "asciidoctor" "--backend=manpage" "--out-file=${PROJECT_BINARY_DIR}/doc/smolbote.7" "${PROJECT_SOURCE_DIR}/doc/smolbote.7.asciidoc" - COMMAND "gzip" "--force" "${PROJECT_BINARY_DIR}/doc/smolbote.7" - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc -) - -install(FILES "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz" DESTINATION man/man7 CONFIGURATIONS Release OPTIONAL) - -endif(UNIX) diff --git a/lib/about/CMakeLists.txt b/lib/about/CMakeLists.txt deleted file mode 100644 index be506fe..0000000 --- a/lib/about/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTORCC ON) - -add_library(about - aboutdialog.cpp - aboutdialog.h - aboutdialog.ui -) - -target_include_directories(about - PRIVATE ${Boost_INCLUDE_DIRS} - PRIVATE ${CMAKE_BINARY_DIR}/src -) - -target_link_libraries(about Qt5::Widgets) diff --git a/lib/addressbar/CMakeLists.txt b/lib/addressbar/CMakeLists.txt deleted file mode 100644 index 3a1ab2d..0000000 --- a/lib/addressbar/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTORCC ON) - -add_library(addressbar - addressbar.cpp - addressbar.h - addressbar.ui - completer.cpp - completer.h - urllineedit.cpp - urllineedit.h -) - -target_link_libraries(addressbar Qt5::Widgets) diff --git a/lib/bookmarks/CMakeLists.txt b/lib/bookmarks/CMakeLists.txt deleted file mode 100644 index ebbb035..0000000 --- a/lib/bookmarks/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTORCC ON) - -add_library(bookmarks - bookmarksform.ui - bookmarkswidget.cpp - bookmarkswidget.h - # xbel - xbel.cpp - xbel.h - - # bookmark item/model/view - model/bookmarkitem.cpp - model/bookmarkitem.h - model/bookmarkmodel.cpp - model/bookmarkmodel.h - - forms/editbookmarkdialog.cpp - forms/editbookmarkdialog.h - forms/editbookmarkdialog.ui -) - -target_link_libraries(bookmarks Qt5::Widgets) diff --git a/lib/configuration/CMakeLists.txt b/lib/configuration/CMakeLists.txt deleted file mode 100644 index d5a46ae..0000000 --- a/lib/configuration/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -#set(CMAKE_AUTOUIC ON) -#set(CMAKE_AUTORCC ON) - -add_library(configuration - configuration.cpp - configuration.h -) - -add_dependencies(configuration config_header) - -target_include_directories(configuration - PRIVATE ${Boost_INCLUDE_DIRS} - PRIVATE ${PROJECT_BINARY_DIR}/include -) - -target_link_libraries(configuration - Qt5::Core Qt5::Widgets - ${Boost_LIBRARIES} -) diff --git a/lib/configuration/defaults.h.in b/lib/configuration/defaults.h.in deleted file mode 100644 index c64cf2f..0000000 --- a/lib/configuration/defaults.h.in +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef SMOLBOTE_DEFAULTS -#define SMOLBOTE_DEFAULTS - -#define Path_Config "@CONFIG_PATH_CONFIG@" -#define Path_Crashdump "@CONFIG_PATH_CRASHDUMP@" - -#define Path_Filter "@CONFIG_PATH_FILTER@" -#define Path_Plugins "@CONFIG_PATH_PLUGINS@" -#define Path_Profiles "@CONFIG_PATH_PROFILES@" - -#define Path_Bookmarks "@CONFIG_PATH_BOOKMARKS@" -#define Path_Downloads "@CONFIG_PATH_DOWNLOADS@" - -#endif // SMOLBOTE_DEFAULTS diff --git a/lib/downloads/CMakeLists.txt b/lib/downloads/CMakeLists.txt deleted file mode 100644 index ad1a3fe..0000000 --- a/lib/downloads/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTORCC ON) - -add_library(downloads - downloadsform.ui - downloadswidget.cpp - downloadswidget.h - widgets/downloaditemform.ui - widgets/downloaditemwidget.cpp - widgets/downloaditemwidget.h - widgets/elidedlabel.cpp - widgets/elidedlabel.h) - -target_link_libraries(downloads Qt5::Widgets Qt5::WebEngineWidgets)
\ No newline at end of file diff --git a/lib/urlfilter/CMakeLists.txt b/lib/urlfilter/CMakeLists.txt deleted file mode 100644 index 20466d3..0000000 --- a/lib/urlfilter/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) - -add_library(urlfilter - # filter tree - filtertree.cpp - filtertree.h - filterleaf.cpp - filterleaf.h - domain.cpp - domain.h - - formats/adblockrule.cpp - formats/adblockrule.h - formats/hostlistrule.cpp - formats/hostlistrule.h -) - -target_link_libraries(urlfilter Qt5::WebEngineWidgets) diff --git a/lib/web/CMakeLists.txt b/lib/web/CMakeLists.txt deleted file mode 100644 index 12b4080..0000000 --- a/lib/web/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) - -add_library(web - profilemanager.cpp - profilemanager.h - webprofile.cpp - webprofile.h -) - -target_include_directories(web - PRIVATE ${PROJECT_SOURCE_DIR}/include -) - -target_link_libraries(web Qt5::WebEngineWidgets) diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD index 4b2aa06..bf62f9c 100644 --- a/linux/makepkg/PKGBUILD +++ b/linux/makepkg/PKGBUILD @@ -17,7 +17,7 @@ optdepends=('firejail: launch a sandboxed instance') makedepends=('git' 'meson' 'pkg-config' 'asciidoctor') # this is the central repository -source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git#branch=testing-meson" +source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git" "git+https://github.com/itay-grudev/SingleApplication.git" "git+https://github.com/ulfalizer/Kconfiglib.git") diff --git a/meson.build b/meson.build index b177e24..91e3bc1 100644 --- a/meson.build +++ b/meson.build @@ -41,7 +41,7 @@ dep_genheaders = declare_dependency( output: 'version.h' ), custom_target('configheader', - input: ['tools/config.py', 'src/Kconfig', 'linux/.config'], + input: ['tools/config.py', 'src/Kconfig', host_machine.system() + '/.config'], output: 'config.h', command: [python3, '@INPUT0@', '--kconfig=@INPUT1@', '--dotconfig=@INPUT2@', '--generate=@OUTPUT@'], build_by_default: true diff --git a/plugins/ConfigurationEditor/CMakeLists.txt b/plugins/ConfigurationEditor/CMakeLists.txt deleted file mode 100644 index 7eb6de4..0000000 --- a/plugins/ConfigurationEditor/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -find_package(Qt5Core REQUIRED) -find_package(Qt5Widgets REQUIRED) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - -add_library(ConfigurationEditorPlugin SHARED - ${CMAKE_SOURCE_DIR}/include/plugininterface.h - ${CMAKE_SOURCE_DIR}/include/browserinterface.h - - configurationeditorplugin.cpp - configurationeditorplugin.h - forms/configurationdialog.cpp - forms/configurationdialog.h - forms/configurationdialog.ui -) - -target_include_directories(ConfigurationEditorPlugin - PRIVATE ${CMAKE_SOURCE_DIR}/include -) - -target_link_libraries(ConfigurationEditorPlugin - PRIVATE Qt5::Widgets -) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - install(TARGETS ConfigurationEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release) -else() - install(TARGETS ConfigurationEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release) -endif() diff --git a/plugins/ProfileEditor/CMakeLists.txt b/plugins/ProfileEditor/CMakeLists.txt deleted file mode 100644 index 25a9638..0000000 --- a/plugins/ProfileEditor/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -find_package(Qt5Core REQUIRED) -find_package(Qt5Widgets REQUIRED) -find_package(Qt5WebEngineWidgets REQUIRED) - -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - -add_library(ProfileEditorPlugin SHARED - ${CMAKE_SOURCE_DIR}/include/profileinterface.h - ${CMAKE_SOURCE_DIR}/include/browserinterface.h - ${CMAKE_SOURCE_DIR}/include/plugininterface.h - - profileeditorplugin.cpp - profileeditorplugin.h - - forms/profilemanagerdialog.cpp - forms/profilemanagerdialog.h - forms/profilemanagerdialog.ui - forms/profileview.cpp - forms/profileview.h - forms/profileview.ui - - forms/newprofiledialog.cpp - forms/newprofiledialog.h - forms/newprofiledialog.ui - forms/newhttpheaderdialog.cpp - forms/newhttpheaderdialog.h - forms/newhttpheaderdialog.ui -) - -target_include_directories(ProfileEditorPlugin - PRIVATE ${CMAKE_SOURCE_DIR}/include -) - -target_link_libraries(ProfileEditorPlugin - PRIVATE Qt5::Widgets - PRIVATE Qt5::WebEngineWidgets -) - -if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - install(TARGETS ProfileEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release) -else() - install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release) -endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 585068e..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,117 +0,0 @@ -# Find includes in corresponding build directories -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Instruct CMake to run moc automatically when needed. -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTORCC ON) - -set(srclist - # main - main.cpp - browser.cpp - browser.h - session.cpp - session.h - util.cpp - util.h - - # resources (icons, etc) - ${PROJECT_SOURCE_DIR}/data/resources.qrc - - # main window - mainwindow/mainwindow.cpp - mainwindow/mainwindow.h - mainwindow/mainwindow.ui - mainwindow/widgets/dockwidget.cpp - mainwindow/widgets/dockwidget.h - mainwindow/widgets/navigationbar.cpp - mainwindow/widgets/navigationbar.h - mainwindow/widgets/searchform.cpp - mainwindow/widgets/searchform.h - mainwindow/widgets/searchform.ui - - # subwindow - subwindow/subwindow.cpp - subwindow/subwindow.h - subwindow/tabwidget.cpp - subwindow/tabwidget.h - - # webengine - webengine/filter.cpp - webengine/filter.h - webengine/urlinterceptor.cpp - webengine/urlinterceptor.h - webengine/webpage.cpp - webengine/webpage.h - webengine/webview.cpp - webengine/webview.h - - # wallet (form autofill) - wallet/wallet.cpp - wallet/wallet.h - - # interfaces - ${PROJECT_SOURCE_DIR}/include/plugininterface.h - ${PROJECT_SOURCE_DIR}/include/profileinterface.h - ${PROJECT_SOURCE_DIR}/include/browserinterface.h -) - -if(DEFINED QTBUG-62511) - set_property(SOURCE ${PROJECT_SOURCE_DIR}/data/resources.qrc PROPERTY AUTORCC_OPTIONS "--format-version=1") -endif() - -# if you are using a custom build location for breakpad: -#if(CONFIG_USEBREAKPAD) -# link_directories("${BREAKPAD_LIBRARY_DIRS}") -#endif(CONFIG_USEBREAKPAD) - -if(WIN32) - add_executable(${CONFIG_POI_EXE} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc) -else() - add_executable(${CONFIG_POI_EXE} ${srclist}) -endif() - -add_dependencies(${CONFIG_POI_EXE} config_header) - -target_include_directories(${CONFIG_POI_EXE} - PRIVATE ${Boost_INCLUDE_DIRS} - PRIVATE ${PROJECT_SOURCE_DIR}/include - PRIVATE ${PROJECT_BINARY_DIR}/include - PRIVATE ${PROJECT_SOURCE_DIR}/lib - PRIVATE ${PROJECT_SOURCE_DIR}/plugins -) - -target_link_libraries(${CONFIG_POI_EXE} - Qt5::Core Qt5::Widgets Qt5::WebEngineWidgets - ${Boost_LIBRARIES} - SingleApplication - about - addressbar - configuration - bookmarks downloads web urlfilter -) - -if(CONFIG_USEBREAKPAD) - target_link_libraries(${CONFIG_POI_EXE} Threads::Threads ${BREAKPAD_LIBRARIES}) - target_include_directories(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_INCLUDE_DIRS}) - target_compile_options(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_CFLAGS_OTHER}) - - target_compile_definitions(${CONFIG_POI_EXE} PRIVATE BreakpadEnabled) -endif(CONFIG_USEBREAKPAD) - -if(CONFIG_USEPLASMA) - target_link_libraries(${CONFIG_POI_EXE} KF5::Wallet KF5::WindowSystem) - target_compile_definitions(${CONFIG_POI_EXE} PRIVATE PLASMA) -endif(CONFIG_USEPLASMA) - -target_compile_definitions(${CONFIG_POI_EXE} - PRIVATE QAPPLICATION_CLASS=QApplication -) - -install(TARGETS ${CONFIG_POI_EXE} RUNTIME DESTINATION ${CONFIG_INSTALL_BINDIR} CONFIGURATIONS Release) -if(UNIX) -install(FILES ${PROJECT_SOURCE_DIR}/data/poi.svg DESTINATION ${CONFIG_INSTALL_ICONDIR}/hicolor/scalable/apps CONFIGURATIONS Release) -install(FILES ${PROJECT_SOURCE_DIR}/linux/poi.desktop DESTINATION ${CONFIG_INSTALL_APPDIR} CONFIGURATIONS Release) -install(FILES ${PROJECT_SOURCE_DIR}/data/poi.profile DESTINATION ${CONFIG_INSTALL_LIBDIR} CONFIGURATIONS Release) -endif(UNIX) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index 8799002..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -# AdblockTest -add_executable(AdBlockTest - adblock/adblocktest.cpp - adblock/adblocktest.h -) - -target_include_directories(AdBlockTest PRIVATE ../lib/urlfilter) -target_link_libraries(AdBlockTest Qt5::Test urlfilter) -add_test(NAME urlfilter-adblock COMMAND AdBlockTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) - -# HostlistTest -add_executable(HostlistTest - hostlist/hostlisttest.cpp - hostlist/hostlisttest.h -) -target_include_directories(HostlistTest PRIVATE ../lib/urlfilter/) -target_link_libraries(HostlistTest Qt5::Test urlfilter) -add_test(NAME urlfilter-hostlist COMMAND HostlistTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) - -# matching algorithm benchmark -add_executable(MatcherBenchmark - matcherbenchmark/matcherbenchmark.cpp - matcherbenchmark/matcherbenchmark.h -) -target_link_libraries(MatcherBenchmark Qt5::Test) -# Adding this benchmark to tests is unnecessary as it doesn't test anything. -#add_test(NAME matcher-benchmark COMMAND MatcherBenchmark WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) diff --git a/tools/config.py b/tools/config.py index 96c4576..9283fd8 100755 --- a/tools/config.py +++ b/tools/config.py @@ -53,7 +53,12 @@ def main(args): def writeItem(node, gen): while node: if isinstance(node.item, kconfiglib.Symbol): - gen.write("#define CONFIG_{0} \"{1}\"\n".format(node.item.name, node.item.str_value)) + if node.item.str_value == 'y': + gen.write("#define CONFIG_{0}\n".format(node.item.name)) + elif node.item.str_value == 'n': + gen.write("#undef CONFIG_{0}\n".format(node.item.name)) + else: + gen.write("#define CONFIG_{0} \"{1}\"\n".format(node.item.name, node.item.str_value)) if node.list: writeItem(node.list, gen) |