openflow: update fetching of openflow after porting to CMake

This commit is contained in:
Gabriel Ferreira
2023-12-26 23:23:52 +01:00
parent e6ebbb58b3
commit cdc82656c7

View File

@@ -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(