Skip to content

Commit

Permalink
openflow: update fetching of openflow after porting to CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielcarvfer committed Dec 27, 2023
1 parent e6ebbb5 commit cdc8265
Showing 1 changed file with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cdc8265

Please sign in to comment.