I've a strange problem with CMake.
I'm importing Curl into my project, so I write for you a simplified summary of my CMakeLists.txt file.
ADD_LIBRARY (libcurl SHARED IMPORTED)
SET_PROPERTY(TARGET libcurl PROPERTY IMPORTED_LOCATION ../lib/libcurl.lib)
When I run CMake it generates the project files for MS VC++ (also for Linux). Then into the project file I find a wrong reference to curl library (libcurl-NOTFOUND)!
If I change my code into static import:
ADD_LIBRARY (libcurl STATIC IMPORTED)
SET_PROPERTY(TARGET libcurl PROPERTY IMPORTED_LOCATION ../lib/libcurl.lib)
I find the right reference to ../lib/libcurl.lib.
Do you have any idea why this happens?
Thank you very much!