  set(PROJECT_DESCRIPTION "The SSH library")
 +include(flags OPTIONAL)
 +if(DEFINED XP_NAMESPACE)
++  set(XP_MODULE_PATH ${CMAKE_MODULE_PATH})
 +  set(XP_OPT_INSTALL EXCLUDE_FROM_ALL)
++  set(nameSpace ${XP_NAMESPACE}::)
++else()
++  set(nameSpace Libssh2::)
 +endif()
  
  if (CMAKE_VERSION VERSION_LESS "3.1")

 include(CopyRuntimeDependencies)
 include(SocketLibraries)
 
@@ -72,7 +71,12 @@ endif()
 
 if(CRYPTO_BACKEND STREQUAL "OpenSSL" OR NOT CRYPTO_BACKEND)
 
-  find_package(OpenSSL ${SPECIFIC_CRYPTO_REQUIREMENT})
+  if(COMMAND xpFindPkg)
+    set(XP_MODULE_PATH ${CMAKE_MODULE_PATH})
+    xpFindPkg(PKGS openssl)
+  else()
+    find_package(OpenSSL ${SPECIFIC_CRYPTO_REQUIREMENT})

 
 install(TARGETS libssh2
   EXPORT Libssh2Config
@@ -391,12 +400,12 @@ set(RUNTIME_DEPENDENCIES ${_RUNTIME_DEPENDENCIES} CACHE INTERNAL
 
 ## During package installation, install Libssh2Config.cmake
 install(EXPORT Libssh2Config
-  NAMESPACE Libssh2::
