diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-10-02 19:49:09 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:25:00 +0300 |
commit | a9966a11fc6d96e86fc75fc191e8eb1b63140fda (patch) | |
tree | a559eea759cda94708015e43041d8880ca9484a5 | |
parent | fa80cfa7276f6940fbb17d0cc7625043651c9982 (diff) |
[linux] Build fixes
-rw-r--r-- | common.pri | 3 | ||||
-rw-r--r-- | map/map_tests/map_tests.pro | 2 | ||||
-rw-r--r-- | platform/platform_linux.cpp | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/common.pri b/common.pri index 6a69573824..235b27fcd7 100644 --- a/common.pri +++ b/common.pri @@ -110,6 +110,9 @@ unix|win32-g++ { QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_CFLAGS_RELEASE *= -ffast-math QMAKE_CXXFLAGS_RELEASE *= -ffast-math + QMAKE_CFLAGS *= -fdata-sections -ffunction-sections + QMAKE_CXXFLAGS *= -fdata-sections -ffunction-sections + QMAKE_LFLAGS *= -Wl,--gc-sections } linux-g++* { diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro index 88708f91db..ab73d5eab6 100644 --- a/map/map_tests/map_tests.pro +++ b/map/map_tests/map_tests.pro @@ -6,7 +6,7 @@ CONFIG -= app_bundle TEMPLATE = app ROOT_DIR = ../.. -DEPENDENCIES = map yg indexer platform geometry coding base freetype fribidi expat +DEPENDENCIES = map indexer platform geometry coding base include($$ROOT_DIR/common.pri) diff --git a/platform/platform_linux.cpp b/platform/platform_linux.cpp index f3e1065b74..748fd50dcd 100644 --- a/platform/platform_linux.cpp +++ b/platform/platform_linux.cpp @@ -4,7 +4,9 @@ #include <unistd.h> #include <sys/stat.h> -static bool GetUserWritableDir(string & outDir) +#define LOCALAPPDATA_DIR "MapsWithMe" + +bool GetUserWritableDir(string & outDir) { char * path = ::getenv("HOME"); if (path) @@ -18,7 +20,7 @@ static bool GetUserWritableDir(string & outDir) } /// @return full path including binary itself -static bool GetPathToBinary(string & outPath) +bool GetPathToBinary(string & outPath) { char path[4096] = {0}; if (0 < ::readlink("/proc/self/exe", path, ARRAY_SIZE(path))) |