Browse Source

Remove CMakeLists

Aqua-sama 1 month ago
parent
commit
1f85a65078
Signed by: Aqua-sama <aqua@iserlohn-fortress.net> GPG Key ID: 5378B8349C1D5ADA

+ 0
- 30
3rd-party/SingleApplication/CMakeLists.txt View File

@@ -1,30 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-#set(CMAKE_AUTOUIC ON)
7
-#set(CMAKE_AUTORCC ON)
8
-
9
-add_library(SingleApplication
10
-    SingleApplication.git/singleapplication.cpp
11
-    SingleApplication.git/singleapplication.h
12
-    SingleApplication.git/singleapplication_p.cpp
13
-    SingleApplication.git/singleapplication_p.h
14
-)
15
-
16
-target_include_directories(SingleApplication PUBLIC SingleApplication.git)
17
-
18
-target_link_libraries(SingleApplication
19
-    Qt5::Core Qt5::Network Qt5::Widgets
20
-)
21
-
22
-target_compile_definitions(SingleApplication
23
-    PRIVATE QAPPLICATION_CLASS=QApplication
24
-)
25
-
26
-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
27
-    target_link_libraries(SingleApplication
28
-        Advapi32
29
-    )
30
-endif()

+ 0
- 13
3rd-party/breakpad/CMakeLists.txt View File

@@ -1,13 +0,0 @@
1
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
2
-
3
-    find_package(PkgConfig REQUIRED)
4
-
5
-    # if you do not have breakpad installed, use the build.sh script and uncomment this
6
-#    if (NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/install")
7
-#        message(FATAL_ERROR "Could not find breakpad build, see 3rd-party/breakpad/build.sh")
8
-#    endif ()
9
-#    set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_CURRENT_LIST_DIR}/install/lib/pkgconfig" )
10
-
11
-    pkg_check_modules(BREAKPAD REQUIRED IMPORTED_TARGET breakpad-client)
12
-
13
-endif() # linux system

+ 0
- 66
CMakeLists.txt View File

@@ -1,66 +0,0 @@
1
-cmake_minimum_required(VERSION 3.10.0)
2
-project(smolbote)
3
-
4
-find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED)
5
-find_package(Boost 1.66 COMPONENTS program_options REQUIRED)
6
-find_package(ECM 1.6.0 NO_MODULE)
7
-
8
-# add cmake/ to module path
9
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
10
-include(FeatureSummary)
11
-include(VendorConfig)
12
-
13
-if(CONFIG_USEPLASMA)
14
-    find_package(KF5 "5.6.0" COMPONENTS Wallet WindowSystem REQUIRED)
15
-endif(CONFIG_USEPLASMA)
16
-
17
-if(CONFIG_USEBREAKPAD)
18
-    find_package(Threads REQUIRED)
19
-    add_subdirectory(3rd-party/breakpad)
20
-endif(CONFIG_USEBREAKPAD)
21
-
22
-# Global C++ settings
23
-set(CMAKE_CXX_STANDARD 17)
24
-
25
-# configure a header file to pass version information
26
-configure_file("${PROJECT_SOURCE_DIR}/src/version.h.in" "${PROJECT_BINARY_DIR}/src/version.h")
27
-
28
-add_subdirectory(3rd-party/SingleApplication)
29
-
30
-add_subdirectory(lib/about)
31
-add_subdirectory(lib/addressbar)
32
-add_subdirectory(lib/bookmarks)
33
-add_subdirectory(lib/downloads)
34
-add_subdirectory(lib/configuration)
35
-add_subdirectory(lib/web)
36
-add_subdirectory(lib/urlfilter)
37
-
38
-add_subdirectory(plugins/ProfileEditor)
39
-add_subdirectory(plugins/ConfigurationEditor)
40
-
41
-add_subdirectory(src)
42
-
43
-add_subdirectory(doc)
44
-
45
-#if(CONFIG_TESTS)
46
-    enable_testing()
47
-    find_package(Qt5 COMPONENTS Test REQUIRED)
48
-    add_subdirectory(test)
49
-#endif(CONFIG_TESTS)
50
-
51
-# Summarize
52
-message(STATUS "=== Configuration summary ===")
53
-message(STATUS "Building ${CONFIG_POI_NAME} (${CONFIG_POI_EXE}) ${poi_Build}")
54
-message(STATUS "Platform:       ${CMAKE_SYSTEM_NAME}")
55
-message(STATUS "Generator:      ${CMAKE_GENERATOR}")
56
-message(STATUS "Build type:     ${CMAKE_BUILD_TYPE}")
57
-message(STATUS "CXX compiler:   ${CMAKE_CXX_COMPILER_ID}")
58
-message(STATUS "CXX flags:      ${CMAKE_CXX_FLAGS}")
59
-message(STATUS "CXX flags dbg:  ${CMAKE_CXX_FLAGS_DEBUG}")
60
-message(STATUS "CXX flags rel:  ${CMAKE_CXX_FLAGS_RELEASE}")
61
-message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
62
-message(STATUS "Install bindir  ${CONFIG_INSTALL_BINDIR}")
63
-message(STATUS "Install libdir  ${CONFIG_INSTALL_LIBDIR}")
64
-message(STATUS "Install plugins ${CONFIG_INSTALL_PLUGINDIR}")
65
-
66
-feature_summary(WHAT ALL)

+ 33
- 31
doc/Building.asciidoc View File

@@ -13,11 +13,19 @@
13 13
 | Version 1.66
14 14
 | Components: program_options
15 15
 
16
-| cmake
17
-| Version 3.10
18
-| Anything supporting modern cmake
16
+| link:https://mesonbuild.com/[meson]
17
+| Version 0.48
18
+|
19 19
 
20
-| Compiler
20
+| ninja
21
+|
22
+| Requirement of meson
23
+
24
+| python3
25
+|
26
+| Requirement both of meson, and some scripts in tools/
27
+
28
+| A compiler
21 29
 | C++17 support
22 30
 | gcc 7+; clang 4+; on Windows only MSVC is supported due to QtWebEngine
23 31
 
@@ -36,43 +44,37 @@ generate a makefile, build the program and install it.
36 44
 # clone the repository
37 45
 git clone https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git smolbote.git
38 46
 cd smolbote.git
47
+
48
+# These two submodules are required
39 49
 git submodule init
40 50
 git submodule update 3rd-party/SingleApplication/SingleApplication.git
51
+git submodule update tools/Kconfiglib
41 52
 
53
+# generate build.ninja
54
+mkdir build
55
+meson build
42 56
 
43
-# generate makefile
44
-mkdir build && cd build
45
-cmake -DCMAKE_BUILD_TYPE=Release ..
46
-
47
-# make && make install
48
-make -j4
49
-make install
57
+# make
58
+ninja
50 59
 ----
51 60
 
52
-You can also use ccmake (cmake curses interface) or cmake-gui.
61
+=== Configuring smolbote
62
+smolbote uses Kconfig to store and customize default application settings such
63
+as keyboard shortcuts and paths. You can edit these settings by running
64
+`tools/Kconfiglib/menuconfig.py` in the repository root.
53 65
 
54
-=== vendor.cmake
55
-vendor.cmake contains various settings to customize the way in which the program
56
-functions. The available options and their values may change with revisions.
57
-When changing vendor.cmake, make sure to have all values defined in the preset.
66
+When building, tools/config.py is used to load `platform-name/.config` and
67
+generate a header file.
58 68
 
59
-  -DVendor=path/to/custom-vendor.cmake
69
+=== Configuring meson
70
+Run `meson configure` in the build directory to list available options.
60 71
 
61
-=== Compiler flags
62
-cmake does not set any C++ flags by default, including no optimization flags.
63
-You need to set these yourself if your build system doesn't set any either.
72
+Use `meson configure -Doption=value` change them. Ninja will regenerate its
73
+build file on next run.
64 74
 
65
-- On gcc/clang, no optimize flags are set by default, setting at least -O2 is
66
-recommended; check vendor.cmake.
67
-
68
-=== Install prefix (`-DCMAKE_INSTALL_PREFIX`)
69
-Sets the install location prefix. Install targets are only set on Release builds.
70
-
71
-- windows: Binary is written to bin/, and plugins to bin/plugins.
72
-- others: Binary will be written to bin/, and plugins to lib/smolbote/.
73
-
74
-// Using Breakpad
75
-include::Building/Breakpad.asciidoc[]
75
+See the link:https://mesonbuild.com/Quick-guide.html[meson documentation] for
76
+more information on how to use meson.
76 77
 
77 78
 // Compiling on Windows
78 79
 include::Building/Windows.asciidoc[]
80
+

+ 0
- 12
doc/CMakeLists.txt View File

@@ -1,12 +0,0 @@
1
-if(UNIX)
2
-
3
-add_custom_target(manpage
4
-    BYPRODUCTS "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz"
5
-    COMMAND "asciidoctor" "--backend=manpage" "--out-file=${PROJECT_BINARY_DIR}/doc/smolbote.7" "${PROJECT_SOURCE_DIR}/doc/smolbote.7.asciidoc"
6
-    COMMAND "gzip" "--force" "${PROJECT_BINARY_DIR}/doc/smolbote.7"
7
-    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc
8
-)
9
-
10
-install(FILES "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz" DESTINATION man/man7 CONFIGURATIONS Release OPTIONAL)
11
-
12
-endif(UNIX)

+ 0
- 20
lib/about/CMakeLists.txt View File

@@ -1,20 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-set(CMAKE_AUTOUIC ON)
7
-set(CMAKE_AUTORCC ON)
8
-
9
-add_library(about
10
-    aboutdialog.cpp
11
-    aboutdialog.h
12
-    aboutdialog.ui
13
-)
14
-
15
-target_include_directories(about
16
-    PRIVATE ${Boost_INCLUDE_DIRS}
17
-    PRIVATE ${CMAKE_BINARY_DIR}/src
18
-)
19
-
20
-target_link_libraries(about Qt5::Widgets)

+ 0
- 19
lib/addressbar/CMakeLists.txt View File

@@ -1,19 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-set(CMAKE_AUTOUIC ON)
7
-set(CMAKE_AUTORCC ON)
8
-
9
-add_library(addressbar
10
-    addressbar.cpp
11
-    addressbar.h
12
-    addressbar.ui
13
-    completer.cpp
14
-    completer.h
15
-    urllineedit.cpp
16
-    urllineedit.h
17
-)
18
-
19
-target_link_libraries(addressbar Qt5::Widgets)

+ 0
- 28
lib/bookmarks/CMakeLists.txt View File

@@ -1,28 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-set(CMAKE_AUTOUIC ON)
7
-set(CMAKE_AUTORCC ON)
8
-
9
-add_library(bookmarks
10
-    bookmarksform.ui
11
-    bookmarkswidget.cpp
12
-    bookmarkswidget.h
13
-    # xbel
14
-    xbel.cpp
15
-    xbel.h
16
-
17
-    # bookmark item/model/view
18
-    model/bookmarkitem.cpp
19
-    model/bookmarkitem.h
20
-    model/bookmarkmodel.cpp
21
-    model/bookmarkmodel.h
22
-
23
-    forms/editbookmarkdialog.cpp
24
-    forms/editbookmarkdialog.h
25
-    forms/editbookmarkdialog.ui
26
-)
27
-
28
-target_link_libraries(bookmarks Qt5::Widgets)

+ 0
- 24
lib/configuration/CMakeLists.txt View File

@@ -1,24 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-#set(CMAKE_AUTOUIC ON)
7
-#set(CMAKE_AUTORCC ON)
8
-
9
-add_library(configuration
10
-        configuration.cpp
11
-        configuration.h
12
-)
13
-
14
-add_dependencies(configuration config_header)
15
-
16
-target_include_directories(configuration
17
-    PRIVATE ${Boost_INCLUDE_DIRS}
18
-    PRIVATE ${PROJECT_BINARY_DIR}/include
19
-)
20
-
21
-target_link_libraries(configuration
22
-        Qt5::Core Qt5::Widgets
23
-        ${Boost_LIBRARIES}
24
-)

+ 0
- 14
lib/configuration/defaults.h.in View File

@@ -1,14 +0,0 @@
1
-#ifndef SMOLBOTE_DEFAULTS
2
-#define SMOLBOTE_DEFAULTS
3
-
4
-#define Path_Config "@CONFIG_PATH_CONFIG@"
5
-#define Path_Crashdump "@CONFIG_PATH_CRASHDUMP@"
6
-
7
-#define Path_Filter "@CONFIG_PATH_FILTER@"
8
-#define Path_Plugins "@CONFIG_PATH_PLUGINS@"
9
-#define Path_Profiles "@CONFIG_PATH_PROFILES@"
10
-
11
-#define Path_Bookmarks "@CONFIG_PATH_BOOKMARKS@"
12
-#define Path_Downloads "@CONFIG_PATH_DOWNLOADS@"
13
-
14
-#endif // SMOLBOTE_DEFAULTS

+ 0
- 19
lib/downloads/CMakeLists.txt View File

@@ -1,19 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-set(CMAKE_AUTOUIC ON)
7
-set(CMAKE_AUTORCC ON)
8
-
9
-add_library(downloads
10
-        downloadsform.ui
11
-        downloadswidget.cpp
12
-        downloadswidget.h
13
-        widgets/downloaditemform.ui
14
-        widgets/downloaditemwidget.cpp
15
-        widgets/downloaditemwidget.h
16
-        widgets/elidedlabel.cpp
17
-        widgets/elidedlabel.h)
18
-
19
-target_link_libraries(downloads Qt5::Widgets Qt5::WebEngineWidgets)

+ 0
- 22
lib/urlfilter/CMakeLists.txt View File

@@ -1,22 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-
7
-add_library(urlfilter
8
-    # filter tree
9
-    filtertree.cpp
10
-    filtertree.h
11
-    filterleaf.cpp
12
-    filterleaf.h
13
-    domain.cpp
14
-    domain.h
15
-
16
-    formats/adblockrule.cpp
17
-    formats/adblockrule.h
18
-    formats/hostlistrule.cpp
19
-    formats/hostlistrule.h
20
-)
21
-
22
-target_link_libraries(urlfilter Qt5::WebEngineWidgets)

+ 0
- 18
lib/web/CMakeLists.txt View File

@@ -1,18 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-
7
-add_library(web
8
-    profilemanager.cpp
9
-    profilemanager.h
10
-    webprofile.cpp
11
-    webprofile.h
12
-)
13
-
14
-target_include_directories(web
15
-    PRIVATE ${PROJECT_SOURCE_DIR}/include
16
-)
17
-
18
-target_link_libraries(web Qt5::WebEngineWidgets)

+ 1
- 1
linux/makepkg/PKGBUILD View File

@@ -17,7 +17,7 @@ optdepends=('firejail: launch a sandboxed instance')
17 17
 makedepends=('git' 'meson' 'pkg-config' 'asciidoctor')
18 18
 
19 19
 # this is the central repository
20
-source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git#branch=testing-meson"
20
+source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git"
21 21
         "git+https://github.com/itay-grudev/SingleApplication.git"
22 22
         "git+https://github.com/ulfalizer/Kconfiglib.git")
23 23
 

+ 1
- 1
meson.build View File

@@ -41,7 +41,7 @@ dep_genheaders = declare_dependency(
41 41
         output: 'version.h'
42 42
     ),
43 43
     custom_target('configheader',
44
-        input: ['tools/config.py', 'src/Kconfig', 'linux/.config'],
44
+        input: ['tools/config.py', 'src/Kconfig', host_machine.system() + '/.config'],
45 45
         output: 'config.h',
46 46
         command: [python3, '@INPUT0@', '--kconfig=@INPUT1@', '--dotconfig=@INPUT2@', '--generate=@OUTPUT@'],
47 47
         build_by_default: true

+ 0
- 30
plugins/ConfigurationEditor/CMakeLists.txt View File

@@ -1,30 +0,0 @@
1
-find_package(Qt5Core REQUIRED)
2
-find_package(Qt5Widgets REQUIRED)
3
-
4
-set(CMAKE_AUTOMOC ON)
5
-set(CMAKE_AUTOUIC ON)
6
-
7
-add_library(ConfigurationEditorPlugin SHARED
8
-    ${CMAKE_SOURCE_DIR}/include/plugininterface.h
9
-    ${CMAKE_SOURCE_DIR}/include/browserinterface.h
10
-
11
-    configurationeditorplugin.cpp
12
-    configurationeditorplugin.h
13
-    forms/configurationdialog.cpp
14
-    forms/configurationdialog.h
15
-    forms/configurationdialog.ui
16
-)
17
-
18
-target_include_directories(ConfigurationEditorPlugin
19
-    PRIVATE ${CMAKE_SOURCE_DIR}/include
20
-)
21
-
22
-target_link_libraries(ConfigurationEditorPlugin
23
-    PRIVATE Qt5::Widgets
24
-)
25
-
26
-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
27
-    install(TARGETS ConfigurationEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release)
28
-else()
29
-    install(TARGETS ConfigurationEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release)
30
-endif()

+ 0
- 47
plugins/ProfileEditor/CMakeLists.txt View File

@@ -1,47 +0,0 @@
1
-find_package(Qt5Core REQUIRED)
2
-find_package(Qt5Widgets REQUIRED)
3
-find_package(Qt5WebEngineWidgets REQUIRED)
4
-
5
-# Find includes in corresponding build directories
6
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
7
-
8
-set(CMAKE_AUTOMOC ON)
9
-set(CMAKE_AUTOUIC ON)
10
-
11
-add_library(ProfileEditorPlugin SHARED
12
-    ${CMAKE_SOURCE_DIR}/include/profileinterface.h
13
-    ${CMAKE_SOURCE_DIR}/include/browserinterface.h
14
-    ${CMAKE_SOURCE_DIR}/include/plugininterface.h
15
-
16
-    profileeditorplugin.cpp
17
-    profileeditorplugin.h
18
-
19
-    forms/profilemanagerdialog.cpp
20
-    forms/profilemanagerdialog.h
21
-    forms/profilemanagerdialog.ui
22
-    forms/profileview.cpp
23
-    forms/profileview.h
24
-    forms/profileview.ui
25
-
26
-    forms/newprofiledialog.cpp
27
-    forms/newprofiledialog.h
28
-    forms/newprofiledialog.ui
29
-    forms/newhttpheaderdialog.cpp
30
-    forms/newhttpheaderdialog.h
31
-    forms/newhttpheaderdialog.ui
32
-)
33
-
34
-target_include_directories(ProfileEditorPlugin
35
-    PRIVATE ${CMAKE_SOURCE_DIR}/include
36
-)
37
-
38
-target_link_libraries(ProfileEditorPlugin
39
-    PRIVATE Qt5::Widgets
40
-    PRIVATE Qt5::WebEngineWidgets
41
-)
42
-
43
-if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
44
-    install(TARGETS ProfileEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release)
45
-else()
46
-    install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_PLUGINDIR} CONFIGURATIONS Release)
47
-endif()

+ 0
- 117
src/CMakeLists.txt View File

@@ -1,117 +0,0 @@
1
-# Find includes in corresponding build directories
2
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
3
-
4
-# Instruct CMake to run moc automatically when needed.
5
-set(CMAKE_AUTOMOC ON)
6
-set(CMAKE_AUTOUIC ON)
7
-set(CMAKE_AUTORCC ON)
8
-
9
-set(srclist
10
-        # main
11
-        main.cpp
12
-        browser.cpp
13
-        browser.h
14
-        session.cpp
15
-        session.h
16
-        util.cpp
17
-        util.h
18
-
19
-        # resources (icons, etc)
20
-        ${PROJECT_SOURCE_DIR}/data/resources.qrc
21
-
22
-        # main window
23
-        mainwindow/mainwindow.cpp
24
-        mainwindow/mainwindow.h
25
-        mainwindow/mainwindow.ui
26
-        mainwindow/widgets/dockwidget.cpp
27
-        mainwindow/widgets/dockwidget.h
28
-        mainwindow/widgets/navigationbar.cpp
29
-        mainwindow/widgets/navigationbar.h
30
-        mainwindow/widgets/searchform.cpp
31
-        mainwindow/widgets/searchform.h
32
-        mainwindow/widgets/searchform.ui
33
-
34
-        # subwindow
35
-        subwindow/subwindow.cpp
36
-        subwindow/subwindow.h
37
-        subwindow/tabwidget.cpp
38
-        subwindow/tabwidget.h
39
-
40
-        # webengine
41
-        webengine/filter.cpp
42
-        webengine/filter.h
43
-        webengine/urlinterceptor.cpp
44
-        webengine/urlinterceptor.h
45
-        webengine/webpage.cpp
46
-        webengine/webpage.h
47
-        webengine/webview.cpp
48
-        webengine/webview.h
49
-
50
-    # wallet (form autofill)
51
-    wallet/wallet.cpp
52
-    wallet/wallet.h
53
-
54
-    # interfaces
55
-    ${PROJECT_SOURCE_DIR}/include/plugininterface.h
56
-    ${PROJECT_SOURCE_DIR}/include/profileinterface.h
57
-    ${PROJECT_SOURCE_DIR}/include/browserinterface.h
58
-)
59
-
60
-if(DEFINED QTBUG-62511)
61
-    set_property(SOURCE ${PROJECT_SOURCE_DIR}/data/resources.qrc PROPERTY AUTORCC_OPTIONS "--format-version=1")
62
-endif()
63
-
64
-# if you are using a custom build location for breakpad:
65
-#if(CONFIG_USEBREAKPAD)
66
-#    link_directories("${BREAKPAD_LIBRARY_DIRS}")
67
-#endif(CONFIG_USEBREAKPAD)
68
-
69
-if(WIN32)
70
-    add_executable(${CONFIG_POI_EXE} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc)
71
-else()
72
-    add_executable(${CONFIG_POI_EXE} ${srclist})
73
-endif()
74
-
75
-add_dependencies(${CONFIG_POI_EXE} config_header)
76
-
77
-target_include_directories(${CONFIG_POI_EXE}
78
-    PRIVATE ${Boost_INCLUDE_DIRS}
79
-    PRIVATE ${PROJECT_SOURCE_DIR}/include
80
-    PRIVATE ${PROJECT_BINARY_DIR}/include
81
-    PRIVATE ${PROJECT_SOURCE_DIR}/lib
82
-    PRIVATE ${PROJECT_SOURCE_DIR}/plugins
83
-)
84
-
85
-target_link_libraries(${CONFIG_POI_EXE}
86
-        Qt5::Core Qt5::Widgets Qt5::WebEngineWidgets
87
-        ${Boost_LIBRARIES}
88
-        SingleApplication
89
-        about
90
-        addressbar
91
-        configuration
92
-        bookmarks downloads web urlfilter
93
-)
94
-
95
-if(CONFIG_USEBREAKPAD)
96
-    target_link_libraries(${CONFIG_POI_EXE} Threads::Threads ${BREAKPAD_LIBRARIES})
97
-    target_include_directories(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_INCLUDE_DIRS})
98
-    target_compile_options(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_CFLAGS_OTHER})
99
-
100
-    target_compile_definitions(${CONFIG_POI_EXE} PRIVATE BreakpadEnabled)
101
-endif(CONFIG_USEBREAKPAD)
102
-
103
-if(CONFIG_USEPLASMA)
104
-    target_link_libraries(${CONFIG_POI_EXE} KF5::Wallet KF5::WindowSystem)
105
-    target_compile_definitions(${CONFIG_POI_EXE} PRIVATE PLASMA)
106
-endif(CONFIG_USEPLASMA)
107
-
108
-target_compile_definitions(${CONFIG_POI_EXE}
109
-    PRIVATE QAPPLICATION_CLASS=QApplication
110
-)
111
-
112
-install(TARGETS ${CONFIG_POI_EXE} RUNTIME DESTINATION ${CONFIG_INSTALL_BINDIR} CONFIGURATIONS Release)
113
-if(UNIX)
114
-install(FILES ${PROJECT_SOURCE_DIR}/data/poi.svg DESTINATION ${CONFIG_INSTALL_ICONDIR}/hicolor/scalable/apps CONFIGURATIONS Release)
115
-install(FILES ${PROJECT_SOURCE_DIR}/linux/poi.desktop DESTINATION ${CONFIG_INSTALL_APPDIR} CONFIGURATIONS Release)
116
-install(FILES ${PROJECT_SOURCE_DIR}/data/poi.profile DESTINATION ${CONFIG_INSTALL_LIBDIR} CONFIGURATIONS Release)
117
-endif(UNIX)

+ 0
- 31
test/CMakeLists.txt View File

@@ -1,31 +0,0 @@
1
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
2
-set(CMAKE_AUTOMOC ON)
3
-set(CMAKE_AUTORCC ON)
4
-
5
-# AdblockTest
6
-add_executable(AdBlockTest
7
-    adblock/adblocktest.cpp
8
-    adblock/adblocktest.h
9
-)
10
-
11
-target_include_directories(AdBlockTest PRIVATE ../lib/urlfilter)
12
-target_link_libraries(AdBlockTest Qt5::Test urlfilter)
13
-add_test(NAME urlfilter-adblock COMMAND AdBlockTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
14
-
15
-# HostlistTest
16
-add_executable(HostlistTest
17
-    hostlist/hostlisttest.cpp
18
-    hostlist/hostlisttest.h
19
-)
20
-target_include_directories(HostlistTest PRIVATE ../lib/urlfilter/)
21
-target_link_libraries(HostlistTest Qt5::Test urlfilter)
22
-add_test(NAME urlfilter-hostlist COMMAND HostlistTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
23
-
24
-# matching algorithm benchmark
25
-add_executable(MatcherBenchmark
26
-    matcherbenchmark/matcherbenchmark.cpp
27
-    matcherbenchmark/matcherbenchmark.h
28
-)
29
-target_link_libraries(MatcherBenchmark Qt5::Test)
30
-# Adding this benchmark to tests is unnecessary as it doesn't test anything.
31
-#add_test(NAME matcher-benchmark COMMAND MatcherBenchmark WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

+ 6
- 1
tools/config.py View File

@@ -53,7 +53,12 @@ def main(args):
53 53
 def writeItem(node, gen):
54 54
     while node:
55 55
         if isinstance(node.item, kconfiglib.Symbol):
56
-            gen.write("#define CONFIG_{0} \"{1}\"\n".format(node.item.name, node.item.str_value))
56
+            if node.item.str_value == 'y':
57
+                gen.write("#define CONFIG_{0}\n".format(node.item.name))
58
+            elif node.item.str_value == 'n':
59
+                gen.write("#undef CONFIG_{0}\n".format(node.item.name))
60
+            else:
61
+                gen.write("#define CONFIG_{0} \"{1}\"\n".format(node.item.name, node.item.str_value))
57 62
 
58 63
         if node.list:
59 64
             writeItem(node.list, gen)

Loading…
Cancel
Save