Skip to content

Commit

Permalink
🐞 解决 light 依赖 SDK 时,构建提示动态库缺失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoxi-scut authored and TooPretty0108 committed Feb 12, 2025
1 parent f17064b commit 311664d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions modules/light/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@ rmvl_add_module(
# ----------------------------------------------------------------------------
rmvl_generate_module_para(light)

# --------------------------------------------------------------------------
# Install the necessary library for OS
# --------------------------------------------------------------------------
foreach(SDK OPTLightCtrl)
if(${SDK}_FOUND AND DEFINED ${SDK}_LIB)
if(IS_SYMLINK "${${SDK}_LIB}")
get_filename_component(lib_realname ${${SDK}_LIB} REALPATH)
set(lib_install ${lib_realname} ${${SDK}_LIB})
else()
set(lib_install ${${SDK}_LIB})
endif()
install(
FILES ${lib_install}
DESTINATION ${RMVL_3P_LIB_INSTALL_PATH}
)
if(DEFINED ${SDK}_DLL)
if(IS_SYMLINK "${${SDK}_DLL}")
get_filename_component(dll_realname ${${SDK}_DLL} REALPATH)
set(dll_install ${dll_realname} ${${SDK}_DLL})
else()
set(dll_install ${${SDK}_DLL})
endif()
install(
FILES ${dll_install}
DESTINATION ${RMVL_BIN_INSTALL_PATH}
)
endif()
endif()
endforeach()

# ----------------------------------------------------------------------------
# Build Python bindings
# ----------------------------------------------------------------------------
Expand Down

0 comments on commit 311664d

Please sign in to comment.