mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 23:00:36 +08:00
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt
|
|
index 563b785..20f8a54 100644
|
|
--- a/cpr/CMakeLists.txt
|
|
+++ b/cpr/CMakeLists.txt
|
|
@@ -20,6 +20,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.
|
|
@@ -28,4 +29,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()
|
|
\ No newline at end of file
|