1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

cmake: fix compilation of OPAL-RT AsyncIP code

This commit is contained in:
Steffen Vogel 2021-09-14 20:10:21 +02:00
parent d3c4f6e24c
commit b83bec6f7d
3 changed files with 15 additions and 7 deletions

View file

@ -161,6 +161,10 @@ else()
endif()
FindSymbol(${LWS_LOCATION} lws_extension_callback_pm_deflate LWS_DEFLATE_FOUND)
if(CMAKE_CXX_FLAGS MATCHES "-m32" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i[3456]86")
set(IS_32BIT ON)
endif()
# Build options
cmake_dependent_option(WITH_HOOKS "Build with support for processing hook plugins" ON "" OFF)
cmake_dependent_option(WITH_WEB "Build with internal webserver" ON "LIBWEBSOCKETS_FOUND" OFF)
@ -192,7 +196,7 @@ cmake_dependent_option(WITH_NODE_LOOPBACK "Build with loopback node-type"
cmake_dependent_option(WITH_NODE_MQTT "Build with mqtt node-type" ON "MOSQUITTO_FOUND" OFF)
cmake_dependent_option(WITH_NODE_NANOMSG "Build with nanomsg node-type" ON "NANOMSG_FOUND" OFF)
cmake_dependent_option(WITH_NODE_NGSI "Build with ngsi node-type" ON "" OFF)
cmake_dependent_option(WITH_NODE_OPAL "Build with opal node-type" ON "Opal_FOUND" OFF)
cmake_dependent_option(WITH_NODE_OPAL "Build with opal node-type" ON "Opal_FOUND; IS_32BIT" OFF)
cmake_dependent_option(WITH_NODE_REDIS "Build with redis node-type" ON "HIREDIS_FOUND; REDISPP_FOUND" OFF)
cmake_dependent_option(WITH_NODE_RTP "Build with rtp node-type" ON "RE_FOUND" OFF)
cmake_dependent_option(WITH_NODE_SHMEM "Build with shmem node-type" ON "HAS_SEMAPHORE; HAS_MMAN" OFF)

View file

@ -21,12 +21,14 @@
###################################################################################
if(OPAL_FOUND)
set(ASYNCIP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/models/send_receive)
set(ASYNCIP_OPTS RTLAB_INTEL_COMPILER=0 PROTOCOL=GTNET_SKT OPAL_LIBS="-lSystem -luuid" OPAL_LIBPATH=-L$(SRCDIR)/thirdparty/libopal/ OPAL_INCPATH=-I$(SRCDIR)/thirdparty/libopal/include/opal)
# Just call the original Makefile
add_custom_target(clients-opal
COMMAND make -C ${ASYNCIP_PATH} -f Makefile.mk AsyncIP ${ASYNCIP_OPTS}
COMMAND make -C ${CMAKE_CURRENT_SOURCE_DIR}/models/send_receive
-f Makefile.mk AsyncIP
RTLAB_INTEL_COMPILER=0
PROTOCOL=VILLAS
OPAL_LIBS="-lSystem -luuid"
OPAL_LIBPATH=-L${OPAL_LIBRARY_DIR}
OPAL_INCPATH=-I${OPAL_INCLUDE_DIR}
)
endif()

View file

@ -59,7 +59,9 @@ find_library(OPAL_LIBRARY_OPAL_CORE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Opal DEFAULT_MSG OPAL_LIBRARY OPAL_INCLUDE_DIR)
mark_as_advanced(OPAL_INCLUDE_DIR OPAL_LIBRARY)
get_filename_component(OPAL_LIBRARY_DIR ${OPAL_LIBRARY} DIRECTORY)
mark_as_advanced(OPAL_INCLUDE_DIR OPAL_LIBRARY_DIR OPAL_LIBRARY)
set(OPAL_LIBRARIES ${OPAL_LIBRARY} ${OPAL_LIBRARY_OPALUTILS} ${OPAL_LIBRARY_OPALCORE} ${OPAL_LIBRARY_IRC} $ENV{OPAL_LIBPATH} $ENV{OPAL_LIBS})
set(OPAL_INCLUDE_DIRS ${OPAL_INCLUDE_DIR})