diff options
| author | click <none@none> | 2010-08-11 20:55:14 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-08-11 20:55:14 +0200 |
| commit | 780ed1b01c77ac142e1da5851ff7deb832413b11 (patch) | |
| tree | fd455dc88cc1b61c01749100fc0d7a303cb6a703 /src | |
| parent | f482bb1cd54cb562518a10dfd720c9e798b5b19f (diff) | |
Buildsystem: Clean up build-process on all platforms
- Windows: Use CMAKE_INSTALL_PREFIX as a 'final install' directory (thanks to paradox for the preload-handling)
(New target INSTALL, -not- included as part of ALL_BUILD (must be specifically run for installation to start)
- All: Build libmpq library (used for tools)
- All: Build extractiontools with hardlinked mpq-library (no need to install it anymore)
- All: Move jemalloc from being harddefined to using a CMake string (fixes issue 3378) (thanks to tru.bazoozoo for the idea, alternative added)
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/authserver/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/server/worldserver/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | src/tools/map_extractor/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/tools/vmap3_assembler/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/tools/vmap3_extractor/CMakeLists.txt | 12 |
5 files changed, 31 insertions, 6 deletions
diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index 6dc0089dddc..f3bfcdb78a1 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -98,4 +98,7 @@ endif() if( UNIX ) install(TARGETS authserver DESTINATION bin) install(FILES authserver.conf.dist DESTINATION etc) +elseif( WIN32 ) + install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}") + install(FILES authserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}") endif() diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index eed999ccba7..d30d28f5b6f 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -180,7 +180,7 @@ else() collision g3dlib gsoap - jemalloc + ${JEMALLOC_LIB} ${SCRIPT_LIB} ${READLINE_LIBRARY} ${TERMCAP_LIBRARY} @@ -201,5 +201,8 @@ endif() if( UNIX ) install(TARGETS worldserver DESTINATION bin) - install(FILES worldserver.conf.dist DESTINATION etc) + install(FILES worldserver.conf.dist DESTINATION etc) +elseif( WIN32 ) + install(TARGETS worldserver DESTINATION "${CMAKE_INSTALL_PREFIX}") + install(FILES worldserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}") endif() diff --git a/src/tools/map_extractor/CMakeLists.txt b/src/tools/map_extractor/CMakeLists.txt index 0d35421b9ef..ef333e9b285 100644 --- a/src/tools/map_extractor/CMakeLists.txt +++ b/src/tools/map_extractor/CMakeLists.txt @@ -13,6 +13,7 @@ file(GLOB_RECURSE sources *.cpp *.h) include_directories ( ${CMAKE_SOURCE_DIR}/src/server/shared + ${CMAKE_SOURCE_DIR}/externals/libmpq ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/loadlib ) @@ -23,16 +24,22 @@ add_executable(mapextractor if(WIN32) target_link_libraries(mapextractor - mpq bzip2 + zlib + mpq ) else() target_link_libraries(mapextractor - mpq ${BZIP2_LIBRARIES} + ${ZLIB_LIBRARIES} + mpq ) endif() +add_dependencies(mapextractor mpq) + if( UNIX ) install(TARGETS mapextractor DESTINATION bin) +elseif( WIN32 ) + install(TARGETS mapextractor DESTINATION "${CMAKE_INSTALL_PREFIX}") endif() diff --git a/src/tools/vmap3_assembler/CMakeLists.txt b/src/tools/vmap3_assembler/CMakeLists.txt index c920571c439..6d0a0d985ff 100644 --- a/src/tools/vmap3_assembler/CMakeLists.txt +++ b/src/tools/vmap3_assembler/CMakeLists.txt @@ -23,6 +23,8 @@ add_definitions(-DNO_CORE_FUNCS) add_executable(vmap3assembler VMapAssembler.cpp) +add_dependencies(vmap3assembler mpq) + if(WIN32) target_link_libraries(vmap3assembler collision @@ -39,4 +41,6 @@ endif() if( UNIX ) install(TARGETS vmap3assembler DESTINATION bin) +elseif( WIN32 ) + install(TARGETS vmap3assembler DESTINATION "${CMAKE_INSTALL_PREFIX}") endif() diff --git a/src/tools/vmap3_extractor/CMakeLists.txt b/src/tools/vmap3_extractor/CMakeLists.txt index b9604f4e165..1b58d46b988 100644 --- a/src/tools/vmap3_extractor/CMakeLists.txt +++ b/src/tools/vmap3_extractor/CMakeLists.txt @@ -20,22 +20,30 @@ add_definitions("-Wall") add_definitions("-ggdb") add_definitions("-O3") +include_directories( + ${CMAKE_SOURCE_DIR}/externals/libmpq +) + add_executable(vmap3extractor ${sources}) if(WIN32) target_link_libraries(vmap3extractor - mpq bzip2 zlib + mpq ) else() target_link_libraries(vmap3extractor - mpq ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} + mpq ) endif() +add_dependencies(vmap3extractor mpq) + if( UNIX ) install(TARGETS vmap3extractor DESTINATION bin) +elseif( WIN32 ) + install(TARGETS vmap3extractor DESTINATION "${CMAKE_INSTALL_PREFIX}") endif() |
