mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +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,28 +9,33 @@
|
||||
# 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)
|
||||
CollectSourceFiles(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE_SOURCES)
|
||||
|
||||
set(include_Dirs
|
||||
${CMAKE_SOURCE_DIR}/deps/libmpq
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
set(include_Dirs
|
||||
${include_Dirs}
|
||||
${CMAKE_SOURCE_DIR}/deps/libmpq/win
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${include_Dirs})
|
||||
|
||||
add_executable(vmap4extractor ${sources})
|
||||
add_executable(vmap4extractor ${PRIVATE_SOURCES})
|
||||
|
||||
target_link_libraries(vmap4extractor
|
||||
mpq
|
||||
${BZIP2_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
PUBLIC
|
||||
mpq)
|
||||
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES)
|
||||
|
||||
target_include_directories(vmap4extractor
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_target_properties(vmap4extractor
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
"tools")
|
||||
|
||||
if( UNIX )
|
||||
install(TARGETS vmap4extractor DESTINATION bin)
|
||||
|
||||
Reference in New Issue
Block a user