From 7528f35fdfd082fee7738344f89501ccabc9bf39 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 20 Sep 2010 21:50:45 +0200 Subject: [PATCH] Changed: NeLNS projects updated --- code/nelns/CMakeLists.txt | 89 ------------------- .../admin_executor_service/CMakeLists.txt | 21 +++-- code/nelns/admin_service/CMakeLists.txt | 24 +++-- code/nelns/login_service/CMakeLists.txt | 24 +++-- .../nel_launcher_qt/CMakeLists.txt | 17 +++- .../nel_launcher_windows_ext2/CMakeLists.txt | 10 ++- code/nelns/naming_service/CMakeLists.txt | 22 +++-- code/nelns/welcome_service/CMakeLists.txt | 18 ++-- 8 files changed, 86 insertions(+), 139 deletions(-) diff --git a/code/nelns/CMakeLists.txt b/code/nelns/CMakeLists.txt index 398e28911..5bd88cb51 100644 --- a/code/nelns/CMakeLists.txt +++ b/code/nelns/CMakeLists.txt @@ -1,75 +1,3 @@ -#----------------------------------------------------------------------------- -# -# NeLNS -# Author: Nevrax -# -# Notes: -# * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path -# * Changing NeL prefix: add -DNEL_PREFIX_PATH:PATH=/my/nel/install -# * Changing specific install location variables: -# * NL_ETC_PREFIX (default: $CMAKE_INSTALL_PREFIX/etc) -# * NL_SHARE_PREFIX (default: $CMAKE_INSTALL_PREFIX/share) -# * NL_BIN_PREFIX (default: $CMAKE_INSTALL_PREFIX/bin) -# * NL_SBIN_PREFIX (default: $CMAKE_INSTALL_PREFIX/sbin) -# * Updating version: update header (above) but also update NL_VERSION below. -# * To build binary archive, use the 'package' target. -# To build source archive, use the 'package_source' target. -# -#----------------------------------------------------------------------------- - -#----------------------------------------------------------------------------- -# Load some macros. -SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") -INCLUDE(CMakeModules/nel.cmake) - -#----------------------------------------------------------------------------- -# Force out of source builds. -CHECK_OUT_OF_SOURCE() - -IF(WIN32) - SET(CMAKE_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/../3rdParty/include;${CMAKE_INCLUDE_PATH}") - SET(CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/../3rdParty/lib;${CMAKE_INCLUDE_PATH}") - IF(NOT DEFINED ENV{QTDIR}) - SET(ENV{QTDIR} "c:/qt/4.5.0") - ENDIF(NOT DEFINED ENV{QTDIR}) -ENDIF(WIN32) - -IF(DEFINED NEL_PREFIX_PATH) - SET(CMAKE_INCLUDE_PATH "${NEL_PREFIX_PATH}/include;${CMAKE_INCLUDE_PATH}") - SET(CMAKE_LIBRARY_PATH "${NEL_PREFIX_PATH}/lib;${CMAKE_LIBRARY_PATH}") -ENDIF(DEFINED NEL_PREFIX_PATH) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -PROJECT(NeLNS CXX C) -SET(NL_VERSION_MAJOR 0) -SET(NL_VERSION_MINOR 7) -SET(NL_VERSION_PATCH 0) -SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") - -#----------------------------------------------------------------------------- -# Redirect output files -SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) - -#----------------------------------------------------------------------------- -# Set CMake 2.6 Policies. -IF(COMMAND cmake_policy) - # Works around warnings libraries linked against that don't - # have absolute paths (e.g. -lpthreads) - cmake_policy(SET CMP0003 NEW) - - # Works around warnings about escaped quotes in ADD_DEFINITIONS - # statements - cmake_policy(SET CMP0005 OLD) -ENDIF(COMMAND cmake_policy) - -#----------------------------------------------------------------------------- -# Set default config options -# -NL_SETUP_DEFAULT_OPTIONS() -NL_SETUP_PREFIX_PATHS() - #----------------------------------------------------------------------------- # Override default options OPTION(BUILD_SERVICES "Build NeLNS Services" ON ) @@ -79,23 +7,13 @@ OPTION(BUILD_RYZOM_LAUNCHER "Build Ryzom Launcher" OFF) #----------------------------------------------------------------------------- #Platform specifics -FIND_PACKAGE(Threads REQUIRED) -FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(MySQL) FIND_PACKAGE(CURL) -FIND_PACKAGE(ZLIB) IF(WITH_QT) FIND_PACKAGE(Qt4 REQUIRED) ENDIF(WITH_QT) -NL_SETUP_BUILD() - -FIND_PACKAGE(NeLMISC) -FIND_PACKAGE(NeLNET) - -NL_SETUP_BUILD_FLAGS() - SET(ETCDIR "${NL_ETC_PREFIX}/nelns") SET(PKGDIR "${NL_SHARE_PREFIX}/nelns") SET(LOGDIR "${NL_LOG_PREFIX}/nelns") @@ -113,10 +31,3 @@ ENDIF(BUILD_SERVICES) IF(BUILD_LOGIN_SYSTEM) ADD_SUBDIRECTORY(login_system) ENDIF(BUILD_LOGIN_SYSTEM) - - - -#----------------------------------------------------------------------------- -#Packaging -INCLUDE(CMakePackaging.txt) - diff --git a/code/nelns/admin_executor_service/CMakeLists.txt b/code/nelns/admin_executor_service/CMakeLists.txt index 8a8aab1de..4b7905b4f 100644 --- a/code/nelns/admin_executor_service/CMakeLists.txt +++ b/code/nelns/admin_executor_service/CMakeLists.txt @@ -1,14 +1,17 @@ FILE(GLOB SRC *.cpp *.h) -ADD_EXECUTABLE(admin_executor_service ${SRC}) - -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(admin_executor_service ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -IF(WIN32) - SET_TARGET_PROPERTIES(admin_executor_service PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" - PROJECT_LABEL "Services: Admin Executor Service") -ENDIF(WIN32) +ADD_EXECUTABLE(admin_executor_service WIN32 ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(admin_executor_service + ${PLATFORM_LINKFLAGS} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(admin_executor_service "NelNS, Services: Admin Executor Service") +NL_ADD_RUNTIME_FLAGS(admin_executor_service) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) INSTALL(TARGETS admin_executor_service RUNTIME DESTINATION sbin COMPONENT aes) diff --git a/code/nelns/admin_service/CMakeLists.txt b/code/nelns/admin_service/CMakeLists.txt index 8debd59f1..2427555e9 100644 --- a/code/nelns/admin_service/CMakeLists.txt +++ b/code/nelns/admin_service/CMakeLists.txt @@ -1,14 +1,20 @@ FILE(GLOB SRC *.cpp *.h) -ADD_EXECUTABLE(admin_service ${SRC}) - -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(admin_service ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -IF(WIN32) - SET_TARGET_PROPERTIES(admin_service PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" - PROJECT_LABEL "Services: Admin Service") -ENDIF(WIN32) +ADD_EXECUTABLE(admin_service WIN32 ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(admin_service + ${PLATFORM_LINKFLAGS} + ${LIBXML2_LIBRARIES} + ${MYSQL_LIBRARIES} + ${ZLIB_LIBRARIES} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(admin_service "NelNS, Services: Admin Service") +NL_ADD_RUNTIME_FLAGS(admin_service) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) INSTALL(TARGETS admin_service RUNTIME DESTINATION sbin COMPONENT as) diff --git a/code/nelns/login_service/CMakeLists.txt b/code/nelns/login_service/CMakeLists.txt index 4de594841..da660e4f3 100644 --- a/code/nelns/login_service/CMakeLists.txt +++ b/code/nelns/login_service/CMakeLists.txt @@ -1,14 +1,20 @@ FILE(GLOB SRC *.cpp *.h) -ADD_EXECUTABLE(login_service ${SRC}) - -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(login_service ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -IF(WIN32) - SET_TARGET_PROPERTIES(login_service PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" - PROJECT_LABEL "Services: Login Service") -ENDIF(WIN32) +ADD_EXECUTABLE(login_service WIN32 ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(login_service + ${PLATFORM_LINKFLAGS} + ${LIBXML2_LIBRARIES} + ${MYSQL_LIBRARIES} + ${ZLIB_LIBRARIES} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(login_service "NelNS, Services: Login Service") +NL_ADD_RUNTIME_FLAGS(login_service) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) INSTALL(TARGETS login_service RUNTIME DESTINATION sbin COMPONENT ls) diff --git a/code/nelns/login_system/nel_launcher_qt/CMakeLists.txt b/code/nelns/login_system/nel_launcher_qt/CMakeLists.txt index 71bdc1afb..08eebb360 100644 --- a/code/nelns/login_system/nel_launcher_qt/CMakeLists.txt +++ b/code/nelns/login_system/nel_launcher_qt/CMakeLists.txt @@ -14,11 +14,20 @@ QT4_ADD_RESOURCES( NEL_LAUNCHER_RC_SRCS ${NEL_LAUNCHER_RCS} ) QT4_WRAP_UI( NEL_LAUNCHER_UI_HDRS ${NEL_LAUNCHER_UIS} ) QT4_WRAP_CPP( NEL_LAUNCHER_MOC_SRCS ${NEL_LAUNCHER_HDR}) -ADD_EXECUTABLE(nel_launcher_qt ${NEL_LAUNCHER_SRC} ${NEL_LAUNCHER_MOC_SRCS} ${NEL_LAUNCHER_RC_SRCS} ${NEL_LAUNCHER_UI_HDRS}) +ADD_EXECUTABLE(nel_launcher_qt WIN32 ${NEL_LAUNCHER_SRC} ${NEL_LAUNCHER_MOC_SRCS} ${NEL_LAUNCHER_RC_SRCS} ${NEL_LAUNCHER_UI_HDRS}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES}) + +TARGET_LINK_LIBRARIES(nel_launcher_qt + ${LIBXML2_LIBRARIES} + ${QT_LIBRARIES} + ${PLATFORM_LINKFLAGS} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(nel_launcher_qt "NelNS, Launcher: NeL Launcher Qt") +NL_ADD_RUNTIME_FLAGS(nel_launcher_qt) -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(nel_launcher_qt ${LIBXML2_LIBRARIES} ${QT_LIBRARIES} ${PLATFORM_LINKFLAGS} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -SET_TARGET_PROPERTIES(nel_launcher_qt PROPERTIES PROJECT_LABEL "Launcher: NeL Launcher Qt") ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS}) INSTALL(TARGETS nel_launcher_qt RUNTIME DESTINATION bin COMPONENT launcher) diff --git a/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt b/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt index 4bdc373b1..eeb6147cd 100644 --- a/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt +++ b/code/nelns/login_system/nel_launcher_windows_ext2/CMakeLists.txt @@ -6,10 +6,14 @@ IF(CURL_FOUND) ENDIF(CURL_FOUND) ADD_DEFINITIONS(-DNL_LAUNCHER_CFG="\\"${NL_ETC_PREFIX}/\\"") -INCLUDE_DIRECTORIES(${NELMISC_INCLUDE_DIRS}) +TARGET_LINK_LIBRARIES(nel_launcher_ext2 + ${PLATFORM_LINKFLAGS} + nelnet + nelmisc + ${ZLIB_LIBRARY} + ${CURL_LIBRARY}) -TARGET_LINK_LIBRARIES(nel_launcher_ext2 ${PLATFORM_LINKFLAGS} ${NELNET_LIBRARY} ${NELMISC_LIBRARY} ${ZLIB_LIBRARY} ${CURL_LIBRARY}) -NL_DEFAULT_PROPS(nel_launcher_ext2 "Launcher: NeL Launcher Ext2") +NL_DEFAULT_PROPS(nel_launcher_ext2 "NeLNS, Launcher: NeL Launcher Ext2") NL_ADD_RUNTIME_FLAGS(nel_launcher_ext2) INSTALL(TARGETS nel_launcher_ext2 RUNTIME DESTINATION bin COMPONENT launcher) diff --git a/code/nelns/naming_service/CMakeLists.txt b/code/nelns/naming_service/CMakeLists.txt index 11a3ca4dc..bb6fd0a35 100644 --- a/code/nelns/naming_service/CMakeLists.txt +++ b/code/nelns/naming_service/CMakeLists.txt @@ -1,14 +1,18 @@ FILE(GLOB SRC *.cpp *.h) -ADD_EXECUTABLE(naming_service ${SRC}) - -INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(naming_service ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -IF(WIN32) - SET_TARGET_PROPERTIES(naming_service PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" - PROJECT_LABEL "Services: Naming Service") -ENDIF(WIN32) +ADD_EXECUTABLE(naming_service WIN32 ${SRC}) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + +TARGET_LINK_LIBRARIES(naming_service + ${PLATFORM_LINKFLAGS} + ${LIBXML2_LIBRARIES} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(naming_service "NeLNS, Services: Naming Service") +NL_ADD_RUNTIME_FLAGS(naming_service) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) INSTALL(TARGETS naming_service RUNTIME DESTINATION sbin COMPONENT ns) diff --git a/code/nelns/welcome_service/CMakeLists.txt b/code/nelns/welcome_service/CMakeLists.txt index c50da1989..720621f2c 100644 --- a/code/nelns/welcome_service/CMakeLists.txt +++ b/code/nelns/welcome_service/CMakeLists.txt @@ -1,14 +1,18 @@ FILE(GLOB SRC *.cpp *.h) -ADD_EXECUTABLE(welcome_service ${SRC}) +ADD_EXECUTABLE(welcome_service WIN32 ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${NELMISC_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(welcome_service ${PLATFORM_LINKFLAGS} ${LIBXML2_LIBRARIES} ${NELMISC_LIBRARY} ${NELNET_LIBRARY}) -IF(WIN32) - SET_TARGET_PROPERTIES(welcome_service PROPERTIES - LINK_FLAGS "/NODEFAULTLIB:libcmt /SUBSYSTEM:WINDOWS" - PROJECT_LABEL "Services: Welcome Service") -ENDIF(WIN32) + +TARGET_LINK_LIBRARIES(welcome_service + ${PLATFORM_LINKFLAGS} + ${LIBXML2_LIBRARIES} + nelmisc + nelnet) + +NL_DEFAULT_PROPS(welcome_service "NeLNS, Services: Welcome Service") +NL_ADD_RUNTIME_FLAGS(welcome_service) + ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) INSTALL(TARGETS welcome_service RUNTIME DESTINATION sbin COMPONENT ws)