diff options
Diffstat (limited to 'cmake/Findcpr.cmake')
-rw-r--r-- | cmake/Findcpr.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/Findcpr.cmake b/cmake/Findcpr.cmake new file mode 100644 index 0000000..a8aed9d --- /dev/null +++ b/cmake/Findcpr.cmake @@ -0,0 +1,14 @@ +include(FindPackageHandleStandardArgs) + +find_library(CPR_LIBRARY NAMES cpr) + +find_package_handle_standard_args(cpr REQUIRED_VARS CPR_LIBRARY) + +if (CPR_FOUND) + mark_as_advanced(CPR_LIBRARY) +endif() + +if(CPR_FOUND AND NOT TARGET cpr::cpr) + add_library(cpr::cpr IMPORTED UNKNOWN) + set_property(TARGET cpr::cpr PROPERTY IMPORTED_LOCATION ${CPR_LIBRARY}) +endif()
\ No newline at end of file |