Browse Source

Rewrite vendor.cmake to cmake/VendorConfig.cmake

Add menuconfig-editable .config files to platforms.
VendorConfig.cmake looks for and includes .config files based on
platform name.
Aqua-sama 2 months ago
parent
commit
c31a89a3b5
Signed by: Aqua-sama <aqua@iserlohn-fortress.net> GPG Key ID: 5378B8349C1D5ADA

+ 1
- 2
.gitignore View File

@@ -12,6 +12,5 @@ build*
12 12
 lang/*.qm
13 13
 test/plugins.d
14 14
 
15
-3rd-party/*/.git
16
-3rd-party/*/examples
15
+.config.old
17 16
 

+ 12
- 33
CMakeLists.txt View File

@@ -1,47 +1,29 @@
1 1
 cmake_minimum_required(VERSION 3.10.0)
2 2
 project(smolbote)
3 3
 
4
+# add cmake/ to module path
5
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
4 6
 include(FeatureSummary)
5
-
6
-# Options
7
-option(Feature_ClangLibCpp  "Use libc++ over stdlibc++"         OFF)
8
-option(Feature_Plasma       "Enable Plasma integration"         OFF)
9
-option(Feature_Breakpad     "Enable Breakpad crash reports"     OFF)
10
-
11
-option(Devel_QtDeprecated   "Enable Qt deprecation warnings"    ON)
12
-option(Devel_Tests          "Enable automatic testing"          OFF)
13
-
14
-set(Vendor "${CMAKE_SOURCE_DIR}/vendor.cmake" CACHE FILEPATH "vendor configuration path")
15
-include(${Vendor})
7
+include(VendorConfig)
16 8
 
17 9
 # Libraries
18 10
 find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED)
19 11
 find_package(Boost 1.66 COMPONENTS program_options REQUIRED)
20 12
 
21
-if(Feature_Plasma)
13
+if(CONFIG_USEPLASMA)
22 14
     find_package(ECM 1.6.0 REQUIRED NO_MODULE)
23 15
     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
24 16
     find_package(KF5 "5.6.0" COMPONENTS Wallet WindowSystem REQUIRED)
25
-endif(Feature_Plasma)
17
+endif(CONFIG_USEPLASMA)
26 18
 
27
-if(Feature_Breakpad)
19
+if(CONFIG_USEBREAKPAD)
28 20
     find_package(Threads REQUIRED)
29 21
     add_subdirectory(3rd-party/breakpad)
30
-endif(Feature_Breakpad)
22
+endif(CONFIG_USEBREAKPAD)
31 23
 
32 24
 # Global C++ settings
33 25
 set(CMAKE_CXX_STANDARD 17)
34 26
 
35
-if(Devel_QtDeprecated)
36
-    add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900)
37
-endif(Devel_QtDeprecated)
38
-
39
-# link to libc++
40
-if (Feature_ClangLibCpp)
41
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
42
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
43
-endif (Feature_ClangLibCpp)
44
-
45 27
 # configure a header file to pass version information
46 28
 configure_file("${PROJECT_SOURCE_DIR}/src/version.h.in" "${PROJECT_BINARY_DIR}/src/version.h")
47 29
 
@@ -58,26 +40,23 @@ add_subdirectory(lib/urlfilter)
58 40
 add_subdirectory(plugins/ProfileEditor)
59 41
 add_subdirectory(plugins/ConfigurationEditor)
60 42
 
61
-# browser source code
62 43
 add_subdirectory(src)
63 44
 
64
-if(Devel_Tests)
45
+if(CONFIG_TESTS)
65 46
     enable_testing()
66 47
     find_package(Qt5 COMPONENTS Test REQUIRED)
67 48
     add_subdirectory(test)
68
-endif(Devel_Tests)
49
+endif(CONFIG_TESTS)
69 50
 
70 51
 # Summarize
71 52
 message(STATUS "=== Configuration summary ===")
72
-
73
-message(STATUS "Building ${poi_exe} ${poi_Build}")
74
-message(STATUS "vendor.cmake:   ${Vendor}")
75
-
53
+message(STATUS "Building ${CONFIG_POI_NAME} (${CONFIG_POI_EXE}) ${poi_Build}")
76 54
 message(STATUS "Platform:       ${CMAKE_SYSTEM_NAME}")
77 55
 message(STATUS "Generator:      ${CMAKE_GENERATOR}")
78 56
 message(STATUS "Build type:     ${CMAKE_BUILD_TYPE}")
79 57
 message(STATUS "CXX compiler:   ${CMAKE_CXX_COMPILER_ID}")
80 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}")
81 61
 
82 62
 feature_summary(WHAT ALL)
83
-

+ 90
- 0
baseconfig View File

@@ -0,0 +1,90 @@
1
+mainmenu "smolbote configuration"
2
+
3
+comment "Build"
4
+menu "Compiler settings"
5
+    config CXX_FLAGS
6
+        string "Compiler flags"
7
+        help
8
+            Compiler flags that should be applied to both Debug and Release builds.
9
+        default "-fPIE  -pipe -fstack-protector-strong -fno-plt"
10
+
11
+    config CXX_FLAGS_DEBUG
12
+        string "Debug flags"
13
+        help
14
+            Compiler flags that should be applied to Debug builds.
15
+        default ""
16
+
17
+    config CXX_FLAGS_RELEASE
18
+        string "Release flags"
19
+        help
20
+            Compiler flags that should be applied to Release builds.
21
+        default "-march=native -mtune=native -O3"
22
+endmenu
23
+
24
+menu "Install paths"
25
+    config INSTALL_PREFIX
26
+        string "Install prefix"
27
+        default "/usr/local"
28
+    config INSTALL_BIN
29
+        string "bin/ prefix"
30
+        default "bin"
31
+    config INSTALL_LIB
32
+        string "lib/ prefix"
33
+        default "lib/smolbote"
34
+endmenu
35
+
36
+comment "Branding"
37
+config POI_NAME
38
+    string "Application name"
39
+    default "smolbote"
40
+config POI_EXE
41
+    string "Executable name"
42
+    default "poi"
43
+
44
+comment "Browser configuration"
45
+menu "Configuration defaults"
46
+    config PATH_CONFIG
47
+        string "Configuration location"
48
+        default "~/.config/smolbote/smolbote.cfg"
49
+    config PATH_CRASHDUMP
50
+        string "Crash dump location"
51
+        default "~/.config/smolbote/crash.d"
52
+    config PATH_FILTER
53
+        string "Host filter path"
54
+        default "~/.config/smolbote/host.d"
55
+    config PATH_PLUGINS
56
+        string "Plugin load location"
57
+        default "~/.config/smolbote/plugins.d"
58
+    config PATH_PROFILES
59
+        string "Profile load location"
60
+        default "~/.config/smolbote/profiles.d"
61
+    config PATH_BOOKMARKS
62
+        string "Bookmarks location"
63
+        default "~/.config/smolbote/bookmarks.xbel"
64
+    config PATH_DOWNLOADS
65
+        string "Downloads location"
66
+        default "~/Downloads"
67
+endmenu
68
+
69
+config USEPLASMA
70
+    bool "Enable KDE Frameworks integration"
71
+    default n
72
+    help
73
+        This is a help message
74
+
75
+config USEBREAKPAD
76
+    bool "Enable Breakpad integration"
77
+    default n
78
+
79
+comment "Devel"
80
+config QTWARNINGS
81
+    bool "Enable Qt deprecated API warnings"
82
+    default y
83
+
84
+config TESTS
85
+    bool "Build tests"
86
+    default n
87
+
88
+config LLVMLIBCPP
89
+    bool "Link against the LLVM C++ standard library"
90
+    default n

+ 49
- 0
cmake/VendorConfig.cmake View File

@@ -0,0 +1,49 @@
1
+string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME)
2
+
3
+if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config")
4
+    message(FATAL_ERROR "No vendor config for ${SYSTEM_NAME}: ${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config is missing")
5
+endif()
6
+
7
+# the .config has been found
8
+
9
+# read .config entries that start with CONFIG_ to a list of strings
10
+file(STRINGS ${PROJECT_SOURCE_DIR}/${SYSTEM_NAME}/.config vendor_config REGEX "^CONFIG_")
11
+
12
+# for every item in the list, turn it into a list and set it
13
+foreach(item IN LISTS vendor_config)
14
+    #message("${item}")
15
+    string(REPLACE "\"" "" item ${item})
16
+    string(REGEX REPLACE "(^CONFIG_[^=]*)=(.*$)" "\\1;\\2" item_list ${item})
17
+    #message("${item_list}")
18
+    set(${item_list})
19
+endforeach()
20
+
21
+# Compiler settings
22
+# Compiler flags
23
+set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} ${CONFIG_CXX_FLAGS} ${CONFIG_CXX_FLAGS_DEBUG}")
24
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CONFIG_CXX_FLAGS} ${CONFIG_CXX_FLAGS_RELEASE}")
25
+
26
+# Install paths
27
+set(CMAKE_INSTALL_PREFIX ${CONFIG_INSTALL_PREFIX})
28
+
29
+## Version information, used in src/version.h.in
30
+if (EXISTS "${PROJECT_SOURCE_DIR}/.git")
31
+    execute_process(COMMAND git rev-list --count HEAD       WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerRevision OUTPUT_STRIP_TRAILING_WHITESPACE)
32
+    execute_process(COMMAND git rev-parse --short HEAD      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerShortId  OUTPUT_STRIP_TRAILING_WHITESPACE)
33
+    execute_process(COMMAND git rev-parse HEAD              WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerCommit   OUTPUT_STRIP_TRAILING_WHITESPACE)
34
+    execute_process(COMMAND git rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerBranch   OUTPUT_STRIP_TRAILING_WHITESPACE)
35
+endif()
36
+
37
+set(poi_Version     "r${VerRevision}"               CACHE STRING "Short version string")
38
+set(poi_Describe    "r${VerRevision}-${VerShortId}" CACHE STRING "Long version string")
39
+set(poi_Build       "${VerBranch}-${VerCommit}"     CACHE STRING "Build string")
40
+
41
+# linking to libc++ doesn't work
42
+if (CONFIG_LLVMLIBCPP)
43
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
44
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
45
+endif (CONFIG_LLVMLIBCPP)
46
+
47
+if(CONFIG_QTWARNINGS)
48
+    add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900)
49
+endif(CONFIG_QTWARNINGS)

+ 2
- 7
doc/Building.asciidoc View File

@@ -71,13 +71,8 @@ Sets the install location prefix. Install targets are only set on Release builds
71 71
 - windows: Binary is written to bin/, and plugins to bin/plugins.
72 72
 - others: Binary will be written to bin/, and plugins to lib/smolbote/.
73 73
 
74
-=== Using libc++
75
-You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.
76
-
77
-  -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On
78
-
79
-// Additional items
80
-
74
+// Using Breakpad
81 75
 include::Building/Breakpad.asciidoc[]
82 76
 
77
+// Compiling on Windows
83 78
 include::Building/Windows.asciidoc[]

+ 7
- 7
lib/configuration/defaults.h.in View File

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

+ 52
- 0
linux/.config View File

@@ -0,0 +1,52 @@
1
+#
2
+# Automatically generated file; DO NOT EDIT.
3
+# smolbote configuration
4
+#
5
+
6
+#
7
+# Build
8
+#
9
+
10
+#
11
+# Compiler settings
12
+#
13
+CONFIG_CXX_FLAGS="-fPIE  -pipe -fstack-protector-strong -fno-plt"
14
+CONFIG_CXX_FLAGS_DEBUG=""
15
+CONFIG_CXX_FLAGS_RELEASE="-march=native -mtune=native -O3"
16
+
17
+#
18
+# Install paths
19
+#
20
+CONFIG_INSTALL_PREFIX="/usr/local"
21
+CONFIG_INSTALL_BIN="bin"
22
+CONFIG_INSTALL_LIB="lib/smolbote"
23
+
24
+#
25
+# Branding
26
+#
27
+CONFIG_POI_NAME="smolbote"
28
+CONFIG_POI_EXE="poi"
29
+
30
+#
31
+# Browser configuration
32
+#
33
+
34
+#
35
+# Configuration defaults
36
+#
37
+CONFIG_PATH_CONFIG="~/.config/smolbote/smolbote.cfg"
38
+CONFIG_PATH_CRASHDUMP="~/.config/smolbote/crash.d"
39
+CONFIG_PATH_FILTER="~/.config/smolbote/host.d"
40
+CONFIG_PATH_PLUGINS="~/.config/smolbote/plugins.d"
41
+CONFIG_PATH_PROFILES="~/.config/smolbote/profiles.d"
42
+CONFIG_PATH_BOOKMARKS="~/.config/smolbote/bookmarks.xbel"
43
+CONFIG_PATH_DOWNLOADS="~/Downloads"
44
+CONFIG_USEPLASMA=y
45
+# CONFIG_USEBREAKPAD is not set
46
+
47
+#
48
+# Devel
49
+#
50
+CONFIG_QTWARNINGS=y
51
+# CONFIG_TESTS is not set
52
+# CONFIG_LLVMLIBCPP is not set

+ 2
- 2
plugins/ConfigurationEditor/CMakeLists.txt View File

@@ -24,7 +24,7 @@ target_link_libraries(ConfigurationEditorPlugin
24 24
 )
25 25
 
26 26
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
27
-    install(TARGETS ConfigurationEditorPlugin RUNTIME DESTINATION ${installPath_plugin} CONFIGURATIONS Release)
27
+    install(TARGETS ConfigurationEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_LIB} CONFIGURATIONS Release)
28 28
 else()
29
-    install(TARGETS ConfigurationEditorPlugin LIBRARY DESTINATION ${installPath_plugin} CONFIGURATIONS Release)
29
+    install(TARGETS ConfigurationEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_LIB} CONFIGURATIONS Release)
30 30
 endif()

+ 2
- 2
plugins/ProfileEditor/CMakeLists.txt View File

@@ -41,7 +41,7 @@ target_link_libraries(ProfileEditorPlugin
41 41
 )
42 42
 
43 43
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
44
-    install(TARGETS ProfileEditorPlugin RUNTIME DESTINATION ${installPath_plugin} CONFIGURATIONS Release)
44
+    install(TARGETS ProfileEditorPlugin RUNTIME DESTINATION ${CONFIG_INSTALL_LIB} CONFIGURATIONS Release)
45 45
 else()
46
-    install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION ${installPath_plugin} CONFIGURATIONS Release)
46
+    install(TARGETS ProfileEditorPlugin LIBRARY DESTINATION ${CONFIG_INSTALL_LIB} CONFIGURATIONS Release)
47 47
 endif()

+ 19
- 19
src/CMakeLists.txt View File

@@ -58,24 +58,24 @@ set(srclist
58 58
 )
59 59
 
60 60
 # if you are using a custom build location for breakpad:
61
-#if(Feature_Breakpad)
61
+#if(CONFIG_USEBREAKPAD)
62 62
 #    link_directories("${BREAKPAD_LIBRARY_DIRS}")
63
-#endif(Feature_Breakpad)
63
+#endif(CONFIG_USEBREAKPAD)
64 64
 
65 65
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
66
-    add_executable(${poi_exe} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc)
66
+    add_executable(${CONFIG_POI_EXE} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc)
67 67
 else()
68
-    add_executable(${poi_exe} ${srclist})
68
+    add_executable(${CONFIG_POI_EXE} ${srclist})
69 69
 endif()
70 70
 
71
-target_include_directories(${poi_exe}
71
+target_include_directories(${CONFIG_POI_EXE}
72 72
     PRIVATE ${Boost_INCLUDE_DIRS}
73 73
     PRIVATE ${PROJECT_SOURCE_DIR}/include
74 74
     PRIVATE ${PROJECT_SOURCE_DIR}/lib
75 75
     PRIVATE ${PROJECT_SOURCE_DIR}/plugins
76 76
 )
77 77
 
78
-target_link_libraries(${poi_exe}
78
+target_link_libraries(${CONFIG_POI_EXE}
79 79
         Qt5::Core Qt5::Widgets Qt5::WebEngineWidgets
80 80
         ${Boost_LIBRARIES}
81 81
         SingleApplication
@@ -85,24 +85,24 @@ target_link_libraries(${poi_exe}
85 85
         bookmarks downloads web urlfilter
86 86
 )
87 87
 
88
-if(Feature_Breakpad)
89
-    target_link_libraries(${poi_exe} Threads::Threads ${BREAKPAD_LIBRARIES})
90
-    target_include_directories(${poi_exe} PRIVATE ${BREAKPAD_INCLUDE_DIRS})
91
-    target_compile_options(${poi_exe} PRIVATE ${BREAKPAD_CFLAGS_OTHER})
88
+if(CONFIG_USEBREAKPAD)
89
+    target_link_libraries(${CONFIG_POI_EXE} Threads::Threads ${BREAKPAD_LIBRARIES})
90
+    target_include_directories(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_INCLUDE_DIRS})
91
+    target_compile_options(${CONFIG_POI_EXE} PRIVATE ${BREAKPAD_CFLAGS_OTHER})
92 92
 
93
-    target_compile_definitions(${poi_exe} PRIVATE BreakpadEnabled)
94
-endif(Feature_Breakpad)
93
+    target_compile_definitions(${CONFIG_POI_EXE} PRIVATE BreakpadEnabled)
94
+endif(CONFIG_USEBREAKPAD)
95 95
 
96
-if(Feature_Plasma)
97
-    target_link_libraries(${poi_exe} KF5::Wallet KF5::WindowSystem)
98
-    target_compile_definitions(${poi_exe} PRIVATE PLASMA)
99
-endif(Feature_Plasma)
96
+if(CONFIG_USEPLASMA)
97
+    target_link_libraries(${CONFIG_POI_EXE} KF5::Wallet KF5::WindowSystem)
98
+    target_compile_definitions(${CONFIG_POI_EXE} PRIVATE PLASMA)
99
+endif(CONFIG_USEPLASMA)
100 100
 
101
-target_compile_definitions(${poi_exe}
101
+target_compile_definitions(${CONFIG_POI_EXE}
102 102
     PRIVATE QAPPLICATION_CLASS=QApplication
103
-    PRIVATE POI_NAME=\"${poi_name}\"
103
+    PRIVATE POI_NAME="${CONFIG_POI_NAME}"
104 104
     PRIVATE QTBUG_65223_WORKAROUND
105 105
     #PRIVATE QTBUG_68224_WORKAROUND
106 106
 )
107 107
 
108
-install(TARGETS ${poi_exe} RUNTIME DESTINATION ${installPath_bin} CONFIGURATIONS Release)
108
+install(TARGETS ${CONFIG_POI_EXE} RUNTIME DESTINATION ${CONFIG_INSTALL_BIN} CONFIGURATIONS Release)

+ 0
- 61
vendor.cmake View File

@@ -1,61 +0,0 @@
1
-## Build configuration
2
-# Feel free to copy this file and change settings as you need. To use your own
3
-# variant, use -DVendor=<path to your vendor.cmake> when generating the build
4
-# script.
5
-
6
-## Application
7
-set(poi_exe     "poi"       CACHE STRING "Executable name")
8
-set(poi_name    "smolbote"  CACHE STRING "Application name")
9
-
10
-## Configuration paths, used in lib/configuration/defaults.h.in
11
-if(UNIX)
12
-    set(PathPrefix  "~/.config/smolbote")
13
-else()
14
-    set(PathPrefix  ".")
15
-endif()
16
-
17
-set(Path_Config     "${PathPrefix}/smolbote.cfg"    CACHE STRING "Configuration location")
18
-set(Path_Crashdump  "${PathPrefix}/crash.d"         CACHE STRING "Crash dump location")
19
-
20
-set(Path_Filter     "${PathPrefix}/hosts.d"         CACHE STRING "Host path location")
21
-set(Path_Plugins    "${PathPrefix}/plugins.d"       CACHE STRING "Plugin load location")
22
-set(Path_Profiles   "${PathPrefix}/profiles.d"      CACHE STRING "Profile load location")
23
-
24
-set(Path_Bookmarks  "${PathPrefix}/bookmarks.xbel"  CACHE STRING "Bookmark location")
25
-set(Path_Downloads  "~/Downloads"                   CACHE STRING "Download location")
26
-
27
-## Install Paths
28
-# Binaries will be installed to ${CMAKE_INSTALL_PREFIX}/${installPath_bin}
29
-set(installPath_bin bin)
30
-
31
-# Plugins will be installed to ${CMAKE_INSTALL_PREFIX}/${installPath_plugin}
32
-if(WIN32)
33
-    set(installPath_plugin bin/plugins)
34
-else()
35
-    set(installPath_plugin lib/smolbote)
36
-endif()
37
-
38
-## Version information, used in src/version.h.in
39
-if (EXISTS "${PROJECT_SOURCE_DIR}/.git")
40
-    execute_process(COMMAND git rev-list --count HEAD       WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerRevision OUTPUT_STRIP_TRAILING_WHITESPACE)
41
-    execute_process(COMMAND git rev-parse --short HEAD      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerShortId  OUTPUT_STRIP_TRAILING_WHITESPACE)
42
-    execute_process(COMMAND git rev-parse HEAD              WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerCommit   OUTPUT_STRIP_TRAILING_WHITESPACE)
43
-    execute_process(COMMAND git rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerBranch   OUTPUT_STRIP_TRAILING_WHITESPACE)
44
-endif()
45
-
46
-set(poi_Version     "r${VerRevision}"               CACHE STRING "Short version string")
47
-set(poi_Describe    "r${VerRevision}-${VerShortId}" CACHE STRING "Long version string")
48
-set(poi_Build       "${VerBranch}-${VerCommit}"     CACHE STRING "Build string")
49
-
50
-
51
-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
52
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2")
53
-
54
-elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
55
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2 -march=native")
56
-
57
-elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
58
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
59
-
60
-endif()
61
-

+ 52
- 0
windows/.config View File

@@ -0,0 +1,52 @@
1
+#
2
+# Automatically generated file; DO NOT EDIT.
3
+# smolbote configuration
4
+#
5
+
6
+#
7
+# Build
8
+#
9
+
10
+#
11
+# Compiler settings
12
+#
13
+CONFIG_CXX_FLAGS=""
14
+CONFIG_CXX_FLAGS_DEBUG=""
15
+CONFIG_CXX_FLAGS_RELEASE=""
16
+
17
+#
18
+# Install paths
19
+#
20
+CONFIG_INSTALL_PREFIX=""
21
+CONFIG_INSTALL_BIN=""
22
+CONFIG_INSTALL_LIB="plugins"
23
+
24
+#
25
+# Branding
26
+#
27
+CONFIG_POI_NAME="smolbote"
28
+CONFIG_POI_EXE="poi"
29
+
30
+#
31
+# Browser configuration
32
+#
33
+
34
+#
35
+# Configuration defaults
36
+#
37
+CONFIG_PATH_CONFIG="smolbote.cfg"
38
+CONFIG_PATH_CRASHDUMP="crashes"
39
+CONFIG_PATH_FILTER="hosts"
40
+CONFIG_PATH_PLUGINS="plugins"
41
+CONFIG_PATH_PROFILES="profiles"
42
+CONFIG_PATH_BOOKMARKS="bookmarks.xbel"
43
+CONFIG_PATH_DOWNLOADS="~/Downloads"
44
+# CONFIG_USEPLASMA is not set
45
+# CONFIG_USEBREAKPAD is not set
46
+
47
+#
48
+# Devel
49
+#
50
+CONFIG_QTWARNINGS=y
51
+# CONFIG_TESTS is not set
52
+# CONFIG_LLVMLIBCPP is not set

Loading…
Cancel
Save