For a shared library, the IMPORTED_LOCATION
must point to the DLL, not the import lib. See the documentation. You might also want to set the IMPORTED_IMPLIB property.
BTW, CMake also has a find package for Curl; perhaps you could use that?
More Related Contents:
- How to properly add include directories with CMake
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- CMake: How to set up source, library and CMakeLists.txt dependencies?
- How to detect C++11 support of a compiler with CMake
- OS specific instructions in CMAKE: How to?
- How do I add a library path in cmake?
- Change default value of CMAKE_CXX_FLAGS_DEBUG and friends in CMake
- How to create a shared library with cmake?
- Override compile flags for single files
- CMake unable to determine linker language with C++
- CMake: include library dependencies in a static library
- CMake linking against shared library on windows: error about not finding .lib file
- How do I use CMake?
- CMake does not find Visual C++ compiler
- CMake ExternalProject_Add() and FindPackage()
- How to enable C++11 in CLion?
- In CMake, how can I test if the compiler is Clang?
- CMake – remove a compile flag for a single translation unit
- How to use c++20 modules with CMake?
- cmake include header into every source file
- How to build cmake ExternalProject while configurating main one?
- Handling header files dependencies with cmake
- How to handle a transitive dependency conflict using Git submodules and CMake?
- How do I iterate over all CMake targets programmatically?
- cmake – Global linker flag setting (for all targets in directory)
- What is the difference between include_directories and target_include_directories in CMake?
- How to use CMAKE_EXPORT_COMPILE_COMMANDS?
- OpenCV GTK+2.x error – “Unspecified error (The function is not implemented…)”
- Adding multiple executables in CMake
- CMake: target_include_directories() prints an error when I try to add the source directory itself, or one of its subdirectories