summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 23:46:51 +0000
committerflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 23:46:51 +0000
commit8729e952e08aa1af4e315060208a405b759f1027 (patch)
tree248f705cf3a7d8f1292558d58692e5a1edbdf34d
parente165e4a1f7fe8b25d92834461c3bc8bdf2530f85 (diff)
downloadhercules-8729e952e08aa1af4e315060208a405b759f1027.tar.gz
hercules-8729e952e08aa1af4e315060208a405b759f1027.tar.bz2
hercules-8729e952e08aa1af4e315060208a405b759f1027.tar.xz
hercules-8729e952e08aa1af4e315060208a405b759f1027.zip
* CMake: added txt-converter targets, added warning for 64bit, added list of available targets.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14900 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--CMakeLists.txt29
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/char/CMakeLists.txt41
-rw-r--r--src/char_sql/CMakeLists.txt9
-rw-r--r--src/common/CMakeLists.txt6
-rw-r--r--src/login/CMakeLists.txt4
-rw-r--r--src/login/sql/CMakeLists.txt19
-rw-r--r--src/login/txt/CMakeLists.txt19
-rw-r--r--src/map/CMakeLists.txt4
-rw-r--r--src/map/sql/CMakeLists.txt141
-rw-r--r--src/map/txt/CMakeLists.txt141
-rw-r--r--src/tool/CMakeLists.txt3
-rw-r--r--src/txt-converter/CMakeLists.txt12
-rw-r--r--src/txt-converter/char/CMakeLists.txt81
-rw-r--r--src/txt-converter/login/CMakeLists.txt65
16 files changed, 393 insertions, 184 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8187627a..fb94c7c72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,6 +125,13 @@ if( Subversion_FOUND AND SVNVERSION )
endif()
+#
+# 3rdparty
+#
+add_subdirectory( 3rdparty )
+
+
+
#####################################################################
# package stuff
#
@@ -283,7 +290,25 @@ endif()
#
-# subdirectories
+# sources
#
-add_subdirectory( 3rdparty )
+set( TARGET_LIST CACHE INTERNAL "" )
add_subdirectory( src )
+
+
+#####################################################################
+# final checks and warnings
+#
+if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+ message( WARNING "64bit should work, but is not recommended." )
+elseif( NOT CMAKE_SIZEOF_VOID_P EQUAL 4 )
+ message( FATAL_ERROR "unexpected architecture (CMAKE_SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P})" )
+endif()
+list( LENGTH TARGET_LIST _LEN )
+if( _LEN EQUAL 0 )
+ message( FATAL_ERROR "no targets available" )
+endif()
+message( STATUS "Available targets:" )
+foreach( _TARGET IN ITEMS ${TARGET_LIST} )
+ message( STATUS "\t${_TARGET}" )
+endforeach()
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 2e72dba94..55ea07de4 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ Date Added
* Temporary fix for bugreport:4961 (unintended conversion from signed to unsigned). [FlavioJS]
* CMake: lowered required version to 2.8.3 and moved custom cmake modules to 3rdparty/cmake.
* Changed limit definitions used in WBUF* and WFIFO* to the intended fixed size alternatives.
+ * CMake: added txt-converter targets, added warning for 64bit, added list of available targets.
2011/07/09
* Added script command 'getmercinfo' for retrieving information about a mercenary of an online character. [Ai4rei]
* CMake: added search for math library, made CPack existence optional, updated the search for mysqlclient and corrected misspelled variables (tested with FreeBSD-8.2-i386) [FlavioJS]
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0bf5b0eb6..9415fc82c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,5 +5,5 @@ add_subdirectory( char )
add_subdirectory( char_sql )
add_subdirectory( map )
add_subdirectory( tool )
-#add_subdirectory( txt-converter )
+add_subdirectory( txt-converter )
#add_subdirectory( plugins )
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt
index 9e0cbd9f4..559718c26 100644
--- a/src/char/CMakeLists.txt
+++ b/src/char/CMakeLists.txt
@@ -1,28 +1,34 @@
#
+# setup
+#
+set( TXT_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+
+
+#
# char txt
#
if( HAVE_common_base )
message( STATUS "Creating target char-server" )
set( TXT_CHAR_HEADERS
- "${CMAKE_CURRENT_SOURCE_DIR}/char.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_party.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_status.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/inter.h"
+ "${TXT_CHAR_SOURCE_DIR}/char.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_guild.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_homun.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_party.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_pet.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_status.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_storage.h"
+ "${TXT_CHAR_SOURCE_DIR}/inter.h"
)
set( TXT_CHAR_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/char.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_party.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_status.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.c"
- "${CMAKE_CURRENT_SOURCE_DIR}/inter.c"
+ "${TXT_CHAR_SOURCE_DIR}/char.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_guild.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_homun.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_party.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_pet.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_status.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_storage.c"
+ "${TXT_CHAR_SOURCE_DIR}/inter.c"
)
set( DEPENDENCIES common_base )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
@@ -42,9 +48,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_charserver_txt )
endif()
-message( STATUS "Creating target char-server - done" )
set( HAVE_char-server ON CACHE BOOL "char-server target is available" )
mark_as_advanced( HAVE_char-server )
+set( TARGET_LIST ${TARGET_LIST} char-server CACHE INTERNAL "" )
+message( STATUS "Creating target char-server - done" )
else()
message( STATUS "Skipping target char-server (requires common_base)" )
unset( HAVE_char-server CACHE )
diff --git a/src/char_sql/CMakeLists.txt b/src/char_sql/CMakeLists.txt
index f2d1cd0f0..6090d3406 100644
--- a/src/char_sql/CMakeLists.txt
+++ b/src/char_sql/CMakeLists.txt
@@ -1,5 +1,11 @@
#
+# setup
+#
+set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+
+
+#
# char sql
#
if( HAVE_common_sql )
@@ -48,9 +54,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_charserver_sql )
endif()
-message( STATUS "Creating target char-server_sql - done" )
set( HAVE_char-server_sql ON CACHE BOOL "char-server_sql target is available" )
mark_as_advanced( HAVE_char-server_sql )
+set( TARGET_LIST ${TARGET_LIST} char-server_sql CACHE INTERNAL "" )
+message( STATUS "Creating target char-server_sql - done" )
else()
message( STATUS "Skipping target char-server_sql (requires common_sql)" )
unset( HAVE_char-server_sql CACHE )
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 21feb53f9..a389a0b58 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -103,9 +103,10 @@ add_library( common_base ${SOURCE_FILES} )
target_link_libraries( common_base ${LIBRARIES} )
set_target_properties( common_base PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" )
include_directories( ${INCLUDE_DIRS} )
-message( STATUS "Creating target common_base - done" )
set( HAVE_common_base ON CACHE BOOL "common_base target is available" )
mark_as_advanced( HAVE_common_base )
+set( TARGET_LIST ${TARGET_LIST} common_base CACHE INTERNAL "" )
+message( STATUS "Creating target common_base - done" )
else()
message( STATUS "Skipping target common_base (requires ZLIB)" )
unset( HAVE_common_base CACHE )
@@ -135,9 +136,10 @@ add_dependencies( common_sql ${DEPENDENCIES} )
target_link_libraries( common_sql ${LIBRARIES} ${DEPENDENCIES} )
set_target_properties( common_sql PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" )
include_directories( ${INCLUDE_DIRS} )
-message( STATUS "Creating target common_sql - done" )
set( HAVE_common_sql ON CACHE BOOL "common_sql target is available" )
mark_as_advanced( HAVE_common_sql )
+set( TARGET_LIST ${TARGET_LIST} common_sql CACHE INTERNAL "" )
+message( STATUS "Creating target common_sql - done" )
else()
message( STATUS "Skipping target common_sql (requires common_base and MYSQL)" )
unset( HAVE_common_sql CACHE )
diff --git a/src/login/CMakeLists.txt b/src/login/CMakeLists.txt
index afa4e5f20..eabc47eac 100644
--- a/src/login/CMakeLists.txt
+++ b/src/login/CMakeLists.txt
@@ -2,7 +2,9 @@
#
# setup
#
-set( LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
+set( LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+set( TXT_LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+set( SQL_LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
#
diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt
index ac7d464c9..ed23ba684 100644
--- a/src/login/sql/CMakeLists.txt
+++ b/src/login/sql/CMakeLists.txt
@@ -5,16 +5,16 @@
if( HAVE_common_sql )
message( STATUS "Creating target login-server_sql" )
set( SQL_LOGIN_HEADERS
- "${LOGIN_SOURCE_DIR}/account.h"
- "${LOGIN_SOURCE_DIR}/ipban.h"
- "${LOGIN_SOURCE_DIR}/login.h"
- "${LOGIN_SOURCE_DIR}/loginlog.h"
+ "${SQL_LOGIN_SOURCE_DIR}/account.h"
+ "${SQL_LOGIN_SOURCE_DIR}/ipban.h"
+ "${SQL_LOGIN_SOURCE_DIR}/login.h"
+ "${SQL_LOGIN_SOURCE_DIR}/loginlog.h"
)
set( SQL_LOGIN_SOURCES
- "${LOGIN_SOURCE_DIR}/account_sql.c"
- "${LOGIN_SOURCE_DIR}/ipban_sql.c"
- "${LOGIN_SOURCE_DIR}/login.c"
- "${LOGIN_SOURCE_DIR}/loginlog_sql.c"
+ "${SQL_LOGIN_SOURCE_DIR}/account_sql.c"
+ "${SQL_LOGIN_SOURCE_DIR}/ipban_sql.c"
+ "${SQL_LOGIN_SOURCE_DIR}/login.c"
+ "${SQL_LOGIN_SOURCE_DIR}/loginlog_sql.c"
)
set( DEPENDENCIES common_sql )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
@@ -34,9 +34,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_loginserver_sql )
endif()
-message( STATUS "Creating target login-server_sql - done" )
set( HAVE_login-server_sql ON CACHE BOOL "login-server_sql target is available" )
mark_as_advanced( HAVE_login-server_sql )
+set( TARGET_LIST ${TARGET_LIST} login-server_sql CACHE INTERNAL "" )
+message( STATUS "Creating target login-server_sql - done" )
else()
message( STATUS "Skipping target login-server_sql (requires common_sql)" )
unset( HAVE_login-server_sql CACHE )
diff --git a/src/login/txt/CMakeLists.txt b/src/login/txt/CMakeLists.txt
index 9d57103e9..195de250e 100644
--- a/src/login/txt/CMakeLists.txt
+++ b/src/login/txt/CMakeLists.txt
@@ -5,16 +5,16 @@
if( HAVE_common_base )
message( STATUS "Creating target login-server" )
set( TXT_LOGIN_HEADERS
- "${LOGIN_SOURCE_DIR}/account.h"
- "${LOGIN_SOURCE_DIR}/ipban.h"
- "${LOGIN_SOURCE_DIR}/login.h"
- "${LOGIN_SOURCE_DIR}/loginlog.h"
+ "${TXT_LOGIN_SOURCE_DIR}/account.h"
+ "${TXT_LOGIN_SOURCE_DIR}/ipban.h"
+ "${TXT_LOGIN_SOURCE_DIR}/login.h"
+ "${TXT_LOGIN_SOURCE_DIR}/loginlog.h"
)
set( TXT_LOGIN_SOURCES
- "${LOGIN_SOURCE_DIR}/account_txt.c"
- "${LOGIN_SOURCE_DIR}/ipban_txt.c"
- "${LOGIN_SOURCE_DIR}/login.c"
- "${LOGIN_SOURCE_DIR}/loginlog_txt.c"
+ "${TXT_LOGIN_SOURCE_DIR}/account_txt.c"
+ "${TXT_LOGIN_SOURCE_DIR}/ipban_txt.c"
+ "${TXT_LOGIN_SOURCE_DIR}/login.c"
+ "${TXT_LOGIN_SOURCE_DIR}/loginlog_txt.c"
)
set( DEPENDENCIES common_base )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
@@ -34,9 +34,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_loginserver_txt )
endif()
-message( STATUS "Creating target login-server - done" )
set( HAVE_login-server ON CACHE BOOL "login-server target is available" )
mark_as_advanced( HAVE_login-server )
+set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" )
+message( STATUS "Creating target login-server - done" )
else()
message( STATUS "Skipping target login-server (requires common_base)" )
unset( HAVE_login-server CACHE )
diff --git a/src/map/CMakeLists.txt b/src/map/CMakeLists.txt
index 9199702be..1d82fc2ca 100644
--- a/src/map/CMakeLists.txt
+++ b/src/map/CMakeLists.txt
@@ -2,7 +2,9 @@
#
# setup
#
-set( MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
+set( MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+set( TXT_MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+set( SQL_MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
#
diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt
index 74598423a..ae16148d4 100644
--- a/src/map/sql/CMakeLists.txt
+++ b/src/map/sql/CMakeLists.txt
@@ -5,77 +5,77 @@
if( HAVE_common_sql )
message( STATUS "Creating target map-server_sql" )
set( SQL_MAP_HEADERS
- "${MAP_SOURCE_DIR}/atcommand.h"
- "${MAP_SOURCE_DIR}/battle.h"
- "${MAP_SOURCE_DIR}/battleground.h"
- "${MAP_SOURCE_DIR}/buyingstore.h"
- "${MAP_SOURCE_DIR}/chat.h"
- "${MAP_SOURCE_DIR}/chrif.h"
- "${MAP_SOURCE_DIR}/clif.h"
- "${MAP_SOURCE_DIR}/date.h"
- "${MAP_SOURCE_DIR}/duel.h"
- "${MAP_SOURCE_DIR}/guild.h"
- "${MAP_SOURCE_DIR}/homunculus.h"
- "${MAP_SOURCE_DIR}/instance.h"
- "${MAP_SOURCE_DIR}/intif.h"
- "${MAP_SOURCE_DIR}/itemdb.h"
- "${MAP_SOURCE_DIR}/log.h"
- "${MAP_SOURCE_DIR}/mail.h"
- "${MAP_SOURCE_DIR}/map.h"
- "${MAP_SOURCE_DIR}/mapreg.h"
- "${MAP_SOURCE_DIR}/mercenary.h"
- "${MAP_SOURCE_DIR}/mob.h"
- "${MAP_SOURCE_DIR}/npc.h"
- "${MAP_SOURCE_DIR}/party.h"
- "${MAP_SOURCE_DIR}/path.h"
- "${MAP_SOURCE_DIR}/pc.h"
- "${MAP_SOURCE_DIR}/pet.h"
- "${MAP_SOURCE_DIR}/quest.h"
- "${MAP_SOURCE_DIR}/script.h"
- "${MAP_SOURCE_DIR}/searchstore.h"
- "${MAP_SOURCE_DIR}/skill.h"
- "${MAP_SOURCE_DIR}/status.h"
- "${MAP_SOURCE_DIR}/storage.h"
- "${MAP_SOURCE_DIR}/trade.h"
- "${MAP_SOURCE_DIR}/unit.h"
- "${MAP_SOURCE_DIR}/vending.h"
+ "${SQL_MAP_SOURCE_DIR}/atcommand.h"
+ "${SQL_MAP_SOURCE_DIR}/battle.h"
+ "${SQL_MAP_SOURCE_DIR}/battleground.h"
+ "${SQL_MAP_SOURCE_DIR}/buyingstore.h"
+ "${SQL_MAP_SOURCE_DIR}/chat.h"
+ "${SQL_MAP_SOURCE_DIR}/chrif.h"
+ "${SQL_MAP_SOURCE_DIR}/clif.h"
+ "${SQL_MAP_SOURCE_DIR}/date.h"
+ "${SQL_MAP_SOURCE_DIR}/duel.h"
+ "${SQL_MAP_SOURCE_DIR}/guild.h"
+ "${SQL_MAP_SOURCE_DIR}/homunculus.h"
+ "${SQL_MAP_SOURCE_DIR}/instance.h"
+ "${SQL_MAP_SOURCE_DIR}/intif.h"
+ "${SQL_MAP_SOURCE_DIR}/itemdb.h"
+ "${SQL_MAP_SOURCE_DIR}/log.h"
+ "${SQL_MAP_SOURCE_DIR}/mail.h"
+ "${SQL_MAP_SOURCE_DIR}/map.h"
+ "${SQL_MAP_SOURCE_DIR}/mapreg.h"
+ "${SQL_MAP_SOURCE_DIR}/mercenary.h"
+ "${SQL_MAP_SOURCE_DIR}/mob.h"
+ "${SQL_MAP_SOURCE_DIR}/npc.h"
+ "${SQL_MAP_SOURCE_DIR}/party.h"
+ "${SQL_MAP_SOURCE_DIR}/path.h"
+ "${SQL_MAP_SOURCE_DIR}/pc.h"
+ "${SQL_MAP_SOURCE_DIR}/pet.h"
+ "${SQL_MAP_SOURCE_DIR}/quest.h"
+ "${SQL_MAP_SOURCE_DIR}/script.h"
+ "${SQL_MAP_SOURCE_DIR}/searchstore.h"
+ "${SQL_MAP_SOURCE_DIR}/skill.h"
+ "${SQL_MAP_SOURCE_DIR}/status.h"
+ "${SQL_MAP_SOURCE_DIR}/storage.h"
+ "${SQL_MAP_SOURCE_DIR}/trade.h"
+ "${SQL_MAP_SOURCE_DIR}/unit.h"
+ "${SQL_MAP_SOURCE_DIR}/vending.h"
)
set( SQL_MAP_SOURCES
- "${MAP_SOURCE_DIR}/atcommand.c"
- "${MAP_SOURCE_DIR}/battle.c"
- "${MAP_SOURCE_DIR}/battleground.c"
- "${MAP_SOURCE_DIR}/buyingstore.c"
- "${MAP_SOURCE_DIR}/chat.c"
- "${MAP_SOURCE_DIR}/chrif.c"
- "${MAP_SOURCE_DIR}/clif.c"
- "${MAP_SOURCE_DIR}/date.c"
- "${MAP_SOURCE_DIR}/duel.c"
- "${MAP_SOURCE_DIR}/guild.c"
- "${MAP_SOURCE_DIR}/homunculus.c"
- "${MAP_SOURCE_DIR}/instance.c"
- "${MAP_SOURCE_DIR}/intif.c"
- "${MAP_SOURCE_DIR}/itemdb.c"
- "${MAP_SOURCE_DIR}/log.c"
- "${MAP_SOURCE_DIR}/mail.c"
- "${MAP_SOURCE_DIR}/map.c"
- "${MAP_SOURCE_DIR}/mapreg_sql.c"
- "${MAP_SOURCE_DIR}/mercenary.c"
- "${MAP_SOURCE_DIR}/mob.c"
- "${MAP_SOURCE_DIR}/npc.c"
- "${MAP_SOURCE_DIR}/npc_chat.c"
- "${MAP_SOURCE_DIR}/party.c"
- "${MAP_SOURCE_DIR}/path.c"
- "${MAP_SOURCE_DIR}/pc.c"
- "${MAP_SOURCE_DIR}/pet.c"
- "${MAP_SOURCE_DIR}/quest.c"
- "${MAP_SOURCE_DIR}/script.c"
- "${MAP_SOURCE_DIR}/searchstore.c"
- "${MAP_SOURCE_DIR}/skill.c"
- "${MAP_SOURCE_DIR}/status.c"
- "${MAP_SOURCE_DIR}/storage.c"
- "${MAP_SOURCE_DIR}/trade.c"
- "${MAP_SOURCE_DIR}/unit.c"
- "${MAP_SOURCE_DIR}/vending.c"
+ "${SQL_MAP_SOURCE_DIR}/atcommand.c"
+ "${SQL_MAP_SOURCE_DIR}/battle.c"
+ "${SQL_MAP_SOURCE_DIR}/battleground.c"
+ "${SQL_MAP_SOURCE_DIR}/buyingstore.c"
+ "${SQL_MAP_SOURCE_DIR}/chat.c"
+ "${SQL_MAP_SOURCE_DIR}/chrif.c"
+ "${SQL_MAP_SOURCE_DIR}/clif.c"
+ "${SQL_MAP_SOURCE_DIR}/date.c"
+ "${SQL_MAP_SOURCE_DIR}/duel.c"
+ "${SQL_MAP_SOURCE_DIR}/guild.c"
+ "${SQL_MAP_SOURCE_DIR}/homunculus.c"
+ "${SQL_MAP_SOURCE_DIR}/instance.c"
+ "${SQL_MAP_SOURCE_DIR}/intif.c"
+ "${SQL_MAP_SOURCE_DIR}/itemdb.c"
+ "${SQL_MAP_SOURCE_DIR}/log.c"
+ "${SQL_MAP_SOURCE_DIR}/mail.c"
+ "${SQL_MAP_SOURCE_DIR}/map.c"
+ "${SQL_MAP_SOURCE_DIR}/mapreg_sql.c"
+ "${SQL_MAP_SOURCE_DIR}/mercenary.c"
+ "${SQL_MAP_SOURCE_DIR}/mob.c"
+ "${SQL_MAP_SOURCE_DIR}/npc.c"
+ "${SQL_MAP_SOURCE_DIR}/npc_chat.c"
+ "${SQL_MAP_SOURCE_DIR}/party.c"
+ "${SQL_MAP_SOURCE_DIR}/path.c"
+ "${SQL_MAP_SOURCE_DIR}/pc.c"
+ "${SQL_MAP_SOURCE_DIR}/pet.c"
+ "${SQL_MAP_SOURCE_DIR}/quest.c"
+ "${SQL_MAP_SOURCE_DIR}/script.c"
+ "${SQL_MAP_SOURCE_DIR}/searchstore.c"
+ "${SQL_MAP_SOURCE_DIR}/skill.c"
+ "${SQL_MAP_SOURCE_DIR}/status.c"
+ "${SQL_MAP_SOURCE_DIR}/storage.c"
+ "${SQL_MAP_SOURCE_DIR}/trade.c"
+ "${SQL_MAP_SOURCE_DIR}/unit.c"
+ "${SQL_MAP_SOURCE_DIR}/vending.c"
)
set( DEPENDENCIES common_sql )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
@@ -101,9 +101,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_mapserver_sql )
endif()
-message( STATUS "Creating target map-server_sql - done" )
set( HAVE_map-server_sql ON CACHE BOOL "map-server_sql target is available" )
mark_as_advanced( HAVE_map-server_sql )
+set( TARGET_LIST ${TARGET_LIST} map-server_sql CACHE INTERNAL "" )
+message( STATUS "Creating target map-server_sql - done" )
else()
message( STATUS "Skipping target map-server_sql (requires common_sql; optional PCRE)" )
unset( HAVE_map-server_sql CACHE )
diff --git a/src/map/txt/CMakeLists.txt b/src/map/txt/CMakeLists.txt
index d58866f96..4e3bfbb0c 100644
--- a/src/map/txt/CMakeLists.txt
+++ b/src/map/txt/CMakeLists.txt
@@ -5,77 +5,77 @@
if( HAVE_common_base )
message( STATUS "Creating target map-server" )
set( TXT_MAP_HEADERS
- "${MAP_SOURCE_DIR}/atcommand.h"
- "${MAP_SOURCE_DIR}/battle.h"
- "${MAP_SOURCE_DIR}/battleground.h"
- "${MAP_SOURCE_DIR}/buyingstore.h"
- "${MAP_SOURCE_DIR}/chat.h"
- "${MAP_SOURCE_DIR}/chrif.h"
- "${MAP_SOURCE_DIR}/clif.h"
- "${MAP_SOURCE_DIR}/date.h"
- "${MAP_SOURCE_DIR}/duel.h"
- "${MAP_SOURCE_DIR}/guild.h"
- "${MAP_SOURCE_DIR}/homunculus.h"
- "${MAP_SOURCE_DIR}/instance.h"
- "${MAP_SOURCE_DIR}/intif.h"
- "${MAP_SOURCE_DIR}/itemdb.h"
- "${MAP_SOURCE_DIR}/log.h"
- "${MAP_SOURCE_DIR}/mail.h"
- "${MAP_SOURCE_DIR}/map.h"
- "${MAP_SOURCE_DIR}/mapreg.h"
- "${MAP_SOURCE_DIR}/mercenary.h"
- "${MAP_SOURCE_DIR}/mob.h"
- "${MAP_SOURCE_DIR}/npc.h"
- "${MAP_SOURCE_DIR}/party.h"
- "${MAP_SOURCE_DIR}/path.h"
- "${MAP_SOURCE_DIR}/pc.h"
- "${MAP_SOURCE_DIR}/pet.h"
- "${MAP_SOURCE_DIR}/quest.h"
- "${MAP_SOURCE_DIR}/script.h"
- "${MAP_SOURCE_DIR}/searchstore.h"
- "${MAP_SOURCE_DIR}/skill.h"
- "${MAP_SOURCE_DIR}/status.h"
- "${MAP_SOURCE_DIR}/storage.h"
- "${MAP_SOURCE_DIR}/trade.h"
- "${MAP_SOURCE_DIR}/unit.h"
- "${MAP_SOURCE_DIR}/vending.h"
+ "${TXT_MAP_SOURCE_DIR}/atcommand.h"
+ "${TXT_MAP_SOURCE_DIR}/battle.h"
+ "${TXT_MAP_SOURCE_DIR}/battleground.h"
+ "${TXT_MAP_SOURCE_DIR}/buyingstore.h"
+ "${TXT_MAP_SOURCE_DIR}/chat.h"
+ "${TXT_MAP_SOURCE_DIR}/chrif.h"
+ "${TXT_MAP_SOURCE_DIR}/clif.h"
+ "${TXT_MAP_SOURCE_DIR}/date.h"
+ "${TXT_MAP_SOURCE_DIR}/duel.h"
+ "${TXT_MAP_SOURCE_DIR}/guild.h"
+ "${TXT_MAP_SOURCE_DIR}/homunculus.h"
+ "${TXT_MAP_SOURCE_DIR}/instance.h"
+ "${TXT_MAP_SOURCE_DIR}/intif.h"
+ "${TXT_MAP_SOURCE_DIR}/itemdb.h"
+ "${TXT_MAP_SOURCE_DIR}/log.h"
+ "${TXT_MAP_SOURCE_DIR}/mail.h"
+ "${TXT_MAP_SOURCE_DIR}/map.h"
+ "${TXT_MAP_SOURCE_DIR}/mapreg.h"
+ "${TXT_MAP_SOURCE_DIR}/mercenary.h"
+ "${TXT_MAP_SOURCE_DIR}/mob.h"
+ "${TXT_MAP_SOURCE_DIR}/npc.h"
+ "${TXT_MAP_SOURCE_DIR}/party.h"
+ "${TXT_MAP_SOURCE_DIR}/path.h"
+ "${TXT_MAP_SOURCE_DIR}/pc.h"
+ "${TXT_MAP_SOURCE_DIR}/pet.h"
+ "${TXT_MAP_SOURCE_DIR}/quest.h"
+ "${TXT_MAP_SOURCE_DIR}/script.h"
+ "${TXT_MAP_SOURCE_DIR}/searchstore.h"
+ "${TXT_MAP_SOURCE_DIR}/skill.h"
+ "${TXT_MAP_SOURCE_DIR}/status.h"
+ "${TXT_MAP_SOURCE_DIR}/storage.h"
+ "${TXT_MAP_SOURCE_DIR}/trade.h"
+ "${TXT_MAP_SOURCE_DIR}/unit.h"
+ "${TXT_MAP_SOURCE_DIR}/vending.h"
)
set( TXT_MAP_SOURCES
- "${MAP_SOURCE_DIR}/atcommand.c"
- "${MAP_SOURCE_DIR}/battle.c"
- "${MAP_SOURCE_DIR}/battleground.c"
- "${MAP_SOURCE_DIR}/buyingstore.c"
- "${MAP_SOURCE_DIR}/chat.c"
- "${MAP_SOURCE_DIR}/chrif.c"
- "${MAP_SOURCE_DIR}/clif.c"
- "${MAP_SOURCE_DIR}/date.c"
- "${MAP_SOURCE_DIR}/duel.c"
- "${MAP_SOURCE_DIR}/guild.c"
- "${MAP_SOURCE_DIR}/homunculus.c"
- "${MAP_SOURCE_DIR}/instance.c"
- "${MAP_SOURCE_DIR}/intif.c"
- "${MAP_SOURCE_DIR}/itemdb.c"
- "${MAP_SOURCE_DIR}/log.c"
- "${MAP_SOURCE_DIR}/mail.c"
- "${MAP_SOURCE_DIR}/map.c"
- "${MAP_SOURCE_DIR}/mapreg_txt.c"
- "${MAP_SOURCE_DIR}/mercenary.c"
- "${MAP_SOURCE_DIR}/mob.c"
- "${MAP_SOURCE_DIR}/npc.c"
- "${MAP_SOURCE_DIR}/npc_chat.c"
- "${MAP_SOURCE_DIR}/party.c"
- "${MAP_SOURCE_DIR}/path.c"
- "${MAP_SOURCE_DIR}/pc.c"
- "${MAP_SOURCE_DIR}/pet.c"
- "${MAP_SOURCE_DIR}/quest.c"
- "${MAP_SOURCE_DIR}/script.c"
- "${MAP_SOURCE_DIR}/searchstore.c"
- "${MAP_SOURCE_DIR}/skill.c"
- "${MAP_SOURCE_DIR}/status.c"
- "${MAP_SOURCE_DIR}/storage.c"
- "${MAP_SOURCE_DIR}/trade.c"
- "${MAP_SOURCE_DIR}/unit.c"
- "${MAP_SOURCE_DIR}/vending.c"
+ "${TXT_MAP_SOURCE_DIR}/atcommand.c"
+ "${TXT_MAP_SOURCE_DIR}/battle.c"
+ "${TXT_MAP_SOURCE_DIR}/battleground.c"
+ "${TXT_MAP_SOURCE_DIR}/buyingstore.c"
+ "${TXT_MAP_SOURCE_DIR}/chat.c"
+ "${TXT_MAP_SOURCE_DIR}/chrif.c"
+ "${TXT_MAP_SOURCE_DIR}/clif.c"
+ "${TXT_MAP_SOURCE_DIR}/date.c"
+ "${TXT_MAP_SOURCE_DIR}/duel.c"
+ "${TXT_MAP_SOURCE_DIR}/guild.c"
+ "${TXT_MAP_SOURCE_DIR}/homunculus.c"
+ "${TXT_MAP_SOURCE_DIR}/instance.c"
+ "${TXT_MAP_SOURCE_DIR}/intif.c"
+ "${TXT_MAP_SOURCE_DIR}/itemdb.c"
+ "${TXT_MAP_SOURCE_DIR}/log.c"
+ "${TXT_MAP_SOURCE_DIR}/mail.c"
+ "${TXT_MAP_SOURCE_DIR}/map.c"
+ "${TXT_MAP_SOURCE_DIR}/mapreg_txt.c"
+ "${TXT_MAP_SOURCE_DIR}/mercenary.c"
+ "${TXT_MAP_SOURCE_DIR}/mob.c"
+ "${TXT_MAP_SOURCE_DIR}/npc.c"
+ "${TXT_MAP_SOURCE_DIR}/npc_chat.c"
+ "${TXT_MAP_SOURCE_DIR}/party.c"
+ "${TXT_MAP_SOURCE_DIR}/path.c"
+ "${TXT_MAP_SOURCE_DIR}/pc.c"
+ "${TXT_MAP_SOURCE_DIR}/pet.c"
+ "${TXT_MAP_SOURCE_DIR}/quest.c"
+ "${TXT_MAP_SOURCE_DIR}/script.c"
+ "${TXT_MAP_SOURCE_DIR}/searchstore.c"
+ "${TXT_MAP_SOURCE_DIR}/skill.c"
+ "${TXT_MAP_SOURCE_DIR}/status.c"
+ "${TXT_MAP_SOURCE_DIR}/storage.c"
+ "${TXT_MAP_SOURCE_DIR}/trade.c"
+ "${TXT_MAP_SOURCE_DIR}/unit.c"
+ "${TXT_MAP_SOURCE_DIR}/vending.c"
)
set( DEPENDENCIES common_base )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
@@ -101,9 +101,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_mapserver_txt )
endif()
-message( STATUS "Creating target map-server - done" )
set( HAVE_map-server ON CACHE BOOL "map-server target is available" )
mark_as_advanced( HAVE_map-server )
+set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" )
+message( STATUS "Creating target map-server - done" )
else()
message( STATUS "Skipping target map-server (requires common_base; optional PCRE)" )
unset( HAVE_map-server CACHE )
diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt
index e45586915..df22e150a 100644
--- a/src/tool/CMakeLists.txt
+++ b/src/tool/CMakeLists.txt
@@ -33,9 +33,10 @@ if( WITH_COMPONENT_RUNTIME )
DESTINATION "."
COMPONENT Runtime_mapcache )
endif()
-message( STATUS "Creating target mapcache - done" )
set( HAVE_mapcache ON CACHE BOOL "mapcache target is available" )
mark_as_advanced( HAVE_mapcache )
+set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" )
+message( STATUS "Creating target mapcache - done" )
else()
message( STATUS "Skipping target mapcache (requires ZLIB)" )
unset( HAVE_mapcache CACHE )
diff --git a/src/txt-converter/CMakeLists.txt b/src/txt-converter/CMakeLists.txt
new file mode 100644
index 000000000..bd7d6f1b7
--- /dev/null
+++ b/src/txt-converter/CMakeLists.txt
@@ -0,0 +1,12 @@
+
+#
+# setup
+#
+set( CONVERTER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
+
+
+#
+# targets
+#
+add_subdirectory( login )
+add_subdirectory( char )
diff --git a/src/txt-converter/char/CMakeLists.txt b/src/txt-converter/char/CMakeLists.txt
new file mode 100644
index 000000000..dab0df76a
--- /dev/null
+++ b/src/txt-converter/char/CMakeLists.txt
@@ -0,0 +1,81 @@
+
+#
+# char-converter
+#
+if( WITH_MYSQL )
+message( STATUS "Creating target char-converter" )
+set( COMMON_HEADERS
+ ${COMMON_MINI_HEADERS}
+ "${COMMON_SOURCE_DIR}/mapindex.h"
+ "${COMMON_SOURCE_DIR}/sql.h"
+ "${COMMON_SOURCE_DIR}/timer.h"
+ )
+set( COMMON_SOURCES
+ ${COMMON_MINI_SOURCES}
+ "${COMMON_SOURCE_DIR}/mapindex.c"
+ "${COMMON_SOURCE_DIR}/sql.c"
+ "${COMMON_SOURCE_DIR}/timer.c"
+ )
+set( TXT_HEADERS
+ "${TXT_CHAR_SOURCE_DIR}/char.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_pet.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_storage.h"
+ "${TXT_CHAR_SOURCE_DIR}/inter.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_party.h"
+ "${TXT_CHAR_SOURCE_DIR}/int_guild.h"
+ )
+set( TXT_SOURCES
+ "${TXT_CHAR_SOURCE_DIR}/char.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_pet.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_storage.c"
+ "${TXT_CHAR_SOURCE_DIR}/inter.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_party.c"
+ "${TXT_CHAR_SOURCE_DIR}/int_guild.c"
+ )
+set( SQL_HEADERS
+ "${SQL_CHAR_SOURCE_DIR}/char.h"
+ "${SQL_CHAR_SOURCE_DIR}/int_pet.h"
+ "${SQL_CHAR_SOURCE_DIR}/int_storage.h"
+ "${SQL_CHAR_SOURCE_DIR}/inter.h"
+ "${SQL_CHAR_SOURCE_DIR}/int_party.h"
+ "${SQL_CHAR_SOURCE_DIR}/int_guild.h"
+ "${SQL_CHAR_SOURCE_DIR}/int_mercenary.h"
+ )
+set( SQL_SOURCES
+ "${SQL_CHAR_SOURCE_DIR}/char.c"
+ "${SQL_CHAR_SOURCE_DIR}/int_pet.c"
+ "${SQL_CHAR_SOURCE_DIR}/int_storage.c"
+ "${SQL_CHAR_SOURCE_DIR}/inter.c"
+ "${SQL_CHAR_SOURCE_DIR}/int_party.c"
+ "${SQL_CHAR_SOURCE_DIR}/int_guild.c"
+ "${SQL_CHAR_SOURCE_DIR}/int_mercenary.c"
+ )
+set( CONVERTER_SOURCES
+ "${CONVERTER_SOURCE_DIR}/char-converter.c"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS} TXT_SQL_CONVERT )
+set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${TXT_HEADERS} ${TXT_SOURCES} ${SQL_HEADERS} ${SQL_SOURCES} ${CONVERTER_SOURCES} )
+source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )
+source_group( txt FILES ${TXT_HEADERS} ${TXT_SOURCES} )
+source_group( sql FILES ${SQL_HEADERS} ${SQL_SOURCES} )
+source_group( converter FILES ${CONVERTER_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_executable( char-converter ${SOURCE_FILES} )
+target_link_libraries( char-converter ${LIBRARIES} )
+set_target_properties( char-converter PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" )
+if( WITH_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_charconverter DESCRIPTION "char-converter" DISPLAY_NAME "char-converter" GROUP Runtime )
+ install( TARGETS char-converter
+ DESTINATION "tools"
+ COMPONENT Runtime_charconverter )
+endif()
+set( HAVE_char-converter ON CACHE BOOL "char-converter target is available" )
+mark_as_advanced( HAVE_char-converter )
+set( TARGET_LIST ${TARGET_LIST} char-converter CACHE INTERNAL "" )
+message( STATUS "Creating target char-converter - done" )
+else()
+message( STATUS "Skipping target char-converter (requires MYSQL)" )
+unset( HAVE_char-converter CACHE )
+endif()
diff --git a/src/txt-converter/login/CMakeLists.txt b/src/txt-converter/login/CMakeLists.txt
new file mode 100644
index 000000000..8ae7665f4
--- /dev/null
+++ b/src/txt-converter/login/CMakeLists.txt
@@ -0,0 +1,65 @@
+
+#
+# login-converter
+#
+if( WITH_MYSQL )
+message( STATUS "Creating target login-converter" )
+set( COMMON_HEADERS
+ ${COMMON_MINI_HEADERS}
+ "${COMMON_SOURCE_DIR}/db.h"
+ "${COMMON_SOURCE_DIR}/ers.h"
+ "${COMMON_SOURCE_DIR}/lock.h"
+ "${COMMON_SOURCE_DIR}/sql.h"
+ "${COMMON_SOURCE_DIR}/timer.h"
+ "${COMMON_SOURCE_DIR}/utils.h"
+ )
+set( COMMON_SOURCES
+ ${COMMON_MINI_SOURCES}
+ "${COMMON_SOURCE_DIR}/db.c"
+ "${COMMON_SOURCE_DIR}/ers.c"
+ "${COMMON_SOURCE_DIR}/lock.c"
+ "${COMMON_SOURCE_DIR}/sql.c"
+ "${COMMON_SOURCE_DIR}/timer.c"
+ "${COMMON_SOURCE_DIR}/utils.c"
+ )
+set( TXT_HEADERS
+ "${TXT_LOGIN_SOURCE_DIR}/account.h"
+ )
+set( TXT_SOURCES
+ "${TXT_LOGIN_SOURCE_DIR}/account_txt.c"
+ )
+set( SQL_HEADERS
+ "${SQL_LOGIN_SOURCE_DIR}/account.h"
+ )
+set( SQL_SOURCES
+ "${SQL_LOGIN_SOURCE_DIR}/account_sql.c"
+ )
+set( CONVERTER_SOURCES
+ "${CONVERTER_SOURCE_DIR}/login-converter.c"
+ )
+set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} )
+set( DEFINITIONS ${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS} WITH_TXT WITH_SQL )
+set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${TXT_HEADERS} ${TXT_SOURCES} ${SQL_HEADERS} ${SQL_SOURCES} ${CONVERTER_SOURCES} )
+source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )
+source_group( txt FILES ${TXT_HEADERS} ${TXT_SOURCES} )
+source_group( sql FILES ${SQL_HEADERS} ${SQL_SOURCES} )
+source_group( converter FILES ${CONVERTER_SOURCES} )
+include_directories( ${INCLUDE_DIRS} )
+add_executable( login-converter ${SOURCE_FILES} )
+target_link_libraries( login-converter ${LIBRARIES} )
+set_target_properties( login-converter PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" )
+if( WITH_COMPONENT_RUNTIME )
+ cpack_add_component( Runtime_loginconverter DESCRIPTION "login-converter" DISPLAY_NAME "login-converter" GROUP Runtime )
+ install( TARGETS login-converter
+ DESTINATION "tools"
+ COMPONENT Runtime_loginconverter )
+endif()
+set( HAVE_login-converter ON CACHE BOOL "login-converter target is available" )
+mark_as_advanced( HAVE_login-converter )
+set( TARGET_LIST ${TARGET_LIST} login-converter CACHE INTERNAL "" )
+message( STATUS "Creating target login-converter - done" )
+else()
+message( STATUS "Skipping target login-converter (requires MYSQL)" )
+unset( HAVE_login-converter CACHE )
+endif()