Bug 414554 - Installed CMake target contains absolute paths and cannot be relocated
Summary: Installed CMake target contains absolute paths and cannot be relocated
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-26 23:16 UTC by Samuel OMalley
Modified: 2020-01-02 20:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel OMalley 2019-11-26 23:16:08 UTC
SUMMARY

There is an absolute path in MarbleTarget.cmake (INCLUDE_INSTALL_DIR). This absolute path means that the installed files cannot be moved and still used by CMake's find_package().

There should be _no_ absolute paths in any outputs of install.

STEPS TO REPRODUCE
1. Marble: make install
2. Rename install dir
3. Attempt to depend on Marble libraries with find_package(Marble REQUIRED)

OBSERVED RESULT

CMake Error in src/libs/geo/CMakeLists.txt
  Imported target "Marble" includes non-existent path

    "/absolute/path/to/include/dirs/that/doesnt/exist"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and references files it does not provide.

EXPECTED RESULT

No error.

SOFTWARE/OS VERSIONS
CMake: 3.11
Qt Version: 5.10

ADDITIONAL INFORMATION
Comment 1 Samuel OMalley 2019-11-26 23:31:02 UTC
Patch submitted: https://phabricator.kde.org/D25456
Comment 2 Torsten Rahn 2020-01-02 20:55:26 UTC
Closed by commit R34:3eb10f4339df: Patch from Samuel OMalley to make the include directory movable.