From 7b2d53676ccd2b4e518046fe5f6f84f42a291e8a Mon Sep 17 00:00:00 2001 From: George Zhao Date: Wed, 13 Nov 2024 16:12:53 +0800 Subject: [PATCH] fixup --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c3b9072..02df7326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,9 +277,17 @@ if(WIN32 OR CYGWIN) endif (USE_LUAJIT) endif (LUA) elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - target_link_libraries(test ${LIBUV_LIBRARIES} ${LUAJIT_LIBRARIES} rt) + if (USE_LUAJIT) + target_link_libraries(test ${LIBUV_LIBRARIES} ${LUAJIT_LIBRARIES} rt) + else () + target_link_libraries(test ${LIBUV_LIBRARIES} ${LUA_LIBRARIES} rt) + endif () else() - target_link_libraries(test ${LIBUV_LIBRARIES} ${LUAJIT_LIBRARIES}) + if (USE_LUAJIT) + target_link_libraries(test ${LIBUV_LIBRARIES} ${LUAJIT_LIBRARIES}) + else () + target_link_libraries(test ${LIBUV_LIBRARIES} ${LUA_LIBRARIES}) + endif () endif() if (NOT LUA)