gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
385 stars 122 forks source link

Jsoncpp target reported as broken on Windoze #133

Closed gadomski closed 5 years ago

gadomski commented 6 years ago

Reported in Gitter by @FlorianHermes:

I tried to add Cpd::Jsoncpp to my own project, with my own CMakeLists.txt by using FIND_PACKAGE(Cpd COMPONENTS jsoncpp REQUIRED) and TARGET_LINK_LIBRARIES( DesiredView PUBLIC Cpd::Jsoncpp ). When I tried to generate it with CMake the error appeared: Imported target "" includes non-existent path "" in its INTERFACE_INCLUDE_DIRECTORIES. (...). I made it work now by using INCLUDE_DIRECTORIES("Path to include") and TARGET_LINK_LIBRARIES("Path to lib file") instead.

I'm using MSVC 14.12 in VS 15 2017 on a Windows 10 64bit OS.

gadomski commented 6 years ago

The problem appears to be due to static vs. dynamic installation of jsoncpp -- if jsoncpp is installed static, cpd doesn't pick it up correctly. I'll have to update the jsoncpp cmake in cpd to detect the correct library.