mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Cmake): Rewrite build and use inherited dependencies (#1652)
This commit is contained in:
committed by
Francesco Borzì
parent
0f174eff01
commit
eae9affec9
@@ -9,35 +9,41 @@
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
file(GLOB_RECURSE sources *.cpp *.h)
|
||||
|
||||
set(include_Dirs
|
||||
${CMAKE_SOURCE_DIR}/src/common/Utilities
|
||||
${CMAKE_SOURCE_DIR}/src/common
|
||||
${CMAKE_SOURCE_DIR}/deps/libmpq
|
||||
${CMAKE_SOURCE_DIR}/deps/g3dlite/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/loadlib
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
set(include_Dirs
|
||||
${include_Dirs}
|
||||
${CMAKE_SOURCE_DIR}/deps/libmpq/win
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${include_Dirs})
|
||||
CollectSourceFiles(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE_SOURCES)
|
||||
|
||||
add_executable(mapextractor
|
||||
${sources}
|
||||
${PRIVATE_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(mapextractor
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/loadlib)
|
||||
|
||||
target_link_libraries(mapextractor
|
||||
mpq
|
||||
${BZIP2_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
PUBLIC
|
||||
shared
|
||||
mpq)
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES)
|
||||
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_include_directories(mapextractor
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_target_properties(mapextractor
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
"tools")
|
||||
|
||||
if( UNIX )
|
||||
install(TARGETS mapextractor DESTINATION bin)
|
||||
|
||||
Reference in New Issue
Block a user