aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-14 11:33:32 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-14 11:33:42 +0200
commit77d7e6a764011a3b6dc13afbf7b26be39cb56dbd (patch)
treea9e0a8d28a3a81a44d94be920494e2e7f0427770 /src
parentunstable: KWallet integration (diff)
downloadsmolbote-77d7e6a764011a3b6dc13afbf7b26be39cb56dbd.tar.xz
Update CMakeLists option names
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt22
-rw-r--r--src/browser.cpp2
-rw-r--r--src/main.cpp10
-rw-r--r--src/version.h.in6
4 files changed, 19 insertions, 21 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b772792..9425b2d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,9 +58,9 @@ set(srclist
)
# if you are using a custom build location for breakpad:
-#if(Breakpad)
+#if(Feature_Breakpad)
# link_directories("${BREAKPAD_LIBRARY_DIRS}")
-#endif()
+#endif(Feature_Breakpad)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_executable(${poi_exe} WIN32 ${srclist} ${PROJECT_SOURCE_DIR}/data/windows.rc)
@@ -69,14 +69,14 @@ else()
endif()
target_include_directories(${poi_exe}
- PRIVATE ${Boost_INCLUDE_DIRS}
+ PRIVATE ${Boost_INCLUDE_DIRS}
PRIVATE ${PROJECT_SOURCE_DIR}/include
- PRIVATE ${PROJECT_SOURCE_DIR}/lib
- PRIVATE ${PROJECT_SOURCE_DIR}/plugins
+ PRIVATE ${PROJECT_SOURCE_DIR}/lib
+ PRIVATE ${PROJECT_SOURCE_DIR}/plugins
)
target_link_libraries(${poi_exe}
- Qt5::Core Qt5::Widgets Qt5::Concurrent Qt5::WebEngineWidgets
+ Qt5::Core Qt5::Widgets Qt5::WebEngineWidgets
${Boost_LIBRARIES}
SingleApplication
about
@@ -85,20 +85,18 @@ target_link_libraries(${poi_exe}
bookmarks downloads web urlfilter
)
-if(Breakpad)
- find_package(Threads REQUIRED)
-
+if(Feature_Breakpad)
target_link_libraries(${poi_exe} Threads::Threads ${BREAKPAD_LIBRARIES})
target_include_directories(${poi_exe} PRIVATE ${BREAKPAD_INCLUDE_DIRS})
target_compile_options(${poi_exe} PRIVATE ${BREAKPAD_CFLAGS_OTHER})
target_compile_definitions(${poi_exe} PRIVATE BreakpadEnabled)
-endif()
+endif(Feature_Breakpad)
-if(Plasma)
+if(Feature_Plasma)
target_link_libraries(${poi_exe} KF5::Wallet KF5::WindowSystem)
target_compile_definitions(${poi_exe} PRIVATE PLASMA)
-endif(Plasma)
+endif(Feature_Plasma)
target_compile_definitions(${poi_exe}
PRIVATE QAPPLICATION_CLASS=QApplication
diff --git a/src/browser.cpp b/src/browser.cpp
index 0ad1071..27dda2b 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -36,7 +36,7 @@ Browser::Browser(int &argc, char *argv[], bool allowSecondary)
{
setApplicationName(POI_NAME);
setWindowIcon(QIcon(":/icon.svg"));
- setApplicationVersion(SMOLBOTE_VERSION);
+ setApplicationVersion(poi_Version);
}
Browser::~Browser()
diff --git a/src/main.cpp b/src/main.cpp
index e0ba7eb..5eb32fe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -9,7 +9,7 @@
#include "browser.h"
#include "session.h"
#include "util.h"
-#include "version.h"
+#include <version.h>
#include <QFile>
#include <QLibraryInfo>
#include <QTranslator>
@@ -47,7 +47,7 @@ static bool dumpCallback(const google_breakpad::MinidumpDescriptor &descriptor,
pid_t pid = fork();
if(pid == 0) {
char buffer[256];
- snprintf(buffer, 256, "%s %s %s", ctx->handler, SMOLBOTE_BUILD, descriptor.path());
+ snprintf(buffer, 256, "%s %s %s", ctx->handler, poi_Build, descriptor.path());
execlp("/bin/sh", "/bin/sh", "-c", buffer, (char *)nullptr);
}
}
@@ -93,13 +93,13 @@ int main(int argc, char **argv)
// --version
if(config->exists("version")) {
- std::cout << "smolbote " << SMOLBOTE_VERSION << std::endl;
+ std::cout << "smolbote " << poi_Version << std::endl;
return 0;
}
// --build
if(config->exists("build")) {
- std::cout << SMOLBOTE_BUILD;
+ std::cout << poi_Build;
return 0;
}
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
}
if(config->exists("help")) {
- std::cout << "smolbote " << SMOLBOTE_VERSION << ": yet another no-frills browser" << std::endl;
+ std::cout << "smolbote " << poi_Version << ": yet another no-frills browser" << std::endl;
std::cout << "Usage: " << argv[0] << " [options] [command/URL(s)]" << std::endl
<< std::endl;
diff --git a/src/version.h.in b/src/version.h.in
index 59f85c8..c31c4a8 100644
--- a/src/version.h.in
+++ b/src/version.h.in
@@ -2,13 +2,13 @@
#define SMOLBOTE_VERSION_H
// Version: 1.2.3
-#define SMOLBOTE_VERSION "@VerTag@"
+#cmakedefine poi_Version "@poi_Version@"
// Describe: 1.2.3-r123-0123456789ab
-#define SMOLBOTE_DESCRIBE "@VerDescribe@"
+#cmakedefine poi_Describe "@poi_Describe@"
// Build
-#define SMOLBOTE_BUILD "@VerBranch@:@VerCommit@"
+#cmakedefine poi_Build "@poi_Build@"
#endif // SMOLBOTE_VERSION_H