aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-11-10 06:24:18 +0800
committerGitHub <noreply@github.com>2020-11-09 14:24:18 -0800
commit1b5e00a3e3acd51877cd0966f60fa78458c037e8 (patch)
tree1fe1158aa27a1c0972b69550ce7804eb449e0a73
parenta94f261320398b859e5afb2b4d4c5a574f5d205a (diff)
downloadvcpkg-1b5e00a3e3acd51877cd0966f60fa78458c037e8.tar.gz
vcpkg-1b5e00a3e3acd51877cd0966f60fa78458c037e8.zip
[caf] Add usage and vcpkg-cmake-wrapper (#14292)
* [caf] Add usage and vcpkg_cmake_wrapper * Update usage
-rw-r--r--ports/caf/CONTROL1
-rw-r--r--ports/caf/portfile.cmake6
-rw-r--r--ports/caf/usage5
-rw-r--r--ports/caf/vcpkg-cmake-wrapper.cmake6
4 files changed, 17 insertions, 1 deletions
diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL
index 1e0ca3624..964096bf1 100644
--- a/ports/caf/CONTROL
+++ b/ports/caf/CONTROL
@@ -1,5 +1,6 @@
Source: caf
Version: 0.17.6
+Port-Version: 1
Homepage: https://github.com/actor-framework/actor-framework
Build-Depends: openssl
Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more.
diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake
index 2cd515007..e278fde14 100644
--- a/ports/caf/portfile.cmake
+++ b/ports/caf/portfile.cmake
@@ -51,6 +51,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR
file(INSTALL
${SOURCE_PATH}/LICENSE
- DESTINATION ${CURRENT_PACKAGES_DIR}/share/caf RENAME copyright)
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+
+file(COPY ${SOURCE_PATH}/cmake/FindCAF.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
vcpkg_copy_pdbs()
diff --git a/ports/caf/usage b/ports/caf/usage
new file mode 100644
index 000000000..10083d8de
--- /dev/null
+++ b/ports/caf/usage
@@ -0,0 +1,5 @@
+The package caf provides CMake targets:
+
+ find_package(CAF REQUIRED COMPONENTS core io)
+ target_include_directories(main PRIVATE ${CAF_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${CAF_LIBRARIES}) \ No newline at end of file
diff --git a/ports/caf/vcpkg-cmake-wrapper.cmake b/ports/caf/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..b01e40855
--- /dev/null
+++ b/ports/caf/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,6 @@
+set(CAF_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+_find_package(${ARGS})
+
+set(CMAKE_MODULE_PATH ${CAF_PREV_MODULE_PATH})