mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 22:37:50 +08:00
44fd9d8c32
* [cpr] Update to 1.6.2 * Update version files * Update patch * Update verison files * Update ports/cpr/portfile.cmake * Update versions/c-/cpr.json * Fix build error on uwp * Update versions/c-/cpr.json * Add condition for uwp patch * Update versions/c-/cpr.json * Update ports/cpr/portfile.cmake * Update versions/c-/cpr.json
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt
|
|
index 8061a14..e8daf19 100644
|
|
--- a/cpr/CMakeLists.txt
|
|
+++ b/cpr/CMakeLists.txt
|
|
@@ -21,6 +21,7 @@ add_library(cpr
|
|
|
|
add_library(cpr::cpr ALIAS cpr)
|
|
|
|
+target_include_directories(cpr PUBLIC $<INSTALL_INTERFACE:include>)
|
|
target_link_libraries(cpr PUBLIC CURL::libcurl) # todo should be private, but first dependencys in ssl_options need to be removed
|
|
|
|
# Set version for shared libraries.
|
|
@@ -29,4 +30,18 @@ set_target_properties(cpr
|
|
VERSION ${${PROJECT_NAME}_VERSION}
|
|
SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR})
|
|
|
|
-install(TARGETS cpr)
|
|
+set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
|
|
+install(TARGETS cpr
|
|
+ EXPORT ${TARGETS_EXPORT_NAME}
|
|
+ RUNTIME DESTINATION bin
|
|
+ LIBRARY DESTINATION lib
|
|
+ ARCHIVE DESTINATION lib)
|
|
+
|
|
+install(
|
|
+ EXPORT ${TARGETS_EXPORT_NAME}
|
|
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
|
+)
|
|
+
|
|
+if (NOT DISABLE_INSTALL_HEADERS)
|
|
+ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../include/cpr DESTINATION include)
|
|
+endif()
|