Skip to content

Commit 93b11fb

Browse files
committed
fix(node-opal-async): Link libOpalAsyncApi statically
Signed-off-by: Steffen Vogel <[email protected]>
1 parent 1e42195 commit 93b11fb

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

cmake/FindOpalAsyncApi.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ if(EXISTS "${TARGET_RTLAB_ROOT}/common/bin/opalmodelmk")
2525
set(OPAL_INCLUDE_DIR ${TARGET_RTLAB_ROOT}/common/include_target)
2626

2727
add_library(OpalAsyncApi INTERFACE)
28-
target_include_directories(opal INTERFACE ${OPAL_INCLUDE_DIR})
29-
target_link_libraries(opal INTERFACE ${OPAL_LIBRARIES})
28+
target_include_directories(OpalAsyncApi INTERFACE ${OPAL_INCLUDE_DIR})
29+
target_link_libraries(OpalAsyncApi INTERFACE ${OPAL_LIBRARIES})
3030
endif()
3131

3232
find_package_handle_standard_args(OpalAsyncApi DEFAULT_MSG OPAL_LIBRARIES OPAL_INCLUDE_DIR)

lib/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,6 @@ if(WITH_NODE_INFINIBAND)
7676
list(APPEND LIB_SRC memory/ib.cpp)
7777
endif()
7878

79-
if(WITH_NODE_OPAL_ASYNC)
80-
add_library(OpalAsyncApi SHARED empty.cpp)
81-
target_link_libraries(OpalAsyncApi PRIVATE -Wl,--allow-multiple-definition -Wl,--whole-archive ${OPAL_LIBRARIES} -Wl,--no-whole-archive)
82-
target_include_directories(OpalAsyncApi PUBLIC ${OPAL_INCLUDE_DIR})
83-
84-
install(
85-
TARGETS OpalAsyncApi
86-
COMPONENT lib
87-
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
88-
)
89-
endif()
90-
9179
add_subdirectory(nodes)
9280
list(APPEND WHOLE_ARCHIVES nodes)
9381

lib/empty.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/nodes/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ endif()
7474
# Enable OPAL-RT Asynchronous Process support
7575
if(WITH_NODE_OPAL_ASYNC)
7676
list(APPEND NODE_SRC opal_async.cpp)
77-
list(APPEND LIBRARIES OpalAsyncApi)
77+
list(APPEND LIBRARIES ${OPAL_LIBRARIES})
78+
list(APPEND INCLUDE_DIRS ${OPAL_INCLUDE_DIR})
7879
endif()
7980

8081
if(WITH_NODE_MODBUS)

0 commit comments

Comments
 (0)