Fix linking to libdl on Ubuntu
This commit is contained in:
parent
9ae28de03e
commit
2b9d66b787
2 changed files with 4 additions and 4 deletions
4
third-party/lua-5.1.5/src/CMakeLists.txt
vendored
4
third-party/lua-5.1.5/src/CMakeLists.txt
vendored
|
@ -48,8 +48,8 @@ add_executable(lua51 "${LUA_SRC}" "${LUA_LIB_SRC}")
|
|||
if(UNIX)
|
||||
target_compile_definitions(lua51_static PUBLIC "LUA_USE_DLOPEN")
|
||||
target_compile_definitions(lua51 PUBLIC "LUA_USE_DLOPEN")
|
||||
target_link_libraries(lua51 PUBLIC dl)
|
||||
target_link_libraries(lua51_static PUBLIC dl)
|
||||
target_link_libraries(lua51 PUBLIC ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(lua51_static PUBLIC ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
set_target_properties(lua51_static PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
|
|
@ -23,8 +23,8 @@ tolua_to.c
|
|||
add_library(toluapp51 STATIC "${TOLUA_LIB_SRC}")
|
||||
add_executable(toluapp "${TOLUA_BIN_SRC}" "${TOLUA_LIB_SRC}")
|
||||
|
||||
target_link_libraries(toluapp51 PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a")
|
||||
target_link_libraries(toluapp PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a")
|
||||
target_link_libraries(toluapp51 PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a" ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(toluapp PUBLIC "${PROJECT_BINARY_DIR}/liblua51.a" ${CMAKE_DL_LIBS})
|
||||
|
||||
|
||||
add_custom_command(TARGET toluapp51 POST_BUILD COMMAND cp "${PROJECT_SOURCE_DIR}/toluapp-simple/tolua++.h" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||
|
|
Loading…
Reference in a new issue