Jsoncpp target reported as broken on Windoze
gadomski opened this issue · 1 comments
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.
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.