Joined April 2015
·

Adri

Vigo
·
·

Hi! I'm following your recipe and I was able to generate the Targets.cmake file in my installation directory.

Something like:
* Project 1 -> build -> has Project1-config.cmake
-> install -> has Project1Targets.cmake

I want to call find_library to this library from another project, but CMake doesn't find my install directory, but the *-config.cmake file in my build dir.

When building Project2 with CMake, I get this error:

File or directory D:/PROJECTS/Project1/include referenced by variable PROJECT1_INCLUDE does not exist !

and the Project1DIR_ entry in the CMake-gui points to: D:/PROJECTS/Project1/build
where the Project1-config.cmake is.
If I manually select the install dir of Project1Targets.cmake, CMake will auto-select the build one.

I'm clueless about this. Do you have any idea?
Thanks!

Achievements
1 Karma
0 Total ProTip Views