Modify the eluna module installation method.

This commit is contained in:
Ayase
2018-05-15 23:11:32 +08:00
parent 629cf03312
commit 077d949206
2 changed files with 12 additions and 11 deletions

View File

@@ -1,14 +1,6 @@
if( ELUNA )
CU_SET_PATH("CMAKE_MOD_ELUNA_ENGINE_DIR" "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(lualib)
CU_ADD_HOOK(BEFORE_GAME_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/cmake/before_gs_install.cmake")
CU_ADD_HOOK(AFTER_GAME_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/cmake/after_gs_install.cmake")
CU_ADD_HOOK(BEFORE_SCRIPTS_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/cmake/before_script_install.cmake")
CU_ADD_HOOK(AFTER_WORLDSERVER_CMAKE "${CMAKE_CURRENT_LIST_DIR}/cmake/after_ws_install.cmake")
install(FILES "${CMAKE_MOD_ELUNA_ENGINE_DIR}/conf/mod_LuaEngine.conf.dist" DESTINATION ${CONF_DIR})
endif()
CU_SET_PATH("CMAKE_MOD_ELUNA_ENGINE_DIR" "${CMAKE_CURRENT_LIST_DIR}")
CU_ADD_HOOK(AFTER_LOAD_CONF "${CMAKE_CURRENT_LIST_DIR}/cmake/after_load_conf.cmake")

View File

@@ -0,0 +1,9 @@
add_subdirectory(${CMAKE_MOD_ELUNA_ENGINE_DIR}/lualib)
add_definitions(-DELUNA)
CU_ADD_HOOK(BEFORE_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/before_gs_install.cmake")
CU_ADD_HOOK(AFTER_GAME_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/after_gs_install.cmake")
CU_ADD_HOOK(BEFORE_SCRIPTS_LIBRARY "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/before_script_install.cmake")
CU_ADD_HOOK(AFTER_WORLDSERVER_CMAKE "${CMAKE_MOD_ELUNA_ENGINE_DIR}/cmake/after_ws_install.cmake")
message("[Eluna Module] LuaEngine is enable!")