[CMake] advice for resolving errors with CMake 3.8

Michael Ellery mellery451 at gmail.com
Wed May 2 12:45:14 EDT 2018


I generally develop on a latest cmake (provided by homebrew) and that works well for me. Unfortunately, I also need to support Visual Studio builds and it looks like the cmake that is bundled with VS is 3.8. I’m apparently using bleeding-edge features related to IMPORTED libraries, judging by these errors:

||   Cannot specify include directories for imported target “some_lib”.

||   add_library cannot create ALIAS target “NIH::some_lib" because target
||   “some_lib" is IMPORTED.

||   Cannot specify compile options for imported target “some_lib".
|| 

What is the recommended way to deal with include dirs and compile settings for IMPORTED targets with pre-3.11? 

Thanks,
Mike




More information about the CMake mailing list