mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Cmake: Rewrite build and use inherited dependencies (#12)
This commit is contained in:
@@ -4,16 +4,25 @@
|
||||
# Please see the included DOCS/LICENSE.md for more information
|
||||
#
|
||||
|
||||
file(GLOB sources *.c)
|
||||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/lua.c)
|
||||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/luac.c)
|
||||
|
||||
set(lua_STAT_SRCS
|
||||
${sources}
|
||||
)
|
||||
|
||||
include_directories(
|
||||
CollectSourceFiles(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
PRIVATE_SOURCES
|
||||
# Exclude
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||
|
||||
add_library(lualib STATIC ${lua_STAT_SRCS})
|
||||
list(REMOVE_ITEM PRIVATE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lua.c)
|
||||
list(REMOVE_ITEM PRIVATE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/luac.c)
|
||||
|
||||
add_library(lualib STATIC
|
||||
${PRIVATE_SOURCES})
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES)
|
||||
|
||||
target_include_directories(lualib
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
Reference in New Issue
Block a user