aboutsummaryrefslogtreecommitdiff
path: root/ports/rxcpp/support_find_package.patch
diff options
context:
space:
mode:
authorIan Reinhart Geiser <geiseri@yahoo.com>2019-09-29 13:51:23 -0400
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-29 10:51:23 -0700
commit3c39089dadbf057b938c228932e39a76b1fbece7 (patch)
tree9e02062b251276b675f90fcf8ac5f656e309682c /ports/rxcpp/support_find_package.patch
parent22cbc5c7e3a5251d9f509e8ac9b8e880cee6eeed (diff)
downloadvcpkg-3c39089dadbf057b938c228932e39a76b1fbece7.tar.gz
vcpkg-3c39089dadbf057b938c228932e39a76b1fbece7.zip
[rxcpp] Change to new repository (#8361)
* Update for new repo * Update portfile.cmake
Diffstat (limited to 'ports/rxcpp/support_find_package.patch')
-rw-r--r--ports/rxcpp/support_find_package.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/ports/rxcpp/support_find_package.patch b/ports/rxcpp/support_find_package.patch
new file mode 100644
index 000000000..bb1da2d2d
--- /dev/null
+++ b/ports/rxcpp/support_find_package.patch
@@ -0,0 +1,32 @@
+diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
+index 3d0744740..293f187c5 100644
+--- a/projects/CMake/CMakeLists.txt
++++ b/projects/CMake/CMakeLists.txt
+@@ -146,3 +146,27 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all project
+
+ install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp
+ FILES_MATCHING PATTERN "*.hpp")
++
++# Here we are exporting TARGETS so that other projects can import rxcpp
++# just with find_package(rxcpp CONFIG) after rxcpp is installed into system by "make install".
++add_library(rxcpp INTERFACE)
++
++target_include_directories(rxcpp INTERFACE
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++ $<INSTALL_INTERFACE:include/rxcpp>
++)
++
++install(TARGETS rxcpp EXPORT rxcppConfig)
++install(EXPORT rxcppConfig DESTINATION share/rxcpp/cmake)
++
++# When find_package(rxcpp SOME_VERSION REQUIRED) will be used in third party project
++# where SOME_VERSION is any version incompatible with ${PROJECT_VERSION} then cmake will generate the error.
++# It means you don't need track versions manually.
++include(CMakePackageConfigHelpers)
++write_basic_package_version_file("${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake"
++ VERSION
++ ${PROJECT_VERSION}
++ COMPATIBILITY
++ AnyNewerVersion
++)
++install(FILES "${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" DESTINATION share/rxcpp/cmake)