diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL index 1e0ca3624ee1d4..964096bf15d1e5 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 2cd515007db978..e278fde140e30d 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 00000000000000..10083d8de8fdf7 --- /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 00000000000000..b01e408550c646 --- /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})