From 0f2df97d2391af3d5941643f8af8c832e2113bf6 Mon Sep 17 00:00:00 2001 From: Matt Raykowski Date: Thu, 13 May 2010 15:43:50 -0500 Subject: [PATCH] Update: #842 More EGS CMake updates, one linker left. --- code/ryzom/CMakeLists.txt | 2 +- code/ryzom/server/src/CMakeLists.txt | 3 ++ code/ryzom/server/src/ai_share/CMakeLists.txt | 27 ++++++++++++++++++ .../src/entities_game_service/CMakeLists.txt | 21 ++++++++++++-- .../src/gameplay_module_lib/CMakeLists.txt | 27 ++++++++++++++++++ code/ryzom/server/src/pd_lib/CMakeLists.txt | 28 +++++++++++++++++++ code/ryzom/server/src/pd_lib/pds_types.h | 9 ++++++ .../server/src/server_share/CMakeLists.txt | 2 +- 8 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 code/ryzom/server/src/ai_share/CMakeLists.txt create mode 100644 code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt create mode 100644 code/ryzom/server/src/pd_lib/CMakeLists.txt diff --git a/code/ryzom/CMakeLists.txt b/code/ryzom/CMakeLists.txt index 51fa7a086..19fda9ef5 100644 --- a/code/ryzom/CMakeLists.txt +++ b/code/ryzom/CMakeLists.txt @@ -117,6 +117,6 @@ IF(WITH_TOOLS) ENDIF(WITH_TOOLS) IF(WITH_SERVER) - FIND_PACKAGE(MySQL) + FIND_PACKAGE(MySQL REQUIRED) ADD_SUBDIRECTORY(server) ENDIF(WITH_SERVER) diff --git a/code/ryzom/server/src/CMakeLists.txt b/code/ryzom/server/src/CMakeLists.txt index e92181e31..754120336 100644 --- a/code/ryzom/server/src/CMakeLists.txt +++ b/code/ryzom/server/src/CMakeLists.txt @@ -1,5 +1,8 @@ ADD_SUBDIRECTORY(admin_modules) ADD_SUBDIRECTORY(server_share) +ADD_SUBDIRECTORY(ai_share) +ADD_SUBDIRECTORY(gameplay_module_lib) +ADD_SUBDIRECTORY(pd_lib) ADD_SUBDIRECTORY(frontend_service) ADD_SUBDIRECTORY(entities_game_service) diff --git a/code/ryzom/server/src/ai_share/CMakeLists.txt b/code/ryzom/server/src/ai_share/CMakeLists.txt new file mode 100644 index 000000000..0d1b59440 --- /dev/null +++ b/code/ryzom/server/src/ai_share/CMakeLists.txt @@ -0,0 +1,27 @@ +FILE(GLOB SRC *.cpp *.h) + +# Filter out the source files not actually compiled. +#LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp) + +IF(WIN32) + ADD_LIBRARY(ai_share STATIC ${SRC}) +ELSE(WIN32) + ADD_LIBRARY(ai_share SHARED ${SRC}) +ENDIF(WIN32) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) +TARGET_LINK_LIBRARIES(ai_share ${NELMISC_LIBRARY} ${NELNET_LIBRARY} ${NELGEORGES_LIBRARY} ${NELPACS_LIBRARY}) +SET_TARGET_PROPERTIES(ai_share PROPERTIES VERSION ${NL_VERSION}) + +IF(WIN32) + SET_TARGET_PROPERTIES(ai_share + PROJECT_LABEL "Library: AI Share" + DEBUG_POSTFIX "_d" + RELEASE_POSTFIX "_r" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrt" + LINK_FLAGS_RELEASE "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrtd") +ENDIF(WIN32) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) + +INSTALL(TARGETS ai_share LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/server/src/entities_game_service/CMakeLists.txt b/code/ryzom/server/src/entities_game_service/CMakeLists.txt index 081bccb54..ebda0556a 100644 --- a/code/ryzom/server/src/entities_game_service/CMakeLists.txt +++ b/code/ryzom/server/src/entities_game_service/CMakeLists.txt @@ -1,7 +1,7 @@ FILE(GLOB SRC *.cpp *.h backward_compatibility/*.h backward_compatibility/*.cpp - building_manager - character_structure + building_manager/*.h building_manager/*.cpp + character_structure/*.h character_structure/*.cpp creature_manager/*.h creature_manager/*.cpp egs_sheets/*.h egs_sheets/*.cpp entity_manager/*.h entity_manager/*.cpp @@ -26,6 +26,8 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/ai_pet_interface.cpp ${CMAKE_CURRENT_SOURCE_DIR}/egs_static_continent.h ${CMAKE_CURRENT_SOURCE_DIR}/shutdown_handler.cpp ${CMAKE_CURRENT_SOURCE_DIR}/shutdown_handler.h + ${CMAKE_CURRENT_SOURCE_DIR}/building_manager/room.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/building_manager/room.h ${CMAKE_CURRENT_SOURCE_DIR}/phrase_manager/combat_bleed_effect.cpp ${CMAKE_CURRENT_SOURCE_DIR}/phrase_manager/combat_bleed_effect.h ${CMAKE_CURRENT_SOURCE_DIR}/phrase_manager/combat_stun_effect.cpp @@ -41,7 +43,20 @@ LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/ai_pet_interface.cpp ADD_EXECUTABLE(entities_game_service ${SRC}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/server/src ${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(entities_game_service admin_modules game_share server_share ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY} ${NELGEORGES_LIBRARY} ${NELLIGO_LIBRARY}) +TARGET_LINK_LIBRARIES(entities_game_service admin_modules + game_share + server_share + ai_share + pd_lib + gameplay_module_lib + ${PLATFORM_LINKFLAGS} + ${LIBXML2_LIBRARIES} + ${MYSQL_LIBRARIES} + ${ZLIB_LIBRARIES} + ${NELMISC_LIBRARY} + ${NELNET_LIBRARY} + ${NELGEORGES_LIBRARY} + ${NELLIGO_LIBRARY}) IF(WIN32) SET_TARGET_PROPERTIES(entities_game_service PROPERTIES diff --git a/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt b/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt new file mode 100644 index 000000000..9ea526664 --- /dev/null +++ b/code/ryzom/server/src/gameplay_module_lib/CMakeLists.txt @@ -0,0 +1,27 @@ +FILE(GLOB SRC *.cpp *.h) + +# Filter out the source files not actually compiled. +#LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/Backup\ 1\ of\ admin_modules.cpp) + +IF(WIN32) + ADD_LIBRARY(gameplay_module_lib STATIC ${SRC}) +ELSE(WIN32) + ADD_LIBRARY(gameplay_module_lib SHARED ${SRC}) +ENDIF(WIN32) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) +TARGET_LINK_LIBRARIES(gameplay_module_lib ${NELMISC_LIBRARY}) +SET_TARGET_PROPERTIES(gameplay_module_lib PROPERTIES VERSION ${NL_VERSION}) + +IF(WIN32) + SET_TARGET_PROPERTIES(gameplay_module_lib + PROJECT_LABEL "Library: Gameplay Module" + DEBUG_POSTFIX "_d" + RELEASE_POSTFIX "_r" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrt" + LINK_FLAGS_RELEASE "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrtd") +ENDIF(WIN32) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) + +INSTALL(TARGETS gameplay_module_lib LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/server/src/pd_lib/CMakeLists.txt b/code/ryzom/server/src/pd_lib/CMakeLists.txt new file mode 100644 index 000000000..f2f7cd80a --- /dev/null +++ b/code/ryzom/server/src/pd_lib/CMakeLists.txt @@ -0,0 +1,28 @@ +FILE(GLOB SRC *.cpp *.h) + +# Filter out the source files not actually compiled. +LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/pd_string_manager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/pd_string_manager.h) + +IF(WIN32) + ADD_LIBRARY(pd_lib STATIC ${SRC}) +ELSE(WIN32) + ADD_LIBRARY(pd_lib SHARED ${SRC}) +ENDIF(WIN32) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) +TARGET_LINK_LIBRARIES(pd_lib ${NELMISC_LIBRARY}) +SET_TARGET_PROPERTIES(pd_lib PROPERTIES VERSION ${NL_VERSION}) + +IF(WIN32) + SET_TARGET_PROPERTIES(pd_lib + PROJECT_LABEL "Library: PD Lib" + DEBUG_POSTFIX "_d" + RELEASE_POSTFIX "_r" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrt" + LINK_FLAGS_RELEASE "/NODEFAULTLIB:libc;libcmt;libcmtd;msvcrtd") +ENDIF(WIN32) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) + +INSTALL(TARGETS pd_lib LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) diff --git a/code/ryzom/server/src/pd_lib/pds_types.h b/code/ryzom/server/src/pd_lib/pds_types.h index 38cb01536..0bd0d77d8 100644 --- a/code/ryzom/server/src/pd_lib/pds_types.h +++ b/code/ryzom/server/src/pd_lib/pds_types.h @@ -333,6 +333,9 @@ inline bool isIntegerType(TDataType type) CHECK_IS_INTEGER_TYPE(uint64) CHECK_IS_INTEGER_TYPE(sint64) CHECK_IS_INTEGER_TYPE(dimension) + default: + return false; + break; } return false; @@ -346,6 +349,9 @@ inline bool isFloatType(TDataType type) { CHECK_IS_FLOAT_TYPE(float) CHECK_IS_FLOAT_TYPE(double) + default: + return false; + break; } return false; @@ -433,6 +439,9 @@ inline bool checkDataTypeCompatible(TDataType from, TDataType into) case PDS_double: return isIntegerType(into) || isFloatType(into); break; + default: + return false; + break; } return false; diff --git a/code/ryzom/server/src/server_share/CMakeLists.txt b/code/ryzom/server/src/server_share/CMakeLists.txt index 347ccc1b4..1b76d0e95 100644 --- a/code/ryzom/server/src/server_share/CMakeLists.txt +++ b/code/ryzom/server/src/server_share/CMakeLists.txt @@ -10,7 +10,7 @@ ELSE(WIN32) ENDIF(WIN32) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NEL_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(server_share ${NELMISC_LIBRARY} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES}) +TARGET_LINK_LIBRARIES(server_share ${NELMISC_LIBRARY} ${NELPACS_LIBRARY} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES}) SET_TARGET_PROPERTIES(server_share PROPERTIES VERSION ${NL_VERSION}) IF(WIN32)