diff options
Diffstat (limited to 'vendor.cmake')
-rw-r--r-- | vendor.cmake | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/vendor.cmake b/vendor.cmake index 45a9f7e..27d9893 100644 --- a/vendor.cmake +++ b/vendor.cmake @@ -9,6 +9,28 @@ set(poi_exe poi) # Application name set(poi_name "smolbote") +## Configuration paths, used in lib/configuration/defaults.h.in +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(ConfigPath "smolbote.ini") + + set(FilterPath "hosts") + set(PluginsPath "plugins") + set(ProfilesPath "profiles") + + set(BookmarksPath "bookmarks.xbel") + set(DownloadsPath "~/Downloads") +else() + set(ConfigPath "~/.config/smolbote/smolbote.cfg") + + set(FilterPath "~/.config/smolbote/hosts.d") + set(PluginsPath "~/.config/smolbote/plugins.d") + set(ProfilesPath "~/.config/smolbote/profiles.d") + + set(BookmarksPath "~/.config/smolbote/bookmarks.xbel") + set(DownloadsPath "~/Downloads") +endif() + + ## Install Paths # Binaries will be installed to ${CMAKE_INSTALL_PREFIX}/${installPath_bin} set(installPath_bin bin) @@ -20,7 +42,7 @@ else() set(installPath_plugin lib/smolbote) endif() -# version information +## Version information, used in src/version.h.in if (EXISTS "${PROJECT_SOURCE_DIR}/.git") execute_process(COMMAND git rev-list --count HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerRevision OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerShortId OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -29,10 +51,11 @@ if (EXISTS "${PROJECT_SOURCE_DIR}/.git") execute_process(COMMAND git rev-parse HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerCommit OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND git rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerBranch OUTPUT_STRIP_TRAILING_WHITESPACE) else() - set(VerTag "0.2.2") - set(VerDescribe "0.2.2-unknown") - set(VerCommit "00000000") - set(VerBranch "unknown") + message(FATAL_ERROR "Cannot find repository metadata. Please set version information in vendor.cmake") + #set(VerTag "0.2.2") + #set(VerDescribe "0.2.2-unknown") + #set(VerCommit "00000000") + #set(VerBranch "unknown") endif() if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") |