From d202695e88bc859d1383f83790cda69786c09f84 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 19 Mar 2021 01:12:46 -0400 Subject: [PATCH] [Cleanup] Only link Lua with zone (#1288) Only zone requires to be linked to lua, so let's not link EVERYTHING. There is probably more clean up we could do, but I know for a fact Lua is only used by zone. This probably has some measurable benefits that probably don't really matter that much :) --- CMakeLists.txt | 4 +++- zone/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a336d6636..526d68099 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,7 +313,7 @@ IF(LUA_LIBRARY_ENABLED) IF(EQEMU_BUILD_LUA) ADD_DEFINITIONS(-DLUA_EQEMU) - SET(SERVER_LIBS ${SERVER_LIBS} ${LUA_LIBRARY_LIBS}) + SET(ZONE_LIBS ${LUA_LIBRARY_LIBS}) INCLUDE_DIRECTORIES(SYSTEM "${LUA_LIBRARY_INCLUDE}") OPTION(EQEMU_SANITIZE_LUA_LIBS "Sanitize Lua Libraries (Remove OS and IO standard libraries from being able to run)." ON) @@ -348,6 +348,8 @@ IF(UNIX) ENDIF() ENDIF() +SET(ZONE_LIBS ${ZONE_LIBS} ${SERVER_LIBS}) + IF(EQEMU_BUILD_LOGIN AND NOT TLS_LIBRARY_ENABLED) MESSAGE(FATAL_ERROR "Login server requires a TLS Library to build.") ENDIF() diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 86894f49b..d28c8b85b 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -277,6 +277,6 @@ INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ADD_DEFINITIONS(-DZONE) -TARGET_LINK_LIBRARIES(zone ${SERVER_LIBS}) +TARGET_LINK_LIBRARIES(zone ${ZONE_LIBS}) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)