summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3rdparty/CMakeLists.txt1
-rw-r--r--3rdparty/libconfig/CMakeLists.txt26
-rw-r--r--src/char/CMakeLists.txt2
-rw-r--r--src/common/CMakeLists.txt5
-rw-r--r--src/login/sql/CMakeLists.txt2
-rw-r--r--src/map/sql/CMakeLists.txt6
-rw-r--r--src/tool/CMakeLists.txt2
7 files changed, 37 insertions, 7 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index ebbac481a..c64c8ccd1 100644
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -48,6 +48,7 @@ endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM )
set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake CACHE INTERNAL "" )
+add_subdirectory( libconfig )
add_subdirectory( msinttypes )
add_subdirectory( mt19937ar )
add_subdirectory( mysql )
diff --git a/3rdparty/libconfig/CMakeLists.txt b/3rdparty/libconfig/CMakeLists.txt
new file mode 100644
index 000000000..e98b46a5c
--- /dev/null
+++ b/3rdparty/libconfig/CMakeLists.txt
@@ -0,0 +1,26 @@
+
+find_path( LIBCONFIG_INCLUDE_DIRS "libconfig.h"
+ PATHS "${CMAKE_CURRENT_SOURCE_DIR}"
+ NO_DEFAULT_PATH )
+find_path( LIBCONFIG_SOURCE_DIR "libconfig.c"
+ PATHS "${CMAKE_CURRENT_SOURCE_DIR}"
+ NO_DEFAULT_PATH )
+mark_as_advanced( LIBCONFIG_INCLUDE_DIRS )
+mark_as_advanced( LIBCONFIG_SOURCE_DIR )
+
+set( LIBCONFIG_HEADERS
+ "${CMAKE_CURRENT_SOURCE_DIR}/grammar.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/parsectx.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/scanner.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/wincompat.h"
+ CACHE INTERNAL "libconfig headers" )
+set( LIBCONFIG_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/grammar.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/scanner.c"
+ "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.c"
+ CACHE INTERNAL "libconfig sources" ) \ No newline at end of file
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt
index 823939393..ccb718141 100644
--- a/src/char/CMakeLists.txt
+++ b/src/char/CMakeLists.txt
@@ -38,7 +38,7 @@ set( SQL_CHAR_SOURCES
)
set( DEPENDENCIES common_sql )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${LIBCONFIG_INCLUDE_DIRS} )
set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} )
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3f04e5b04..d30a4e714 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -32,7 +32,6 @@ set( COMMON_ALL_HEADERS
"${COMMON_SOURCE_DIR}/cbasetypes.h"
"${COMMON_SOURCE_DIR}/mmo.h"
"${COMMON_SOURCE_DIR}/plugin.h"
- "${COMMON_SOURCE_DIR}/version.h"
)
set( COMMON_MINI_HEADERS
@@ -58,6 +57,7 @@ if( WITH_ZLIB )
message( STATUS "Creating target common_base" )
set( COMMON_BASE_HEADERS
${COMMON_ALL_HEADERS}
+ "${COMMON_SOURCE_DIR}/conf.h"
"${COMMON_SOURCE_DIR}/core.h"
"${COMMON_SOURCE_DIR}/db.h"
"${COMMON_SOURCE_DIR}/des.h"
@@ -77,6 +77,7 @@ set( COMMON_BASE_HEADERS
"${COMMON_SOURCE_DIR}/utils.h"
CACHE INTERNAL "common_base headers" )
set( COMMON_BASE_SOURCES
+ "${COMMON_SOURCE_DIR}/conf.c"
"${COMMON_SOURCE_DIR}/core.c"
"${COMMON_SOURCE_DIR}/db.c"
"${COMMON_SOURCE_DIR}/des.c"
@@ -96,7 +97,7 @@ set( COMMON_BASE_SOURCES
"${COMMON_SOURCE_DIR}/utils.c"
CACHE INTERNAL "common_base sources" )
set( LIBRARIES ${ZLIB_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${LIBCONFIG_INCLUDE_DIRS} )
set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
set( SOURCE_FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} )
source_group( mt19937ar FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} )
diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt
index f452823ec..f1f7c7f23 100644
--- a/src/login/sql/CMakeLists.txt
+++ b/src/login/sql/CMakeLists.txt
@@ -18,7 +18,7 @@ set( SQL_LOGIN_SOURCES
)
set( DEPENDENCIES common_sql )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${LIBCONFIG_INCLUDE_DIRS} )
set( DEFINITIONS "${GLOBAL_DEFINITIONS} -DWITH_SQL" )
set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} )
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt
index eadddb2a0..20383e320 100644
--- a/src/map/sql/CMakeLists.txt
+++ b/src/map/sql/CMakeLists.txt
@@ -29,6 +29,7 @@ set( SQL_MAP_HEADERS
"${SQL_MAP_SOURCE_DIR}/party.h"
"${SQL_MAP_SOURCE_DIR}/path.h"
"${SQL_MAP_SOURCE_DIR}/pc.h"
+ "${SQL_MAP_SOURCE_DIR}/pc_groups.h"
"${SQL_MAP_SOURCE_DIR}/pet.h"
"${SQL_MAP_SOURCE_DIR}/quest.h"
"${SQL_MAP_SOURCE_DIR}/script.h"
@@ -66,6 +67,7 @@ set( SQL_MAP_SOURCES
"${SQL_MAP_SOURCE_DIR}/party.c"
"${SQL_MAP_SOURCE_DIR}/path.c"
"${SQL_MAP_SOURCE_DIR}/pc.c"
+ "${SQL_MAP_SOURCE_DIR}/pc_groups.c"
"${SQL_MAP_SOURCE_DIR}/pet.c"
"${SQL_MAP_SOURCE_DIR}/quest.c"
"${SQL_MAP_SOURCE_DIR}/script.c"
@@ -79,7 +81,7 @@ set( SQL_MAP_SOURCES
)
set( DEPENDENCIES common_sql )
set( LIBRARIES ${GLOBAL_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${LIBCONFIG_INCLUDE_DIRS} )
set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
if( WITH_PCRE )
message( STATUS "Enabled PCRE code" )
@@ -89,7 +91,7 @@ if( WITH_PCRE )
else()
message( STATUS "Disabled PCRE code" )
endif()
-set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
+set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} ${LIBCONFIG_HEADERS} ${LIBCONFIG_SOURCES} )
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
include_directories( ${INCLUDE_DIRS} )
diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt
index afd066373..76840a367 100644
--- a/src/tool/CMakeLists.txt
+++ b/src/tool/CMakeLists.txt
@@ -25,7 +25,7 @@ set( MAPCACHE_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/mapcache.c"
)
set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} )
-set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} )
+set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${LIBCONFIG_INCLUDE_DIRS} )
set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS}" )
set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${MAPCACHE_SOURCES} )
source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} )