aboutsummaryrefslogtreecommitdiff
path: root/cmake/Findcpr.cmake
blob: a8aed9d3a9b28708e2d2bb5c59d5507cc90743c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()