FreeYourSoul / FSeam

Cpp header only library to manage compile time mock class generated via Python script
MIT License
86 stars 8 forks source link

Installed/Exported FSeam CMake-Package seems faulty #26

Closed jenisys closed 4 years ago

jenisys commented 4 years ago

Describe the bug When I build FSeam with CMake and install the FSeam package afterwards, I run into various problems when I try to use it with the FSeam_tutorial project:

HINT: FSeam is installed into an empty INSTALL_ROOT directory.

To Reproduce Directory tree:

+-- .installed/       -- Empty INSTALL_ROOT directory
+-- FSeam/            -- Cloned git repository
+-- FSeam_tutorial/   -- Cloned git repository

Steps to reproduce the behavior:

# -- FSeam project: Install FSeam into INSTALL_ROOT=.installed
$ cd FSeam/
$ mkdir build && cd build 
$ cmake -D CMAKE_INSTALL_PREFIX=$PWD/../../.installed ..
$ cmake --install .
# -- FSeam_tutorial project: 
$ cd FSeam_tutorial/
$ mkdir build && cd build 
$ FSeam_DIR=$PWD/../../.installed cmake ..
# -- EXPECT: PROBLEM 1 => .installed/include does not exist
# -- EXPECT: PROBLEM 2 => Found Python3 ... FILE_FSEAMER_PY-NOTFOUND

HINT: PROBLEM 2 seems to occur if INSTALL_ROOT/bin is not in the search-path (PATH environment variable).

PROBLEM 1:

CMake Error in CMakeLists.txt:
  Imported target "FSeam::FSeam" includes non-existent path

    "/.../.installed/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
 ...

Expected behavior After installation of the FSeam cmake package, it should be usable by FSeam_tutorial project (or any other project that uses FSeam).

Desktop (please complete the following information):