Skip to content

Resolve "Move workerQt library path code and render it reusable."

What does this MR do?

This introduces a new function in fwTools::Os :

/**
 * @brief   Return the path to a shared library name
 * The library should have already been loaded before.
 * @param _libName The name of the shared library, without any 'lib' prefix, 'd' suffix or extension,
 * i.e. 'jpeg' or 'boost_filesystem'. The function will try to use the appropriate combination according to
 * the platform and the build type.
 * @return path to the library on the filesystem
 * @throw ::fwTools::Exception if the library could not be found (not loaded for instance)
 */
FWTOOLS_API ::boost::filesystem::path getSharedLibraryPath(const std::string& _libName);

This function has been used to search for Qt plugins in WorkerQt.cpp. It can be used in some of our utilities as well. The code is generic and has been unit-tested properly.

How to test it?

  • Launch fwToolsTest
  • Launch some Qt based applications

Additional tests to run

  • Build and run on Windows
  • Build and run on Linux
  • Build and run on MacOs (DISCLAIMER, it has not been tested and not even compiled ! This might require some extra work)

Associated Issues/Merge Requests

Edited by Emilie WERNERT

Merge request reports