You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-gfx/meshlab/files/meshlab-2020.12-find-plugin...

40 lines
1.1 KiB

--- 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.