  export(PACKAGE Libssh2) # register it
  
  ## Export a .pc file for client projects not using CMaek
-@@ -409,6 +426,7 @@ endif()
+@@ -409,6 +418,7 @@ endif()
  configure_file(libssh2.pc.in libssh2.pc @ONLY)
  install(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/libssh2.pc

 set(PROJECT_DESCRIPTION "The SSH library")
+include(flags OPTIONAL)
+if(DEFINED XP_NAMESPACE)
+  set(XP_OPT_INSTALL EXCLUDE_FROM_ALL)
+endif()
 
 if (CMAKE_VERSION VERSION_LESS "3.1")

 
 ## Versioning
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c8c5253..ffbd835 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -36,7 +36,6 @@
