From cdc82656c73bd86a7c24bd6e53df671a4572851f Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 26 Dec 2023 23:23:52 +0100 Subject: [PATCH] openflow: update fetching of openflow after porting to CMake --- ...-fetch-optional-modules-dependencies.cmake | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/build-support/custom-modules/ns3-fetch-optional-modules-dependencies.cmake b/build-support/custom-modules/ns3-fetch-optional-modules-dependencies.cmake index 10106c0ec..6f5702cfc 100644 --- a/build-support/custom-modules/ns3-fetch-optional-modules-dependencies.cmake +++ b/build-support/custom-modules/ns3-fetch-optional-modules-dependencies.cmake @@ -25,13 +25,31 @@ ExternalProject_Add( ExternalProject_Add( openflow_dep - URL https://code.nsnam.org/openflow/archive/d45e7d184151.zip - URL_HASH MD5=a068cdaec5523586921b2f1f81f10916 + GIT_REPOSITORY https://gitlab.com/nsnam/openflow.git + GIT_TAG 4869d4f6900342440af02ea93a3d8040c8316e5f PREFIX openflow_dep BUILD_IN_SOURCE TRUE - CONFIGURE_COMMAND ./waf configure --prefix ${CMAKE_OUTPUT_DIRECTORY} - BUILD_COMMAND ./waf build - INSTALL_COMMAND ./waf install + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_OUTPUT_DIRECTORY} +) + +find_file( + BOOST_STATIC_ASSERT + NAMES static_assert.hpp + PATH_SUFFIXES boost + HINTS /usr/local +) + +if(${BOOST_STATIC_ASSERT} STREQUAL "BOOST_STATIC_ASSERT-NOTFOUND") + message(FATAL_ERROR "Boost static assert is required by openflow") +endif() + +get_filename_component(boost_dir ${BOOST_STATIC_ASSERT} DIRECTORY) + +install( + DIRECTORY ${boost_dir} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + USE_SOURCE_PERMISSIONS + PATTERN "boost/*" ) install(