blob: 0d3c4c118cebf8100da24c5c8f068f1fdf263e4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -75,6 +75,11 @@
endif()
add_library(meshlab-common ${TARGET_TYPE} ${SOURCES} ${HEADERS} ${RESOURCES})
+if(NOT WIN32 AND NOT APPLE)
+ target_compile_definitions(
+ meshlab-common PRIVATE MESHLAB_LIB_INSTALL_DIR="${MESHLAB_LIB_INSTALL_DIR}")
+endif()
+
target_include_directories(meshlab-common PRIVATE ${EXTERNAL_DIR}/easyexif/)
target_link_libraries(
meshlab-common
--- a/common/pluginmanager.cpp
+++ b/common/pluginmanager.cpp
@@ -225,7 +225,21 @@ QMap<QString, RichParameterList> PluginManager::generateFilterParameterMap()
QString PluginManager::getBaseDirPath()
{
QDir baseDir(qApp->applicationDirPath());
-
+
+#if defined(Q_OS_LINUX)
+ if (baseDir.dirName() == "bin") {
+ baseDir.cdUp();
+#ifdef MESHLAB_LIB_INSTALL_DIR
+ baseDir.cd(MESHLAB_LIB_INSTALL_DIR);
+#else
+ baseDir.cd("lib");
+ if(baseDir.exists("meshlab")) {
+ baseDir.cd("meshlab");
+ }
+#endif // MESHLAB_LIB_INSTALL_DIR
+ }
+#endif
+
#if defined(Q_OS_WIN)
// Windows:
// during development with visual studio binary could be in the debug/release subdir.
|