ikev2: build only when deps requirements are met
[vpp.git] / src / plugins / ikev2 / CMakeLists.txt
index 800b9a8..41292fc 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if(NOT OPENSSL_FOUND)
+  message(WARNING "openssl headers not found - ikev2 plugin disabled")
+  return()
+endif()
+
+include_directories(${OPENSSL_INCLUDE_DIR})
+
 add_vpp_plugin(ikev2
   SOURCES
   ikev2.c
@@ -21,6 +28,7 @@ add_vpp_plugin(ikev2
   ikev2_payload.c
 
   API_FILES
+  ikev2_types.api
   ikev2.api
 
   API_TEST_SOURCES
@@ -30,5 +38,6 @@ add_vpp_plugin(ikev2
   ikev2.h
   ikev2_priv.h
 
-  COMPONENT vpp-plugin-ikev2
+  LINK_LIBRARIES
+  ${OPENSSL_LIBRARIES}
 )