summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-18 19:30:51 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-18 19:30:51 +0100
commitaaa96959a1003ee5e34c4c121286b371bc298ade (patch)
treed0f7b8e7b5718f7ae9af29a64da4565b20082daf
parent5696ce8796fd7f03097a77edd5fe3ab1f4bcfe64 (diff)
cmake: change up OPENTRACK_BASE_PATH handling
-rw-r--r--cmake/opentrack-boilerplate.cmake3
-rw-r--r--compat/base-path.hpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 019efb05..0db91bd0 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -7,7 +7,6 @@ set(new-hier-path "#pragma once
# include <QCoreApplication>
# include <QString>
# include \"compat/base-path.hpp\"
-# define OPENTRACK_BASE_PATH (application_base_path())
#endif
#define OPENTRACK_LIBRARY_PATH \"${opentrack-hier-path}\"
#define OPENTRACK_DOC_PATH \"${opentrack-hier-doc}\"
@@ -17,7 +16,7 @@ set(new-hier-path "#pragma once
include_directories("${CMAKE_BINARY_DIR}")
-set(hier-path-filename "${CMAKE_BINARY_DIR}/opentrack-library-path.h")
+set(hier-path-filename "${CMAKE_BINARY_DIR}/__opentrack-library-path.h")
set(orig-hier-path "")
if(EXISTS "${hier-path-filename}")
file(READ ${hier-path-filename} orig-hier-path)
diff --git a/compat/base-path.hpp b/compat/base-path.hpp
index 3dbf2a3f..8e2884fd 100644
--- a/compat/base-path.hpp
+++ b/compat/base-path.hpp
@@ -1,9 +1,12 @@
#pragma once
#include "macros.hpp"
-#include <QString>
#include "export.hpp"
+#include <QString>
+
OTR_COMPAT_EXPORT
never_inline
const QString& application_base_path();
+
+#define OPENTRACK_BASE_PATH (application_base_path())