merge from default

This commit is contained in:
sfb 2012-03-22 14:31:07 -05:00
parent ceb9420bf3
commit 85aeae5a87
986 changed files with 55845 additions and 35227 deletions

View file

@ -144,6 +144,8 @@ external
external_stlport external_stlport
3rdParty 3rdParty
.svn .svn
thumbs.db
Thumbs.db
# build # build
code/nel/build/* code/nel/build/*

View file

@ -91,6 +91,7 @@ NL_CONFIGURE_CHECKS()
#Platform specifics #Platform specifics
SETUP_EXTERNAL() SETUP_EXTERNAL()
NL_GEN_REVISION_H()
IF(WIN32) IF(WIN32)
SET(WINSOCK2_LIB ws2_32.lib) SET(WINSOCK2_LIB ws2_32.lib)
@ -143,11 +144,11 @@ IF(WITH_RYZOM)
ENDIF(WITH_RYZOM) ENDIF(WITH_RYZOM)
IF(WITH_NELNS) IF(WITH_NELNS)
# ADD_SUBDIRECTORY(nelns) ADD_SUBDIRECTORY(nelns)
ENDIF(WITH_NELNS) ENDIF(WITH_NELNS)
IF(WITH_SNOWBALLS) IF(WITH_SNOWBALLS)
# ADD_SUBDIRECTORY(snowballs2) ADD_SUBDIRECTORY(snowballs2)
ENDIF(WITH_SNOWBALLS) ENDIF(WITH_SNOWBALLS)
IF(WITH_TOOLS) IF(WITH_TOOLS)

View file

@ -12,32 +12,35 @@ endif(MAXSDK_INCLUDE_DIR)
find_path(MAXSDK_INCLUDE_DIR max.h find_path(MAXSDK_INCLUDE_DIR max.h
PATHS PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include"
) )
find_path(MAXSDK_CS_INCLUDE_DIR bipexp.h find_path(MAXSDK_CS_INCLUDE_DIR bipexp.h
PATHS PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/include/CS"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include/CS" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include/CS" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include/CS" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/include/CS"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include/CS" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/include/CS"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/include/CS"
) )
MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME) MACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME} NAMES ${MYLIBRARYNAME}
PATHS PATHS
"$ENV{ADSK_3DSMAX_SDK_2012}/maxsdk/lib"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/lib" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2010 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/lib" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2009 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/lib" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 2008 SDK/maxsdk/lib"
"$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/lib" "$ENV{PROGRAMFILES}/Autodesk/3ds Max 9 SDK/maxsdk/lib"
"$ENV{3DSMAX_2011_SDK_PATH}/maxsdk/lib" )
)
ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME) ENDMACRO(FIND_3DS_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_3DS_LIBRARY(MAXSDK_CORE_LIBRARY core) FIND_3DS_LIBRARY(MAXSDK_CORE_LIBRARY core)

View file

@ -14,17 +14,22 @@ FIND_PATH(DXSDK_DIR
"Include/dxsdkver.h" "Include/dxsdkver.h"
PATHS PATHS
"$ENV{DXSDK_DIR}" "$ENV{DXSDK_DIR}"
"C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
"C:/Program Files/Microsoft DirectX SDK (June 2010)"
"C:/Program Files (x86)/Microsoft DirectX SDK (February 2010)"
"C:/Program Files/Microsoft DirectX SDK (February 2010)"
"C:/Program Files (x86)/Microsoft DirectX SDK (November 2007)"
"C:/Program Files/Microsoft DirectX SDK (November 2007)"
"C:/Program Files (x86)/Microsoft DirectX SDK"
"C:/Program Files/Microsoft DirectX SDK"
) )
MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME) MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${MYLIBRARYNAME} NAMES ${MYLIBRARYNAME}
PATHS PATHS
"${DXSDK_LIBRARY_DIR}" "${DXSDK_LIBRARY_DIR}"
"$ENV{DXSDK_DIR}" )
"$ENV{DXSDK_DIR}/Lib"
"$ENV{DXSDK_DIR}/Lib/x86"
)
ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME) ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
IF(DXSDK_DIR) IF(DXSDK_DIR)

View file

@ -8,7 +8,7 @@
# EXTERNAL_FOUND - True if the external libraries are available # EXTERNAL_FOUND - True if the external libraries are available
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/../external ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty ${EXTERNAL_PATH}) SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external ${CMAKE_CURRENT_SOURCE_DIR}/../external ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty ${EXTERNAL_PATH})
SET(EXTERNAL_TEMP_FILE "include/zlib.h") SET(EXTERNAL_TEMP_FILE "include/wwwconf.h")
SET(EXTERNAL_NAME "external") SET(EXTERNAL_NAME "external")
# If using STLport preprend external_stlport # If using STLport preprend external_stlport
@ -36,18 +36,18 @@ IF(EXTERNAL_PATH)
SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include") SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include")
# Using 32 or 64 bits binaries # Using 32 or 64 bits binaries
IF(TARGET_X64) IF(TARGET_X64 AND WIN32)
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64") SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64")
ELSE(TARGET_X64) ELSE(TARGET_X64 AND WIN32)
SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin") SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin")
ENDIF(TARGET_X64) ENDIF(TARGET_X64 AND WIN32)
# Using 32 or 64 bits libraries # Using 32 or 64 bits libraries
IF(TARGET_X64) IF(TARGET_X64 AND WIN32)
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64") SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64")
ELSE(TARGET_X64) ELSE(TARGET_X64 AND WIN32)
SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib") SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib")
ENDIF(TARGET_X64) ENDIF(TARGET_X64 AND WIN32)
SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}") SET(CMAKE_INCLUDE_PATH "${EXTERNAL_INCLUDE_PATH};${CMAKE_INCLUDE_PATH}")
# Stupid hack for FindOpenAL.cmake # Stupid hack for FindOpenAL.cmake

View file

@ -41,7 +41,7 @@ IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR) ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
FIND_LIBRARY(FREETYPE_LIBRARY FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219 NAMES freetype libfreetype freetype219 freetype246
PATHS PATHS
$ENV{FREETYPE_DIR}/lib $ENV{FREETYPE_DIR}/lib
/usr/local/lib /usr/local/lib
@ -57,6 +57,13 @@ FIND_LIBRARY(FREETYPE_LIBRARY
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS) IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
SET(FREETYPE_FOUND "YES") SET(FREETYPE_FOUND "YES")
IF(WITH_STATIC_EXTERNAL AND APPLE)
FIND_PACKAGE(BZip2)
IF(BZIP2_FOUND)
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARY} ${BZIP2_LIBRARIES})
ENDIF(BZIP2_FOUND)
ENDIF(WITH_STATIC_EXTERNAL AND APPLE)
IF(NOT FREETYPE_FIND_QUIETLY) IF(NOT FREETYPE_FIND_QUIETLY)
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARY}") MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARY}")
ENDIF(NOT FREETYPE_FIND_QUIETLY) ENDIF(NOT FREETYPE_FIND_QUIETLY)

View file

@ -6,6 +6,8 @@
# LIBWWW_LIBRARY, where to find the LibWWW library. # LIBWWW_LIBRARY, where to find the LibWWW library.
# LIBWWW_FOUND, If false, do not try to use LibWWW. # LIBWWW_FOUND, If false, do not try to use LibWWW.
OPTION(WITH_LIBWWW_STATIC "Use only static libraries for libwww" OFF)
SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY}) SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY})
# also defined, but not for general use are # also defined, but not for general use are
@ -46,6 +48,11 @@ ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
# helper to find all the libwww sub libraries # helper to find all the libwww sub libraries
MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION) MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
IF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
ENDIF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${ARGN} NAMES ${ARGN}
PATHS PATHS
@ -60,21 +67,27 @@ MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
/usr/freeware/lib64 /usr/freeware/lib64
) )
IF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
IF(${MYLIBRARY}) IF(${MYLIBRARY})
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC) IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}}) SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}})
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC) ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
ELSE(${MYLIBRARY}) ELSE(${MYLIBRARY})
IF(NOT LIBWWW_FIND_QUIETLY) IF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}") MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}")
ENDIF(NOT LIBWWW_FIND_QUIETLY) ENDIF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
ENDIF(${MYLIBRARY}) ENDIF(${MYLIBRARY})
MARK_AS_ADVANCED(${MYLIBRARY}) MARK_AS_ADVANCED(${MYLIBRARY})
ENDMACRO(FIND_WWW_LIBRARY) ENDMACRO(FIND_WWW_LIBRARY)
MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL) MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL)
LINK_DEPENDS(LIBWWW_LIBRARIES ${MYLIBRARY} ${OTHERLIBRARY} ${SYMBOL}) IF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
LINK_DEPENDS(LIBWWW_LIBRARIES ${MYLIBRARY} ${OTHERLIBRARY} ${SYMBOL})
ENDIF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
ENDMACRO(LINK_WWW_LIBRARY) ENDMACRO(LINK_WWW_LIBRARY)
# Find and link required libs for static or dynamic # Find and link required libs for static or dynamic

View file

@ -0,0 +1,108 @@
# - Extract information from a subversion working copy
# The module defines the following variables:
# Mercurial_HG_EXECUTABLE - path to hg command line client
# Mercurial_VERSION_HG - version of hg command line client
# Mercurial_FOUND - true if the command line client was found
# MERCURIAL_FOUND - same as Mercurial_FOUND, set for compatiblity reasons
#
# The minimum required version of Mercurial can be specified using the
# standard syntax, e.g. FIND_PACKAGE(Mercurial 1.4)
#
# If the command line client executable is found two macros are defined:
# Mercurial_WC_INFO(<dir> <var-prefix>)
# Mercurial_WC_LOG(<dir> <var-prefix>)
# Mercurial_WC_INFO extracts information of a subversion working copy at
# a given location. This macro defines the following variables:
# <var-prefix>_WC_URL - url of the repository (at <dir>)
# <var-prefix>_WC_ROOT - root url of the repository
# <var-prefix>_WC_REVISION - current revision
# <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
# <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
# <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
# <var-prefix>_WC_INFO - output of command `hg info <dir>'
# Mercurial_WC_LOG retrieves the log message of the base revision of a
# subversion working copy at a given location. This macro defines the
# variable:
# <var-prefix>_LAST_CHANGED_LOG - last log of base revision
# Example usage:
# FIND_PACKAGE(Mercurial)
# IF(MERCURIAL_FOUND)
# Mercurial_WC_INFO(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Current revision is ${Project_WC_REVISION}")
# Mercurial_WC_LOG(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
# ENDIF(MERCURIAL_FOUND)
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Tristan Carel
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
FIND_PROGRAM(Mercurial_HG_EXECUTABLE hg
DOC "mercurial command line client")
MARK_AS_ADVANCED(Mercurial_HG_EXECUTABLE)
IF(Mercurial_HG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} --version
OUTPUT_VARIABLE Mercurial_VERSION_HG
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE ".*version ([\\.0-9]+).*"
"\\1" Mercurial_VERSION_HG "${Mercurial_VERSION_HG}")
MACRO(Mercurial_WC_INFO dir prefix)
EXECUTE_PROCESS(COMMAND ${Mercurial_HG_EXECUTABLE} tip
WORKING_DIRECTORY ${dir}
OUTPUT_VARIABLE ${prefix}_WC_INFO
ERROR_VARIABLE Mercurial_hg_info_error
RESULT_VARIABLE Mercurial_hg_info_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${Mercurial_hg_info_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} tip\" failed with output:\n${Mercurial_hg_info_error}")
ELSE(NOT ${Mercurial_hg_info_result} EQUAL 0)
STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
"\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?changeset: *([0-9]+).*"
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
ENDIF(NOT ${Mercurial_hg_info_result} EQUAL 0)
ENDMACRO(Mercurial_WC_INFO)
MACRO(Mercurial_WC_LOG dir prefix)
# This macro can block if the certificate is not signed:
# hg ask you to accept the certificate and wait for your answer
# This macro requires a hg server network access (Internet most of the time)
# and can also be slow since it access the hg server
EXECUTE_PROCESS(COMMAND
${Mercurial_HG_EXECUTABLE} --non-interactive log -r BASE ${dir}
OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
ERROR_VARIABLE Mercurial_hg_log_error
RESULT_VARIABLE Mercurial_hg_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(NOT ${Mercurial_hg_log_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${Mercurial_HG_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Mercurial_hg_log_error}")
ENDIF(NOT ${Mercurial_hg_log_result} EQUAL 0)
ENDMACRO(Mercurial_WC_LOG)
ENDIF(Mercurial_HG_EXECUTABLE)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Mercurial DEFAULT_MSG Mercurial_HG_EXECUTABLE)

View file

@ -33,6 +33,12 @@ FIND_PATH(WINSDK_INCLUDE_DIR Windows.h
${WINSDKCURRENT_DIR}/Include ${WINSDKCURRENT_DIR}/Include
) )
FIND_PROGRAM(WINSDK_SIGNTOOL signtool
PATHS
${WINSDK71_DIR}/Bin
${WINSDKCURRENT_DIR}/Bin
)
IF(WINSDK_INCLUDE_DIR) IF(WINSDK_INCLUDE_DIR)
SET(WINSDK_FOUND TRUE) SET(WINSDK_FOUND TRUE)
ELSE(WINSDK_INCLUDE_DIR) ELSE(WINSDK_INCLUDE_DIR)

View file

@ -0,0 +1,59 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3)
# ROOT_DIR should be set to root of the repository (where to find the .svn or .hg directory)
# SOURCE_DIR should be set to root of your code (where to find CMakeLists.txt)
# Replace spaces by semi-columns
IF(CMAKE_MODULE_PATH)
STRING(REPLACE " " ";" CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
ENDIF(CMAKE_MODULE_PATH)
SET(CMAKE_MODULE_PATH ${SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH})
IF(NOT ROOT_DIR AND SOURCE_DIR)
SET(ROOT_DIR ${SOURCE_DIR})
ENDIF(NOT ROOT_DIR AND SOURCE_DIR)
IF(NOT SOURCE_DIR AND ROOT_DIR)
SET(SOURCE_DIR ${ROOT_DIR})
ENDIF(NOT SOURCE_DIR AND ROOT_DIR)
MACRO(NOW RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND "wmic" "os" "get" "localdatetime" OUTPUT_VARIABLE DATETIME)
IF(NOT DATETIME MATCHES "ERROR")
STRING(REGEX REPLACE ".*\n([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9]).*" "\\1-\\2-\\3 \\4:\\5:\\6" ${RESULT} "${DATETIME}")
ENDIF(NOT DATETIME MATCHES "ERROR")
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "+'%Y-%m-%d %H:%M:%S'" OUTPUT_VARIABLE ${RESULT})
ELSE (WIN32)
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} "0000-00-00 00:00:00")
ENDIF (WIN32)
ENDMACRO(NOW)
IF(EXISTS "${ROOT_DIR}/.svn/")
FIND_PACKAGE(Subversion)
IF(SUBVERSION_FOUND)
Subversion_WC_INFO(${ROOT_DIR} ER)
SET(REVISION ${ER_WC_REVISION})
ENDIF(SUBVERSION_FOUND)
ENDIF(EXISTS "${ROOT_DIR}/.svn/")
IF(EXISTS "${ROOT_DIR}/.hg/")
FIND_PACKAGE(Mercurial)
IF(MERCURIAL_FOUND)
Mercurial_WC_INFO(${ROOT_DIR} ER)
SET(REVISION ${ER_WC_REVISION})
ENDIF(MERCURIAL_FOUND)
ENDIF(EXISTS "${ROOT_DIR}/.hg/")
IF(REVISION)
IF(EXISTS ${SOURCE_DIR}/revision.h.in)
NOW(BUILD_DATE)
CONFIGURE_FILE(${SOURCE_DIR}/revision.h.in revision.h.txt)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy revision.h.txt revision.h) # copy_if_different
ENDIF(EXISTS ${SOURCE_DIR}/revision.h.in)
ENDIF(REVISION)

View file

@ -8,44 +8,40 @@
# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use # ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use
# ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp # ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp
IF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC)
SET(PCHSupport_FOUND TRUE)
SET(_PCH_include_prefix "/I")
ELSE(MSVC)
IF(CMAKE_COMPILER_IS_GNUCXX)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE gcc_compiler_version)
EXEC_PROGRAM( IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE gcc_compiler_version)
IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
SET(PCHSupport_FOUND TRUE)
ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
SET(PCHSupport_FOUND TRUE) SET(PCHSupport_FOUND TRUE)
ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]") ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]") IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
SET(PCHSupport_FOUND TRUE)
ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
ELSE(CMAKE_COMPILER_IS_GNUCXX)
# TODO: make tests for other compilers than GCC
SET(PCHSupport_FOUND TRUE)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET(_PCH_include_prefix "-I") SET(_PCH_include_prefix "-I")
ENDIF(MSVC)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
IF(WIN32)
SET(PCHSupport_FOUND TRUE) # for experimental msvc support
SET(_PCH_include_prefix "/I")
ELSE(WIN32)
SET(PCHSupport_FOUND FALSE)
ENDIF(WIN32)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags) MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name) STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} ) SET(${_out_compile_flags} ${${_flags_var_name}} )
IF(CMAKE_COMPILER_IS_GNUCXX) IF(NOT MSVC)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE) GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY OR ${_targetType} STREQUAL MODULE_LIBRARY) IF(${_targetType} STREQUAL SHARED_LIBRARY OR ${_targetType} STREQUAL MODULE_LIBRARY)
LIST(APPEND ${_out_compile_flags} "-fPIC") LIST(APPEND ${_out_compile_flags} "-fPIC")
ENDIF(${_targetType} STREQUAL SHARED_LIBRARY OR ${_targetType} STREQUAL MODULE_LIBRARY) ENDIF(${_targetType} STREQUAL SHARED_LIBRARY OR ${_targetType} STREQUAL MODULE_LIBRARY)
ENDIF(CMAKE_COMPILER_IS_GNUCXX) ENDIF(NOT MSVC)
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
FOREACH(item ${DIRINC}) FOREACH(item ${DIRINC})
@ -100,17 +96,13 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _inputcpp _output)
SET(pchsupport_compiler_cxx_arg1 "") SET(pchsupport_compiler_cxx_arg1 "")
ENDIF(CMAKE_CXX_COMPILER_ARG1) ENDIF(CMAKE_CXX_COMPILER_ARG1)
IF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC)
SET(${out_command}
${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input}
)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
_PCH_GET_PDB_FILENAME(PDB_FILE ${_PCH_current_target}) _PCH_GET_PDB_FILENAME(PDB_FILE ${_PCH_current_target})
SET(${out_command} SET(${out_command} ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} /Yc /Fp\"${_output}\" ${_inputcpp} /c /Fd\"${PDB_FILE}\")
${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} /Yc /Fp\"${_output}\" ${_inputcpp} /c /Fd\"${PDB_FILE}\" ELSE(MSVC)
) SET(${out_command} ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input})
ENDIF(CMAKE_COMPILER_IS_GNUCXX) ENDIF(MSVC)
ENDMACRO(_PCH_GET_COMPILE_COMMAND ) ENDMACRO(_PCH_GET_COMPILE_COMMAND)
MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output) MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output)
IF(MSVC) IF(MSVC)
@ -128,7 +120,9 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
SET(oldProps "") SET(oldProps "")
ENDIF(${oldProps} MATCHES NOTFOUND) ENDIF(${oldProps} MATCHES NOTFOUND)
IF(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC)
SET(_target_cflags "${oldProps} /Yu\"${_input}\" /FI\"${_input}\" /Fp\"${_pch_output_to_use}\"")
ELSE(MSVC)
# to do: test whether compiler flags match between target _targetName # to do: test whether compiler flags match between target _targetName
# and _pch_output_to_use # and _pch_output_to_use
FILE(TO_NATIVE_PATH ${_pch_output_to_use} _native_pch_path) FILE(TO_NATIVE_PATH ${_pch_output_to_use} _native_pch_path)
@ -137,11 +131,7 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
# on all remote machines set # on all remote machines set
# PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess # PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
SET(_target_cflags "${oldProps} ${PCH_ADDITIONAL_COMPILER_FLAGS}-include ${_input} -Winvalid-pch") SET(_target_cflags "${oldProps} ${PCH_ADDITIONAL_COMPILER_FLAGS}-include ${_input} -Winvalid-pch")
ELSE(CMAKE_COMPILER_IS_GNUCXX) ENDIF(MSVC)
IF(MSVC)
SET(_target_cflags "${oldProps} /Yu\"${_input}\" /FI\"${_input}\" /Fp\"${_pch_output_to_use}\"")
ENDIF(MSVC)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS ${_target_cflags}) SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS ${_target_cflags})
IF(oldProps) IF(oldProps)
@ -184,8 +174,31 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_inputh} ${_output}) ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_inputh} ${_output})
ENDMACRO(ADD_PRECOMPILED_HEADER) ENDMACRO(ADD_PRECOMPILED_HEADER)
# Macro to move PCH creation file to the front of files list
MACRO(FIX_PRECOMPILED_HEADER _files _pch)
# Remove .cpp creating PCH from the list
LIST(REMOVE_ITEM ${_files} ${_pch})
# Prepend .cpp creating PCH to the list
LIST(INSERT ${_files} 0 ${_pch})
ENDMACRO(FIX_PRECOMPILED_HEADER)
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp) MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
IF(CMAKE_GENERATOR MATCHES Visual*) SET(PCH_METHOD 0)
# 0 => creating a new target for PCH, works for all makefiles
# 1 => setting PCH for VC++ project, works for VC++ projects
# 2 => setting PCH for XCode project, works for XCode projects
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(PCH_METHOD 1)
ELSEIF(CMAKE_GENERATOR MATCHES "NMake Makefiles" AND MFC_FOUND AND CMAKE_MFC_FLAG)
# To fix a bug with MFC
# Don't forget to use FIX_PRECOMPILED_HEADER before creating the target
# SET(PCH_METHOD 1)
ELSEIF(CMAKE_GENERATOR MATCHES "Xcode")
SET(PCH_METHOD 2)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio")
IF(PCH_METHOD EQUAL 1)
# Auto include the precompile (useful for moc processing, since the use of # Auto include the precompile (useful for moc processing, since the use of
# precompiled is specified at the target level # precompiled is specified at the target level
# and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt) # and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt)
@ -200,26 +213,24 @@ MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
#also inlude ${oldProps} to have the same compile options #also inlude ${oldProps} to have the same compile options
SET_SOURCE_FILES_PROPERTIES(${_inputcpp} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_inputh}\"") SET_SOURCE_FILES_PROPERTIES(${_inputcpp} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_inputh}\"")
ELSE(CMAKE_GENERATOR MATCHES Visual*) ELSEIF(PCH_METHOD EQUAL 2)
IF(CMAKE_GENERATOR MATCHES Xcode) # For Xcode, cmake needs my patch to process
# For Xcode, cmake needs my patch to process # GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
# GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS) GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
IF(${oldProps} MATCHES NOTFOUND) IF(${oldProps} MATCHES NOTFOUND)
SET(oldProps "") SET(oldProps "")
ENDIF(${oldProps} MATCHES NOTFOUND) ENDIF(${oldProps} MATCHES NOTFOUND)
# When buiding out of the tree, precompiled may not be located # When buiding out of the tree, precompiled may not be located
# Use full path instead. # Use full path instead.
GET_FILENAME_COMPONENT(fullPath ${_inputh} ABSOLUTE) GET_FILENAME_COMPONENT(fullPath ${_inputh} ABSOLUTE)
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}") SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES") SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
ELSE(CMAKE_GENERATOR MATCHES Xcode) ELSE(PCH_METHOD EQUAL 1)
#Fallback to the "old" precompiled suppport #Fallback to the "old" precompiled suppport
ADD_PRECOMPILED_HEADER(${_targetName} ${_inputh} ${_inputcpp}) ADD_PRECOMPILED_HEADER(${_targetName} ${_inputh} ${_inputcpp})
ENDIF(CMAKE_GENERATOR MATCHES Xcode) ENDIF(PCH_METHOD EQUAL 1)
ENDIF(CMAKE_GENERATOR MATCHES Visual*)
ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER) ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)

View file

@ -3,12 +3,39 @@
# Argument: name - the name of the .pc package, e.g. "nel-pacs.pc" # Argument: name - the name of the .pc package, e.g. "nel-pacs.pc"
### ###
MACRO(NL_GEN_PC name) MACRO(NL_GEN_PC name)
IF(NOT WIN32) IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}") CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}")
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/pkgconfig) INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/pkgconfig)
ENDIF(NOT WIN32) ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
ENDMACRO(NL_GEN_PC) ENDMACRO(NL_GEN_PC)
###
# Helper macro that generates revision.h from revision.h.in
###
MACRO(NL_GEN_REVISION_H)
IF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h.in)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
ADD_DEFINITIONS(-DHAVE_REVISION_H)
SET(HAVE_REVISION_H ON)
# a custom target that is always built
ADD_CUSTOM_TARGET(revision ALL
DEPENDS ${CMAKE_BINARY_DIR}/revision.h)
# creates revision.h using cmake script
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/revision.h
COMMAND ${CMAKE_COMMAND}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-DROOT_DIR=${CMAKE_SOURCE_DIR}/..
-P ${CMAKE_SOURCE_DIR}/CMakeModules/GetRevision.cmake)
# revision.h is a generated file
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/revision.h
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h.in)
ENDMACRO(NL_GEN_REVISION_H)
### ###
# #
### ###
@ -49,6 +76,15 @@ MACRO(NL_DEFAULT_PROPS name label)
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX}) SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
ENDIF(NL_LIB_PREFIX) ENDIF(NL_LIB_PREFIX)
ENDIF(${type} STREQUAL SHARED_LIBRARY) ENDIF(${type} STREQUAL SHARED_LIBRARY)
IF(${type} STREQUAL EXECUTABLE AND WIN32)
SET_TARGET_PROPERTIES(${name} PROPERTIES
VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR}
COMPILE_FLAGS "/GA"
LINK_FLAGS "/VERSION:${NL_VERSION}")
ENDIF(${type} STREQUAL EXECUTABLE AND WIN32)
IF(WITH_STLPORT AND WIN32) IF(WITH_STLPORT AND WIN32)
SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/X") SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "/X")
ENDIF(WITH_STLPORT AND WIN32) ENDIF(WITH_STLPORT AND WIN32)
@ -171,7 +207,13 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_STATIC "With static libraries." OFF) OPTION(WITH_STATIC "With static libraries." OFF)
ENDIF(WIN32) ENDIF(WIN32)
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
IF(WIN32)
OPTION(WITH_EXTERNAL "With provided external." ON )
ELSE(WIN32)
OPTION(WITH_EXTERNAL "With provided external." OFF)
ENDIF(WIN32)
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
OPTION(WITH_INSTALL_LIBRARIES "Install development files." ON )
### ###
# GUI toolkits # GUI toolkits
@ -196,10 +238,10 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF) OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
OPTION(WITH_NEL "Build NeL (nearly always required)." ON ) OPTION(WITH_NEL "Build NeL (nearly always required)." ON )
OPTION(WITH_NELNS "Build NeL Network Services." OFF) OPTION(WITH_NELNS "Build NeL Network Services." OFF)
OPTION(WITH_RYZOM "Build Ryzom Core." ON ) OPTION(WITH_RYZOM "Build Ryzom Core." ON )
OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) OPTION(WITH_SNOWBALLS "Build Snowballs." OFF)
ENDMACRO(NL_SETUP_DEFAULT_OPTIONS) ENDMACRO(NL_SETUP_DEFAULT_OPTIONS)
MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
@ -289,44 +331,90 @@ MACRO(NL_SETUP_BUILD)
ENDIF(CMAKE_BUILD_TYPE MATCHES "Release") ENDIF(CMAKE_BUILD_TYPE MATCHES "Release")
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug") ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
# Determine target CPU SET(HOST_CPU ${CMAKE_SYSTEM_PROCESSOR})
# IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
IF(NOT CMAKE_SIZEOF_VOID_P)
INCLUDE (CheckTypeSize)
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
# Using 32 or 64 bits libraries # Determine target CPU
IF(NOT TARGET_CPU)
SET(TARGET_CPU $ENV{DEB_HOST_GNU_CPU})
ENDIF(NOT TARGET_CPU)
# If not specified, use the same CPU as host
IF(NOT TARGET_CPU)
SET(TARGET_CPU ${CMAKE_SYSTEM_PROCESSOR})
ENDIF(NOT TARGET_CPU)
IF(TARGET_CPU MATCHES "amd64")
SET(TARGET_CPU "x86_64")
ELSEIF(TARGET_CPU MATCHES "i.86")
SET(TARGET_CPU "x86")
ENDIF(TARGET_CPU MATCHES "amd64")
# DEB_HOST_ARCH_ENDIAN is 'little' or 'big'
# DEB_HOST_ARCH_BITS is '32' or '64'
# If target and host CPU are the same
IF("${HOST_CPU}" STREQUAL "${TARGET_CPU}")
# x86-compatible CPU
IF(HOST_CPU MATCHES "x86")
IF(NOT CMAKE_SIZEOF_VOID_P)
INCLUDE (CheckTypeSize)
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
# Using 32 or 64 bits libraries
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(TARGET_CPU "x86_64")
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(TARGET_CPU "x86")
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
ENDIF(HOST_CPU MATCHES "x86")
# TODO: add checks for ARM and PPC
ELSE("${HOST_CPU}" STREQUAL "${TARGET_CPU}")
MESSAGE(STATUS "Compiling on ${HOST_CPU} for ${TARGET_CPU}")
ENDIF("${HOST_CPU}" STREQUAL "${TARGET_CPU}")
IF(TARGET_CPU STREQUAL "x86_64")
SET(TARGET_X64 1)
SET(PLATFORM_CFLAGS "-DHAVE_X86_64")
ELSEIF(TARGET_CPU STREQUAL "x86")
SET(TARGET_X86 1) SET(TARGET_X86 1)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(PLATFORM_CFLAGS "-DHAVE_X86")
SET(ARCH "x86_64") ENDIF(TARGET_CPU STREQUAL "x86_64")
SET(TARGET_X64 1)
ADD_DEFINITIONS(-DHAVE_X86_64) # Fix library paths suffixes for Debian MultiArch
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) IF(NOT CMAKE_LIBRARY_ARCHITECTURE)
SET(ARCH "x86") SET(CMAKE_LIBRARY_ARCHITECTURE $ENV{DEB_HOST_MULTIARCH})
ADD_DEFINITIONS(-DHAVE_X86) ENDIF(NOT CMAKE_LIBRARY_ARCHITECTURE)
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
# ADD_DEFINITIONS(-DHAVE_IA64) IF(CMAKE_LIBRARY_ARCHITECTURE)
# ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86") SET(CMAKE_LIBRARY_PATH "/lib/${CMAKE_LIBRARY_ARCHITECTURE};/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE};${CMAKE_LIBRARY_PATH}")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE)
IF(WIN32)
IF(MSVC)
IF(MSVC10) IF(MSVC10)
# /Ox is working with VC++ 2010, but custom optimizations don't exist # /Ox is working with VC++ 2010, but custom optimizations don't exist
SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-") SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-")
# without inlining it's unusable, use custom optimizations again # without inlining it's unusable, use custom optimizations again
SET(MIN_OPTIMIZATIONS "/Od /Ob1") SET(MIN_OPTIMIZATIONS "/Od /Ob1")
ELSE(MSVC10) ELSEIF(MSVC90)
# don't use a /O[012x] flag if you want custom optimizations # don't use a /O[012x] flag if you want custom optimizations
SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-") SET(SPEED_OPTIMIZATIONS "/Ob2 /Oi /Ot /Oy /GT /GF /GS-")
# without inlining it's unusable, use custom optimizations again # without inlining it's unusable, use custom optimizations again
SET(MIN_OPTIMIZATIONS "/Ob1") SET(MIN_OPTIMIZATIONS "/Ob1")
ELSEIF(MSVC80)
# don't use a /O[012x] flag if you want custom optimizations
SET(SPEED_OPTIMIZATIONS "/Ox /GF /GS-")
# without inlining it's unusable, use custom optimizations again
SET(MIN_OPTIMIZATIONS "/Od /Ob1")
ELSE(MSVC10)
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
ENDIF(MSVC10) ENDIF(MSVC10)
SET(PLATFORM_CFLAGS "/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /W3 /Zi /Zm1000 /MP /Gy-") SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /W3 /Zi /Zm1000 /MP /Gy-")
# Common link flags # Common link flags
SET(PLATFORM_LINKFLAGS "-DEBUG") SET(PLATFORM_LINKFLAGS "-DEBUG")
IF(TARGET_X64) IF(TARGET_X64)
# Fix a bug with Intellisense # Fix a bug with Intellisense
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} /D_WIN64") SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} /D_WIN64")
@ -344,8 +432,17 @@ MACRO(NL_SETUP_BUILD)
SET(NL_RELEASE_CFLAGS "/MD /D NDEBUG ${SPEED_OPTIMIZATIONS}") SET(NL_RELEASE_CFLAGS "/MD /D NDEBUG ${SPEED_OPTIMIZATIONS}")
SET(NL_DEBUG_LINKFLAGS "/NODEFAULTLIB:msvcrt /INCREMENTAL:YES") SET(NL_DEBUG_LINKFLAGS "/NODEFAULTLIB:msvcrt /INCREMENTAL:YES")
SET(NL_RELEASE_LINKFLAGS "/OPT:REF /OPT:ICF /INCREMENTAL:NO") SET(NL_RELEASE_LINKFLAGS "/OPT:REF /OPT:ICF /INCREMENTAL:NO")
ELSE(WIN32) ELSE(MSVC)
SET(PLATFORM_CFLAGS "-g -pipe -ftemplate-depth-48 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing") IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m32 -march=i686")
ENDIF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
IF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -m64")
ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -g -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing")
IF(WITH_COVERAGE) IF(WITH_COVERAGE)
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}") SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
ENDIF(WITH_COVERAGE) ENDIF(WITH_COVERAGE)
@ -354,15 +451,20 @@ MACRO(NL_SETUP_BUILD)
SET(PLATFORM_CFLAGS "-gdwarf-2 ${PLATFORM_CFLAGS}") SET(PLATFORM_CFLAGS "-gdwarf-2 ${PLATFORM_CFLAGS}")
ENDIF(APPLE) ENDIF(APPLE)
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS)
SET(PLATFORM_CFLAGS "-fPIC ${PLATFORM_CFLAGS}")
ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS)
SET(PLATFORM_CXXFLAGS ${PLATFORM_CFLAGS}) SET(PLATFORM_CXXFLAGS ${PLATFORM_CFLAGS})
IF(NOT APPLE) IF(NOT APPLE)
SET(PLATFORM_LINKFLAGS "-Wl,--no-undefined -Wl,--as-needed") SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed")
ENDIF(NOT APPLE) ENDIF(NOT APPLE)
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -D_DEBUG") SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -D_DEBUG")
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O6") SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O6")
ENDIF(WIN32) ENDIF(MSVC)
ENDMACRO(NL_SETUP_BUILD) ENDMACRO(NL_SETUP_BUILD)
MACRO(NL_SETUP_BUILD_FLAGS) MACRO(NL_SETUP_BUILD_FLAGS)
@ -426,7 +528,11 @@ MACRO(NL_SETUP_PREFIX_PATHS)
IF(WIN32) IF(WIN32)
SET(NL_LIB_PREFIX "../lib" CACHE PATH "Installation path for libraries.") SET(NL_LIB_PREFIX "../lib" CACHE PATH "Installation path for libraries.")
ELSE(WIN32) ELSE(WIN32)
SET(NL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation path for libraries.") IF(CMAKE_LIBRARY_ARCHITECTURE)
SET(NL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.")
ELSE(CMAKE_LIBRARY_ARCHITECTURE)
SET(NL_LIB_PREFIX "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation path for libraries.")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT NL_LIB_PREFIX) ENDIF(NOT NL_LIB_PREFIX)
@ -435,7 +541,11 @@ MACRO(NL_SETUP_PREFIX_PATHS)
IF(WIN32) IF(WIN32)
SET(NL_DRIVER_PREFIX "../lib" CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "../lib" CACHE PATH "Installation path for drivers.")
ELSE(WIN32) ELSE(WIN32)
SET(NL_DRIVER_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/nel" CACHE PATH "Installation path for drivers.") IF(CMAKE_LIBRARY_ARCHITECTURE)
SET(NL_DRIVER_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.")
ELSE(CMAKE_LIBRARY_ARCHITECTURE)
SET(NL_DRIVER_PREFIX "${CMAKE_INSTALL_PREFIX}/lib/nel" CACHE PATH "Installation path for drivers.")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT NL_DRIVER_PREFIX) ENDIF(NOT NL_DRIVER_PREFIX)
@ -456,54 +566,60 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
IF(WIN32) IF(WIN32)
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations") SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
ELSE(WIN32) ELSE(WIN32)
SET(RYZOM_ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/ryzom" CACHE PATH "Installation path for configurations") SET(RYZOM_ETC_PREFIX "${RYZOM_PREFIX}/etc/ryzom" CACHE PATH "Installation path for configurations")
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT RYZOM_ETC_PREFIX) ENDIF(NOT RYZOM_ETC_PREFIX)
## Allow override of install_prefix/share path. ## Allow override of install_prefix/share path.
IF(NOT RYZOM_SHARE_PREFIX) IF(NOT RYZOM_SHARE_PREFIX)
IF(WIN32) IF(WIN32)
SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.") SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
ELSE(WIN32) ELSE(WIN32)
SET(RYZOM_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/ryzom" CACHE PATH "Installation path for data.") SET(RYZOM_SHARE_PREFIX "${RYZOM_PREFIX}/share/ryzom" CACHE PATH "Installation path for data.")
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT RYZOM_SHARE_PREFIX) ENDIF(NOT RYZOM_SHARE_PREFIX)
## Allow override of install_prefix/sbin path. ## Allow override of install_prefix/sbin path.
IF(NOT RYZOM_SBIN_PREFIX) IF(NOT RYZOM_SBIN_PREFIX)
IF(WIN32) IF(WIN32)
SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.") SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
ELSE(WIN32) ELSE(WIN32)
SET(RYZOM_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.") SET(RYZOM_SBIN_PREFIX "${RYZOM_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.")
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT RYZOM_SBIN_PREFIX) ENDIF(NOT RYZOM_SBIN_PREFIX)
## Allow override of install_prefix/bin path. ## Allow override of install_prefix/bin path.
IF(NOT RYZOM_BIN_PREFIX) IF(NOT RYZOM_BIN_PREFIX)
IF(WIN32) IF(WIN32)
SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.") SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ELSE(WIN32) ELSE(WIN32)
SET(RYZOM_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for tools.") SET(RYZOM_BIN_PREFIX "${RYZOM_PREFIX}/bin" CACHE PATH "Installation path for tools.")
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT RYZOM_BIN_PREFIX) ENDIF(NOT RYZOM_BIN_PREFIX)
## Allow override of install_prefix/games path. ## Allow override of install_prefix/games path.
IF(NOT RYZOM_GAMES_PREFIX) IF(NOT RYZOM_GAMES_PREFIX)
IF(WIN32) IF(WIN32)
SET(RYZOM_GAMES_PREFIX "." CACHE PATH "Installation path for tools and applications.") SET(RYZOM_GAMES_PREFIX "." CACHE PATH "Installation path for tools and applications.")
ELSE(WIN32) ELSE(WIN32)
SET(RYZOM_GAMES_PREFIX "${CMAKE_INSTALL_PREFIX}/games" CACHE PATH "Installation path for client.") SET(RYZOM_GAMES_PREFIX "${RYZOM_PREFIX}/games" CACHE PATH "Installation path for client.")
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT RYZOM_GAMES_PREFIX) ENDIF(NOT RYZOM_GAMES_PREFIX)
ENDMACRO(RYZOM_SETUP_PREFIX_PATHS) ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
MACRO(SETUP_EXTERNAL) MACRO(SETUP_EXTERNAL)
IF(WIN32) IF(WITH_EXTERNAL)
FIND_PACKAGE(External REQUIRED) FIND_PACKAGE(External REQUIRED)
ENDIF(WITH_EXTERNAL)
IF(WIN32)
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
IF(MSVC10) IF(MSVC10)
IF(NOT MSVC10_REDIST_DIR)
# If you have VC++ 2010 Express, put x64/Microsoft.VC100.CRT/*.dll in ${EXTERNAL_PATH}/redist
SET(MSVC10_REDIST_DIR "${EXTERNAL_PATH}/redist")
ENDIF(NOT MSVC10_REDIST_DIR)
GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\10.0_Config;InstallDir]" ABSOLUTE) GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\10.0_Config;InstallDir]" ABSOLUTE)
# VC_ROOT_DIR is set to "registry" when a key is not found # VC_ROOT_DIR is set to "registry" when a key is not found
IF(VC_ROOT_DIR MATCHES "registry") IF(VC_ROOT_DIR MATCHES "registry")
@ -524,13 +640,19 @@ MACRO(SETUP_EXTERNAL)
ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7")
ENDIF(MSVC10) ENDIF(MSVC10)
ELSE(WIN32) ELSE(WIN32)
IF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE) IF(APPLE)
IF(WITH_STATIC_EXTERNAL) IF(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .dylib .so)
ELSE(WITH_STATIC_EXTERNAL) ELSE(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so") SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
ENDIF(WITH_STATIC_EXTERNAL AND NOT APPLE) ENDIF(WITH_STATIC_EXTERNAL)
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES) ELSE(APPLE)
IF(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so)
ELSE(WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a)
ENDIF(WITH_STATIC_EXTERNAL)
ENDIF(APPLE)
ENDIF(WIN32) ENDIF(WIN32)
IF(WITH_STLPORT) IF(WITH_STLPORT)
@ -544,5 +666,4 @@ MACRO(SETUP_EXTERNAL)
INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR})
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(WITH_STLPORT) ENDIF(WITH_STLPORT)
ENDMACRO(SETUP_EXTERNAL) ENDMACRO(SETUP_EXTERNAL)

File diff suppressed because it is too large Load diff

View file

@ -54,24 +54,27 @@ IF(WITH_GTK)
FIND_PACKAGE(GTK2) FIND_PACKAGE(GTK2)
ENDIF(WITH_GTK) ENDIF(WITH_GTK)
IF(UNIX) IF(WITH_INSTALL_LIBRARIES)
SET(prefix ${CMAKE_INSTALL_PREFIX}) IF(UNIX)
SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(libdir ${CMAKE_INSTALL_PREFIX}/lib) SET(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
SET(includedir ${CMAKE_INSTALL_PREFIX}/include) SET(libdir ${CMAKE_INSTALL_PREFIX}/lib)
SET(enable_ligo ${WITH_LIGO}) SET(includedir ${CMAKE_INSTALL_PREFIX}/include)
SET(enable_logic ${WITH_LOGIC}) SET(enable_ligo ${WITH_LIGO})
SET(enable_georges ${WITH_GEORGES}) SET(enable_logic ${WITH_LOGIC})
SET(enable_net ${WITH_NET}) SET(enable_georges ${WITH_GEORGES})
SET(enable_3d ${WITH_3D}) SET(enable_net ${WITH_NET})
SET(enable_pacs ${WITH_PACS}) SET(enable_3d ${WITH_3D})
SET(enable_sound ${WITH_SOUND}) SET(enable_pacs ${WITH_PACS})
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config) SET(enable_sound ${WITH_SOUND})
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION bin) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION bin)
ENDIF(UNIX) ENDIF(UNIX)
ADD_SUBDIRECTORY(include)
ENDIF(WITH_INSTALL_LIBRARIES)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(src)
IF(WITH_NEL_SAMPLES) IF(WITH_NEL_SAMPLES)

View file

@ -1,46 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in \
configure \
libtool \
config.guess \
config.sub \
ltconfig \
aclocal.m4 \
config.h.in \
install-sh \
missing \
mkinstalldirs \
ltmain.sh \
include/nelconfig.h \
include/nelconfig.h.in \
include/nel/nelconfig.h
DISTCLEANFILES = include/stamp-h \
include/stamp-h.in
SUBDIRS = include src @TOOLS_SUBDIR@ @SAMPLE_SUBDIR@
bin_SCRIPTS = nel-config
EXTRA_DIST = nel.dsw \
nel.sln \
nel_8.sln \
autogen.sh \
nel.m4 \
automacros \
doc \
kdevelop \
tools \
samples
dist-hook:
find $(distdir) -name CVS -print | xargs rm -fr
find $(distdir) -name .svn -print | xargs rm -fr
m4datadir = $(datadir)/aclocal
m4data_DATA = nel.m4
# End of Makefile.am

File diff suppressed because it is too large Load diff

View file

@ -1,32 +0,0 @@
#!/bin/sh -
WANT_AUTOMAKE="1.6"
case `uname -s` in
Darwin)
LIBTOOLIZE=glibtoolize
;;
*)
LIBTOOLIZE=libtoolize
;;
esac
# be able to customize the aclocal (for example to add extra param)
if test "x$ACLOCAL" = "x"
then
ACLOCAL=aclocal
fi
echo "Creating macros..." && \
$ACLOCAL -I automacros/ && \
echo "Creating library tools..." && \
$LIBTOOLIZE --force && \
echo "Creating header templates..." && \
autoheader && \
echo "Creating Makefile templates..." && \
automake --gnu --add-missing && \
echo "Creating 'configure'..." && \
autoconf && \
echo "" && \
echo "Run: ./configure; make; make install" && \
echo ""

View file

@ -1,196 +0,0 @@
# Configure paths for GTK+
# Owen Taylor 1997-2001
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
dnl pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GTK_2_0],
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
, enable_gtktest=yes)
pkg_config_args=gtk+-2.0
for module in . $4
do
case "$module" in
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
esac
done
no_gtk=""
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG != xno ; then
if pkg-config --atleast-pkgconfig-version 0.7 ; then
:
else
echo "*** pkg-config too old; version 0.7 or better required."
no_gtk=yes
PKG_CONFIG=no
fi
else
no_gtk=yes
fi
min_gtk_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
enable_gtktest=no
fi
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
:
else
no_gtk=yes
fi
fi
if test x"$no_gtk" = x ; then
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$GTK_LIBS $LIBS"
dnl
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.gtktest
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||
(gtk_micro_version != $gtk_config_micro_version))
{
printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
(gtk_minor_version != GTK_MINOR_VERSION) ||
(gtk_micro_version != GTK_MICRO_VERSION))
{
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
}
else
{
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://pkgconfig.sourceforge.net"
else
if test -f conf.gtktest ; then
:
else
echo "*** Could not run GTK+ test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_TRY_LINK([
#include <gtk/gtk.h>
#include <stdio.h>
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
rm -f conf.gtktest
])

View file

@ -1,102 +0,0 @@
# Configure paths for libogg
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
if test "x$ogg_libraries" != "x" ; then
OGG_LIBS="-L$ogg_libraries"
elif test "x$ogg_prefix" != "x" ; then
OGG_LIBS="-L$ogg_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
OGG_LIBS="-L$prefix/lib"
fi
OGG_LIBS="$OGG_LIBS -logg"
if test "x$ogg_includes" != "x" ; then
OGG_CFLAGS="-I$ogg_includes"
elif test "x$ogg_prefix" != "x" ; then
OGG_CFLAGS="-I$ogg_prefix/include"
elif test "x$prefix" != "xNONE"; then
OGG_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for Ogg)
no_ogg=""
if test "x$enable_oggtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>
int main ()
{
system("touch conf.oggtest");
return 0;
}
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_ogg" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.oggtest ; then
:
else
echo "*** Could not run Ogg test program, checking why..."
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <ogg/ogg.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
echo "*** or that you have moved Ogg since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OGG_CFLAGS=""
OGG_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OGG_CFLAGS)
AC_SUBST(OGG_LIBS)
rm -f conf.oggtest
])

View file

@ -1,157 +0,0 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$PKG_CONFIG"; then
if test -n "$$1"; then
pkg_cv_[]$1="$$1"
else
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES

View file

@ -1,122 +0,0 @@
# Configure paths for libvorbis
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
dnl
AC_DEFUN([XIPH_PATH_VORBIS],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
if test "x$vorbis_libraries" != "x" ; then
VORBIS_LIBS="-L$vorbis_libraries"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_LIBS="-L$vorbis_prefix/lib"
elif test "x$prefix" != "xNONE"; then
VORBIS_LIBS="-L$prefix/lib"
fi
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
VORBISFILE_LIBS="-lvorbisfile"
VORBISENC_LIBS="-lvorbisenc"
if test "x$vorbis_includes" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_includes"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_prefix/include"
elif test "x$prefix" != "xNONE"; then
VORBIS_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for Vorbis)
no_vorbis=""
if test "x$enable_vorbistest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Vorbis is sufficiently new.
dnl
rm -f conf.vorbistest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
int main ()
{
vorbis_block vb;
vorbis_dsp_state vd;
vorbis_info vi;
vorbis_info_init (&vi);
vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
vorbis_analysis_init (&vd, &vi);
vorbis_block_init (&vd, &vb);
/* this function was added in 1.0rc3, so this is what we're testing for */
vorbis_bitrate_addblock (&vb);
system("touch conf.vorbistest");
return 0;
}
],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_vorbis" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.vorbistest ; then
:
else
echo "*** Could not run Vorbis test program, checking why..."
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <vorbis/codec.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
echo "*** or that you have moved Vorbis since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
VORBIS_CFLAGS=""
VORBIS_LIBS=""
VORBISFILE_LIBS=""
VORBISENC_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(VORBIS_CFLAGS)
AC_SUBST(VORBIS_LIBS)
AC_SUBST(VORBISFILE_LIBS)
AC_SUBST(VORBISENC_LIBS)
rm -f conf.vorbistest
])

View file

@ -1,599 +0,0 @@
# ====================================================================
# Configuration script for NeL
# ====================================================================
#
# $Id: configure.ac,v 1.8 2005/04/14 15:54:32 cado Exp $
#
# ====================================================================
# Process this file with autoconf to produce a configure script.
# ====================================================================
# If you want to change the version, must must change AC_INIT
# *and* AC_SUBST(LIBTOOL_VERSION)
AC_PREREQ(2.57)
AC_INIT([nel],[0.8.0],[nel-all@nevrax.org])
AM_INIT_AUTOMAKE([tar-ustar])
AC_CONFIG_SRCDIR(include/nel/misc/types_nl.h)
AM_CONFIG_HEADER(include/nelconfig.h)
AC_SUBST(LIBTOOL_VERSION, [0:7:0])
# Checks for programs.
AC_CANONICAL_HOST
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AM_SANITY_CHECK
AC_SYS_LARGEFILE
AM_MAINTAINER_MODE
# Template needed to generate the nelconfig.h.in
AH_TEMPLATE([NEL_DEFAULT_DISPLAYER],[Define to 1 if you want log on standard output])
AH_TEMPLATE([NEL_LOG_IN_FILE],[Define to 1 if you want a debug log.log file in the current directory])
AH_TEMPLATE([HAVE_X86],[Define to 1 if you are on a INTEL compatible processor])
AH_TEMPLATE([HAVE_X86_64],[Define to 1 if you are on AMD opteron 64bits processor])
AH_TEMPLATE([NL_USE_GTK], [Define to 1 if you want GTK support])
# Get host type info
if test "$host_cpu" = "i386" -o "$host_cpu" = "i486" -o "$host_cpu" = "i586" \
-o "$host_cpu" = "i686" -o "$host_cpu" = "i786" -o "$host_cpu" = "x86_64"
then
AC_DEFINE([HAVE_X86])
fi
if test "$host_cpu" = "x86_64"
then
AC_DEFINE([HAVE_X86_64])
fi
# The following hack should ensure that configure doesnt add optimizing
# or debugging flags to CFLAGS or CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing -ftemplate-depth-24 -fno-stack-protector"
# ====================================================================
# Checks NeL modules (net, 3d) to install / Disable
# ====================================================================
# The misc is mandatory, it is use by the other modules.
NEL_SUBDIRS="misc"
# NeL libraries that are enabled by default
# Network library
AC_ARG_ENABLE([net],
AC_HELP_STRING([--disable-net],
[disable compilation and install of NeL Network]),
[],
[enable_net=yes])
if test "$enable_net" = "no"
then
AC_MSG_RESULT([disable NeL Network])
else
NEL_SUBDIRS="$NEL_SUBDIRS net"
fi
# 3D library
AC_ARG_ENABLE([3d],
AC_HELP_STRING([--disable-3d],
[disable compilation and install of NeL 3D]),
[],
[enable_3d=yes])
if test "$enable_3d" = "no"
then
AC_MSG_RESULT([disable NeL 3D])
else
NEL_SUBDIRS="$NEL_SUBDIRS 3d"
fi
# PACS library
AC_ARG_ENABLE([pacs],
AC_HELP_STRING([--disable-pacs],
[disable compilation and install of NeL PACS]),
[],
[enable_pacs=yes])
if test "$enable_pacs" = "no"
then
AC_MSG_RESULT([disable NeL PACS])
else
NEL_SUBDIRS="$NEL_SUBDIRS pacs"
fi
# Georges library
AC_ARG_ENABLE([georges],
AC_HELP_STRING([--disable-georges],
[disable compilation and install of NeL Georges]),
[],
[enable_georges=yes])
if test "$enable_georges" = "no"
then
AC_MSG_RESULT([disable NeL Georges])
else
NEL_SUBDIRS="$NEL_SUBDIRS georges"
fi
# Ligo library
AC_ARG_ENABLE([ligo],
AC_HELP_STRING([--disable-ligo],
[disable compilation and install of NeL Ligo]),
[],
[enable_ligo=yes])
if test "$enable_ligo" = "no"
then
AC_MSG_RESULT([disable NeL Ligo])
else
NEL_SUBDIRS="$NEL_SUBDIRS ligo"
fi
# NeL libraries that are disabled by default
# Sound library
AC_ARG_ENABLE([sound],
AC_HELP_STRING([--enable-sound],
[enable compilation and install of NeL Sound]),
[],
[enable_sound=no])
if test "$enable_sound" = "yes"
then
AC_MSG_RESULT([enable NeL Sound])
NEL_SUBDIRS="$NEL_SUBDIRS sound"
fi
# CEGUI Renderer library
AC_ARG_ENABLE([cegui],
AC_HELP_STRING([--enable-cegui],
[enable compilation and install of NeL CEGUI Renderer]),
[],
[enable_cegui=no])
CEGUI_SUBDIR=""
if test "$enable_cegui" = "yes"
then
AC_MSG_RESULT([enable NeL CEGUI Renderer])
NEL_SUBDIRS="$NEL_SUBDIRS cegui"
CEGUI_SUBDIR="cegui"
fi
# Unit Tests
AC_ARG_ENABLE([tests],
AC_HELP_STRING([--enable-tests],
[enable unit tests of NeL]),
[],
[enable_tests=no])
if test "$enable_tests" = "yes"
then
AC_MSG_RESULT([enable NeL Unit Tests])
fi
# Code Coverage
AC_ARG_ENABLE([coverage],
AC_HELP_STRING([--enable-coverage],
[enable code coverage generation]),
[]
[enable_coverage=no])
if test "$enable_coverage" = "yes"
then
AC_MSG_RESULT([enable Code Coverage generation])
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
fi
# Enable/disable samples compilation.
AC_ARG_ENABLE([samples],
AC_HELP_STRING([--disable-samples],
[disable sample code]),
[],
[enable_samples="yes"])
if test "$enable_samples" = "no"
then
AC_MSG_RESULT([disable sample code.])
SAMPLE_SUBDIR=""
else
SAMPLE_SUBDIR="samples"
fi
# Enable/disable tools compilation.
AC_ARG_ENABLE([tools],
AC_HELP_STRING([--disable-tools],
[disable tools code]),
[],
[enable_tools="yes"])
if test "$enable_tools" = "no"
then
AC_MSG_RESULT([disable tools code.])
TOOLS_SUBDIR=""
else
TOOLS_SUBDIR="tools"
fi
AC_SUBST([enable_net])
AC_SUBST([enable_3d])
AC_SUBST([enable_pacs])
AC_SUBST([enable_sound])
AC_SUBST([enable_georges])
AC_SUBST([enable_ligo])
AC_SUBST([enable_cegui])
AC_SUBST([NEL_SUBDIRS])
AC_SUBST([SAMPLE_SUBDIR])
AC_SUBST([TOOLS_SUBDIR])
AC_SUBST([CEGUI_SUBDIR])
# ====================================================================
# Checks for programs.
# ====================================================================
# ====================================================================
# Configure Settings
# ====================================================================
# Disable the static linking by default
# AC_DISABLE_STATIC
# Use C++ compiler as a default for the compilation tests.
AC_LANG([C++])
# ====================================================================
# Debug/optimized compilation mode
# ====================================================================
AM_NEL_DEBUG
AC_ARG_WITH([logging],
AC_HELP_STRING([--without-logging],
[be silent on stdout and in no log.log]),
[],
[with_logging=yes])
if test "$with_logging" = "yes"
then
AC_DEFINE([NEL_DEFAULT_DISPLAYER], 1)
AC_DEFINE([NEL_LOG_IN_FILE], 1)
fi
# ====================================================================
# Checks for typedefs, structures, and compiler characteristics.
# ====================================================================
# Test endianness
AC_C_BIGENDIAN
# Supress GCC "multi-character character constant" warnings.
if test "$ac_cv_cxx_compiler_gnu" = "yes";
then
if test "$with_debug" = "yes"
then
#
# When debugging variables are declared for the sole purpose of
# inspecting their content with a debugger. They are not used
# in the code itself and this is legitimate, hence the -Wno-unused
#
CXXFLAGS="$CXXFLAGS -Wno-unused"
fi
fi
# Add some common define
if test "$ac_cv_cxx_compiler_gnu" = "yes";
then
CXXFLAGS="$CXXFLAGS -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused"
fi
# ====================================================================
# Checks for header and lib files.
# ====================================================================
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h malloc.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h sys/time.h])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([dl], [dlopen])
# ====================================================================
# Checks for typedefs, structures, and compiler characteristics.
# ====================================================================
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_TYPES([size_t])
AC_CHECK_TYPES([uintptr_t])
# ====================================================================
# Checks for library functions.
# ====================================================================
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_FORK
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([floor getcwd gethostbyaddr gethostbyname gethostname gettimeofday inet_ntoa memmove memset mkdir pow select socket sqrt strcasecmp strchr strdup strerror strrchr strstr strtoul sys/time.h])
# ====================================================================
# X11
AC_PATH_X
if test ! "$no_x" = "yes"
then
if test ! X"$x_libraries" = X
then
LIBS="$LIBS -L$x_libraries"
fi
if test ! X"$x_includes" = X
then
CXXFLAGS="$CXXFLAGS -I$x_includes"
fi
else
if test "$enable_3d" = "yes"
then
AC_MSG_ERROR([X11 must be installed for NeL 3d library, use --disable-3d if you don't need NeL 3d library])
fi
fi
# ====================================================================
# LibXML
# Use C compiler as a default for the libxml tests.
AC_LANG([C])
AM_PATH_XML2([2.0.0], [], [AC_MSG_ERROR([libxml2 must be installed])])
CXXFLAGS="$CXXFLAGS $XML_CFLAGS $XML_CPPFLAGS"
LIBS="$LIBS $XML_LIBS"
# Use C++ compiler as a default for the compilation tests.
AC_LANG([C++])
# ====================================================================
# libpng
AC_CHECK_HEADER(png.h, [], AC_MSG_ERROR([libpng must be installed]))
# ====================================================================
# libjpeg
AC_CHECK_HEADER(jpeglib.h, [], AC_MSG_ERROR([libjpeg must be installed]))
# ====================================================================
# Checks for libraries.
# ====================================================================
# ====================================================================
# GTK 2.0+
AC_ARG_WITH([gtk],
AC_HELP_STRING([--with-gtk],
[add GTK dependent code like GTK displayer]),
[],
[with_gtk=no])
if test "$with_gtk" = "yes"
then
AC_LANG([C])
AM_PATH_GTK_2_0([2.0.0],
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
AC_DEFINE(NL_USE_GTK, [], [Undef if you don't want to use anything GTK based like the GTK Displayer]
)
)
AC_LANG([C++])
AC_SUBST([with_gtk])
fi
# ====================================================================
# CEGUI
if test "$enable_cegui" = "yes"
then
PKG_CHECK_MODULES(CEGUI, CEGUI >= 0.4,
[],
[
AC_MSG_ERROR([Couldn't find CEGUI or tests failed:
$CEGUI_PKG_ERRORS
Please go to http://crayzedsgui.sourceforge.net to get the latest, or check
config.log to see why the tests failed, and fix it.])
])
fi
# ====================================================================
# FreeType 2
AM_PATH_FREETYPE($enable_3d)
# ====================================================================
# OpenGL
AM_PATH_OPENGL($enable_3d)
# ====================================================================
# Check for XF86VidMode extension (-lXxf86vm)
AM_PATH_XF86VIDMODE
# ====================================================================
# FMOD, OpenAL
if test "$enable_sound" = "yes"
then
AM_PATH_FMOD("no")
AM_PATH_OPENAL("no")
if test "$have_fmod" = "no" -a "$have_openal" = "no"
then
AC_MSG_ERROR([Either FMod or OpenAL must be installed to use sound.])
fi
if test "$have_fmod" = "yes"
then
SOUND_SUBDIRS="fmod"
else
SOUND_SUBDIRS=""
fi
if test "$have_openal" = "yes"
then
SOUND_SUBDIRS="$SOUND_SUBDIRS openal"
XIPH_PATH_OGG([], AC_MSG_ERROR([Driver OpenAL Requires libogg!]))
XIPH_PATH_VORBIS([], AC_MSG_ERROR([Driver OpenAL Requires libvorbis!]))
fi
AC_SUBST([SOUND_SUBDIRS])
fi
# ====================================================================
# CppTest
#AM_PATH_CPPTEST($enable_tests)
# ====================================================================
# Arrange for the include directory to be in the search path even when
# build is done outside the source tree
# Put the nelconfig.h define
CXXFLAGS="$CXXFLAGS -I\${top_srcdir}/include -DHAVE_NELCONFIG_H"
# ====================================================================
# Checks for library functions.
# ====================================================================
# ====================================================================
# Output files to generate.
# ====================================================================
AC_CONFIG_FILES([Makefile \
include/Makefile \
include/nel/Makefile \
include/nel/ligo/Makefile \
include/nel/misc/Makefile \
include/nel/net/Makefile \
include/nel/3d/Makefile \
include/nel/pacs/Makefile \
include/nel/sound/Makefile \
include/nel/georges/Makefile \
include/nel/cegui/Makefile \
src/Makefile \
src/misc/Makefile \
src/misc/nel-misc.pc \
src/misc/config_file/Makefile \
src/net/Makefile \
src/3d/Makefile \
src/3d/nel-3d.pc \
src/3d/driver/Makefile \
src/3d/driver/opengl/Makefile \
src/3d/driver/opengl/nel-driverogl.pc \
src/pacs/Makefile \
src/sound/Makefile \
src/sound/driver/Makefile \
src/sound/driver/fmod/Makefile \
src/sound/driver/openal/Makefile \
src/georges/Makefile \
src/ligo/Makefile \
src/cegui/Makefile \
tools/Makefile \
tools/3d/Makefile \
tools/3d/build_coarse_mesh/Makefile \
tools/3d/build_far_bank/Makefile \
tools/3d/build_smallbank/Makefile \
tools/3d/ig_lighter/Makefile \
tools/3d/ig_lighter_lib/Makefile \
tools/3d/panoply_maker/Makefile \
tools/3d/zone_dependencies/Makefile \
tools/3d/zone_ig_lighter/Makefile \
tools/3d/zone_lib/Makefile \
tools/3d/zone_lighter/Makefile \
tools/3d/zone_welder/Makefile \
tools/misc/Makefile \
tools/misc/bnp_make/Makefile \
tools/misc/disp_sheet_id/Makefile \
tools/misc/make_sheet_id/Makefile \
tools/misc/xml_packer/Makefile \
tools/pacs/Makefile \
tools/pacs/build_ig_boxes/Makefile \
tools/pacs/build_indoor_rbank/Makefile \
tools/pacs/build_rbank/Makefile \
samples/Makefile \
samples/sound_sources/Makefile \
samples/pacs/Makefile \
samples/georges/Makefile \
samples/3d/Makefile \
samples/3d/font/Makefile \
samples/3d/cluster_viewer/Makefile \
samples/3d/cluster_viewer/shapes/Makefile \
samples/3d/cluster_viewer/groups/Makefile \
samples/3d/cluster_viewer/fonts/Makefile \
samples/3d/cegui/Makefile \
samples/misc/Makefile \
samples/misc/command/Makefile \
samples/misc/configfile/Makefile \
samples/misc/debug/Makefile \
samples/misc/i18n/Makefile \
samples/misc/log/Makefile \
samples/misc/strings/Makefile \
samples/misc/types_check/Makefile \
samples/net/Makefile \
samples/net/chat/Makefile \
samples/net/udp/Makefile \
samples/net/login_system/Makefile \
nel-config
])
AC_OUTPUT
# samples/net/class_transport/Makefile \
# tools/nel_unit_test/Makefile \
# tools/nel_unit_test/misc_ut/Makefile \
# tools/nel_unit_test/ligo_ut/Makefile \
# tools/nel_unit_test/net_ut/Makefile \
# tools/nel_unit_test/net_ut/net_service_lib_test/Makefile \
# tools/nel_unit_test/net_ut/net_module_lib_test/Makefile \
# End of configure.in

View file

@ -1,10 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = nel
pkginclude_HEADERS = nelconfig.h
# End of Makefile.am

View file

@ -1,343 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/3d
include_HEADERS = \
animatable.h \
animated_lightmap.h \
animated_material.h \
animated_morph.h \
animated_value.h \
animation.h \
animation_optimizer.h \
animation_playlist.h \
animation_set.h \
animation_set_user.h \
animation_time.h \
anim_ctrl.h \
anim_detail_trav.h \
async_file_manager_3d.h \
async_texture_block.h \
async_texture_manager.h \
bezier_patch.h \
bloom_effect.h \
bone.h \
bsp_tree.h \
camera_col.h \
camera.h \
channel_mixer.h \
clip_trav.h \
cloud.h \
cloud_scape.h \
cloud_scape_user.h \
cluster.h \
coarse_mesh_build.h \
coarse_mesh_manager.h \
computed_string.h \
cube_grid.h \
cube_map_builder.h \
debug_vb.h \
deform_2d.h \
driver.h \
driver_material_inline.h \
driver_user.h \
dru.h \
event_mouse_listener.h \
fasthls_modifier.h \
fast_ptr_list.h \
flare_model.h \
flare_shape.h \
font_generator.h \
font_manager.h \
frustum.h \
heat_haze.h \
height_map.h \
hls_color_texture.h \
hls_texture_bank.h \
hls_texture_manager.h \
hrc_trav.h \
ig_surface_light_build.h \
ig_surface_light.h \
index_buffer.h \
init_3d.h \
instance_group_user.h \
instance_lighter.h \
key.h \
landscape_collision_grid.h \
landscape_def.h \
landscape_face_vector_manager.h \
landscape.h \
landscapeig_manager.h \
landscape_model.h \
landscape_profile.h \
landscape_user.h \
landscapevb_allocator.h \
landscapevb_info.h \
landscape_vegetable_block.h \
layered_ordering_table.h \
light_contribution.h \
light.h \
light_influence_interpolator.h \
lighting_manager.h \
light_trav.h \
light_user.h \
load_balancing_trav.h \
lod_character_builder.h \
lod_character_instance.h \
lod_character_manager.h \
lod_character_shape_bank.h \
lod_character_shape.h \
lod_character_texture.h \
logic_info.h \
material.h \
matrix_3x4.h \
mesh_base.h \
mesh_base_instance.h \
mesh_blender.h \
mesh_block_manager.h \
mesh_geom.h \
mesh.h \
mesh_instance.h \
mesh_morpher.h \
mesh_mrm.h \
mesh_mrm_instance.h \
mesh_mrm_skinned.h \
mesh_mrm_skinned_instance.h \
mesh_multi_lod.h \
mesh_multi_lod_instance.h \
mesh_vertex_program.h \
meshvp_per_pixel_light.h \
meshvp_wind_tree.h \
mini_col.h \
motion_blur.h \
mrm_builder.h \
mrm_internal.h \
mrm_level_detail.h \
mrm_mesh.h \
mrm_parameters.h \
nelu.h \
noise_3d.h \
occlusion_query.h \
ordering_table.h \
packed_world.h \
packed_zone.h \
particle_system.h \
particle_system_manager.h \
particle_system_model.h \
particle_system_process.h \
particle_system_shape.h \
patchdlm_context.h \
patch.h \
patch_rdr_pass.h \
patchuv_locator.h \
play_list_manager.h \
play_list_manager_user.h \
play_list_user.h \
point_light.h \
point_light_influence.h \
point_light_model.h \
point_light_named_array.h \
point_light_named.h \
portal.h \
primitive_profile.h \
ps_allocator.h \
ps_attrib.h \
ps_attrib_maker_bin_op.h \
ps_attrib_maker_bin_op_inline.h \
ps_attrib_maker.h \
ps_attrib_maker_helper.h \
ps_attrib_maker_iterators.h \
ps_attrib_maker_template.h \
ps_color.h \
ps_direction.h \
ps_dot.h \
ps_edit.h \
ps_emitter.h \
ps_face.h \
ps_face_look_at.h \
ps_fan_light.h \
ps_float.h \
ps_force.h \
ps_int.h \
ps_iterator.h \
ps_light.h \
ps_located.h \
ps_lod.h \
ps_macro.h \
ps_mesh.h \
ps_misc.h \
ps_particle2.h \
ps_particle_basic.h \
ps_particle.h \
ps_plane_basis.h \
ps_plane_basis_maker.h \
ps_quad.h \
ps_register_color_attribs.h \
ps_register_float_attribs.h \
ps_register_int_attribs.h \
ps_register_plane_basis_attribs.h \
ps_ribbon_base.h \
ps_ribbon.h \
ps_ribbon_look_at.h \
ps_shockwave.h \
ps_sound.h \
ps_spawn_info.h \
ps_tail_dot.h \
ps_util.h \
ps_zone.h \
ptr_set.h \
quad_effect.h \
quad_grid_clip_cluster.h \
quad_grid_clip_manager.h \
quad_grid.h \
quad_tree.h \
radix_sort.h \
raw_skin.h \
raw_skinned.h \
ray_mesh.h \
register_3d.h \
render_trav.h \
root_model.h \
scene_group.h \
scene.h \
scene_user.h \
scissor.h \
seg_remanence.h \
seg_remanence_shape.h \
shader.h \
shadow_map.h \
shadow_map_manager.h \
shadow_poly_receiver.h \
shadow_skin.h \
shape_bank.h \
shape_bank_user.h \
shape.h \
shape_info.h \
shifted_triangle_cache.h \
skeleton_model.h \
skeleton_shape.h \
skeleton_spawn_script.h \
skeleton_weight.h \
static_quad_grid.h \
stripifier.h \
surface_light_grid.h \
tangent_space_build.h \
target_anim_ctrl.h \
tess_block.h \
tessellation.h \
tess_face_priority_list.h \
tess_list.h \
text_context.h \
text_context_user.h \
texture_blank.h \
texture_blend.h \
texture_bloom.h \
texture_bump.h \
texture_cube.h \
texture_dlm.h \
texture_emboss.h \
texture_far.h \
texture_file.h \
texture_font.h \
texture_grouped.h \
texture.h \
texture_mem.h \
texture_multi_file.h \
texture_near.h \
texture_user.h \
tile_bank.h \
tile_color.h \
tile_element.h \
tile_far_bank.h \
tile_light_influence.h \
tile_lumel.h \
tile_noise_map.h \
tile_vegetable_desc.h \
track_bezier.h \
track.h \
track_keyframer.h \
track_sampled_common.h \
track_sampled_quat.h \
track_sampled_quat_small_header.h \
track_sampled_vector.h \
track_tcb.h \
transformable.h \
transform.h \
transform_shape.h \
trav_scene.h \
u_3d_mouse_listener.h \
u_animation.h \
u_animation_set.h \
u_bone.h \
u_camera.h \
u_cloud_scape.h \
u_driver.h \
u_instance_group.h \
u_instance.h \
u_instance_material.h \
u_landscape.h \
u_light.h \
u_material.h \
u_particle_system_instance.h \
u_particle_system_sound.h \
u_play_list.h \
u_play_list_manager.h \
u_point_light.h \
u_ps_sound_impl.h \
u_ps_sound_interface.h \
u_scene.h \
u_shape_bank.h \
u_shape.h \
u_skeleton.h \
u_text_context.h \
u_texture.h \
u_track.h \
u_transformable.h \
u_transform.h \
u_visual_collision_entity.h \
u_visual_collision_manager.h \
u_visual_collision_mesh.h \
u_water_env_map.h \
u_water.h \
vegetable_blend_layer_model.h \
vegetable_clip_block.h \
vegetable_def.h \
vegetable.h \
vegetable_instance_group.h \
vegetable_light_ex.h \
vegetable_manager.h \
vegetable_quadrant.h \
vegetable_shape.h \
vegetable_sort_block.h \
vegetable_uv8.h \
vegetablevb_allocator.h \
vertex_buffer.h \
vertex_buffer_heap.h \
vertex_program.h \
vertex_program_parse.h \
vertex_stream_manager.h \
viewport.h \
visual_collision_entity.h \
visual_collision_entity_user.h \
visual_collision_manager.h \
visual_collision_manager_user.h \
visual_collision_mesh.h \
water_env_map.h \
water_env_map_user.h \
water_height_map.h \
water_model.h \
water_pool_manager.h \
water_shape.h \
zone_corner_smoother.h \
zone.h \
zone_lighter.h \
zone_manager.h \
zone_search.h \
zone_smoother.h \
zone_symmetrisation.h \
zone_tgt_smoother.h
# End of Makefile.am

View file

@ -1,13 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
DIST_SUBDIRS = net 3d pacs sound misc georges ligo
SUBDIRS = @NEL_SUBDIRS@
includedir = ${prefix}/include/nel
# End of Makefile.am

View file

@ -1,11 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2001-08-01 08:45:06 valignat Exp $
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/cegui
include_HEADERS = nelrenderer.h nelresourceprovider.h neltexture.h
# End of Makefile.am

View file

@ -1,15 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/georges
include_HEADERS = load_form.h \
u_form_dfn.h \
u_form_elm.h \
u_form.h \
u_form_loader.h \
u_type.h
# End of Makefile.am

View file

@ -1,14 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/ligo
include_HEADERS = ligo_config.h \
primitive_class.h \
primitive_configuration.h \
primitive.h \
primitive_utils.h
# End of Makefile.am

View file

@ -1,143 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/misc
include_HEADERS = aabbox.h \
algo.h \
app_context.h \
array_2d.h \
async_file_manager.h \
big_file.h \
bitmap.h \
bit_mem_stream.h \
bit_set.h \
block_memory.h \
bsphere.h \
buf_fifo.h \
check_fpu.h \
class_id.h \
class_registry.h \
command.h \
common.h \
config_file.h \
contiguous_block_allocator.h \
co_task.h \
cpu_time_stat.h \
debug.h \
di_event_emitter.h \
diff_tool.h \
displayer.h \
dummy_window.h \
dynloadlib.h \
eid_translator.h \
entity_id.h \
enum_bitset.h \
eval_num_expr.h \
event_emitter.h \
event_emitter_multi.h \
event_listener.h \
event_server.h \
events.h \
factory.h \
fast_floor.h \
fast_mem.h \
file.h \
fixed_size_allocator.h \
game_device_events.h \
game_device.h \
geom_ext.h \
grid_traversal.h \
gtk_displayer.h \
heap_memory.h \
hierarchical_timer.h \
historic.h \
i18n.h \
input_device.h \
input_device_manager.h \
input_device_server.h \
inter_window_msg_queue.h \
i_xml.h \
keyboard_device.h \
line.h \
log.h \
matrix.h \
md5.h \
mem_displayer.h \
mem_stream.h \
mouse_device.h \
mouse_smoother.h \
mutable_container.h \
mutex.h \
noise_value.h \
object_arena_allocator.h \
object_vector.h \
o_xml.h \
path.h \
plane.h \
plane_inline.h \
polygon.h \
pool_memory.h \
progress_callback.h \
p_thread.h \
quad.h \
quat.h \
random.h \
reader_writer.h \
rect.h \
report.h \
resource_ptr.h \
resource_ptr_inline.h \
rgba.h \
sha1.h \
shared_memory.h \
sheet_id.h \
singleton.h \
smart_ptr.h \
smart_ptr_inline.h \
speaker_listener.h \
sstring.h \
static_map.h \
stl_block_allocator.h \
stl_block_list.h \
stop_watch.h \
stream.h \
stream_inline.h \
string_common.h \
string_conversion.h \
string_id_array.h \
string_mapper.h \
string_stream.h \
system_info.h \
task_manager.h \
tds.h \
thread.h \
time_nl.h \
timeout_assertion_thread.h \
traits_nl.h \
triangle.h \
twin_map.h \
types_nl.h \
ucstring.h \
uv.h \
value_smoother.h \
variable.h \
vector_2d.h \
vector_2f.h \
vectord.h \
vectord_inline.h \
vector.h \
vector_h.h \
vector_inline.h \
win32_util.h \
win_displayer.h \
window_displayer.h \
win_event_emitter.h \
win_thread.h \
win_tray.h \
words_dictionary.h \
xml_pack.h
# End of Makefile.am

View file

@ -342,6 +342,8 @@ std::string secondsToHumanReadable (uint32 time);
/// Get a bytes or time in string format and convert it in seconds or bytes /// Get a bytes or time in string format and convert it in seconds or bytes
uint32 fromHumanReadable (const std::string &str); uint32 fromHumanReadable (const std::string &str);
/// Add digit grouping seperator to if value >= 10 000. Assumes input is numerical string.
std::string formatThousands(const std::string& s);
/// This function executes a program in the background and returns instantly (used for example to launch services in AES). /// This function executes a program in the background and returns instantly (used for example to launch services in AES).
/// The program will be launched in the current directory /// The program will be launched in the current directory

View file

@ -146,6 +146,8 @@ public:
TAdditionalInfoCb EntityInfoCallback; TAdditionalInfoCb EntityInfoCallback;
static void removeShardFromName(ucstring& name);
private: private:
// get all eid for a user using the user name or the user id // get all eid for a user using the user name or the user id
void getByUser (uint32 uid, std::vector<NLMISC::CEntityId> &res); void getByUser (uint32 uid, std::vector<NLMISC::CEntityId> &res);

View file

@ -49,7 +49,7 @@ public:
* \param server * \param server
*/ */
virtual void submitEvents(CEventServer & server, bool allWindows) = 0; virtual void submitEvents(CEventServer & server, bool allWindows) = 0;
/** /**
* Instruct the event emitter to send CGDMouseMove instead of CEventMouseMove. * Instruct the event emitter to send CGDMouseMove instead of CEventMouseMove.
* *

View file

@ -1,48 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/net
include_HEADERS = admin.h \
buf_client.h \
buf_net_base.h \
buf_server.h \
buf_sock.h \
callback_client.h \
callback_net_base.h \
callback_server.h \
cvar_log_filter.h \
dummy_tcp_sock.h \
email.h \
inet_address.h \
listen_sock.h \
login_client.h \
login_cookie.h \
login_server.h \
message.h \
message_recorder.h \
module_builder_parts.h \
module_common.h \
module_gateway.h \
module.h \
module_manager.h \
module_message.h \
module_socket.h \
naming_client.h \
net_displayer.h \
net_log.h \
net_manager.h \
pacs_client.h \
service.h \
sock.h \
tcp_sock.h \
transport_class.h \
udp_sim_sock.h \
udp_sock.h \
unified_network.h \
unitime.h \
varpath.h
# End of Makefile.am

View file

@ -75,7 +75,7 @@ public:
enum TProp { enum TProp {
PropUInt8, PropUInt16, PropUInt32, PropUInt64, PropUInt8, PropUInt16, PropUInt32, PropUInt64,
PropSInt8, PropSInt16, PropSInt32, PropSInt64, PropSInt8, PropSInt16, PropSInt32, PropSInt64,
PropBool, PropFloat, PropDouble, PropString, PropDataSetRow, PropSheetId, PropUKN }; PropBool, PropFloat, PropDouble, PropString, PropDataSetRow, PropSheetId, PropUCString, PropUKN };
// PropBool, PropFloat, PropDouble, PropString, PropDataSetRow, PropEntityId, PropSheetId, PropUKN }; // PropBool, PropFloat, PropDouble, PropString, PropDataSetRow, PropEntityId, PropSheetId, PropUKN };
@ -160,6 +160,7 @@ public:
case PropString: nlassert(sizeof(T) == sizeof (std::string)); break; case PropString: nlassert(sizeof(T) == sizeof (std::string)); break;
// case PropEntityId: nlassert(sizeof(T) == sizeof (NLMISC::CEntityId)); break; // case PropEntityId: nlassert(sizeof(T) == sizeof (NLMISC::CEntityId)); break;
case PropSheetId: nlassert(sizeof(T) == sizeof (NLMISC::CSheetId)); break; case PropSheetId: nlassert(sizeof(T) == sizeof (NLMISC::CSheetId)); break;
case PropUCString: nlassert(sizeof(T) == sizeof (ucstring)); break;
default: nlerror ("property %s have unknown type %d", name.c_str(), type); default: nlerror ("property %s have unknown type %d", name.c_str(), type);
} }

View file

@ -1,17 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/pacs
include_HEADERS = u_collision_desc.h \
u_global_position.h \
u_global_retriever.h \
u_move_container.h \
u_move_primitive.h \
u_primitive_block.h \
u_retriever_bank.h
# End of Makefile.am

View file

@ -1,15 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
includedir = ${prefix}/include/nel/sound
include_HEADERS = sound_animation.h \
sound_anim_manager.h \
sound_anim_marker.h \
u_audio_mixer.h \
u_listener.h \
u_source.h
# End of Makefile.am

View file

View file

@ -1,11 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:05 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = font cluster_viewer @CEGUI_SUBDIR@
# End of Makefile.am

View file

@ -1,22 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = demonel_8.sln demonel_8.vcproj demonel.rc demonel.sln demonel.vcproj icon1.ico datafiles
bin_PROGRAMS = nel_sample_cegui
nel_sample_cegui_SOURCES = main.cpp NeLDriver.cpp
AM_CXXFLAGS = -I$(top_srcdir)/src @CEGUI_CFLAGS@
nel_sample_cegui_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/3d/libnel3d.la \
../../../src/cegui/libnelceguirenderer.la \
@CEGUI_LIBS@
# End of Makefile.am

View file

@ -1,24 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = shapes groups fonts
bin_PROGRAMS = cluster_viewer
cluster_viewer_SOURCES = main.cpp
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer
cluster_viewer_DATA = readme.txt main.cvs
AM_CXXFLAGS = -DCV_DIR="\"$(cluster_viewerdir)\"" -I$(top_srcdir)/src
cluster_viewer_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/3d/libnel3d.la
# End of Makefile.am

View file

@ -1,12 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/fonts/
cluster_viewer_DATA = n019003l.pfb
# End of Makefile.am

View file

@ -1,12 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/groups/
cluster_viewer_DATA = street.ig
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
cluster_viewerdir = $(datadir)/nel/samples/cluster_viewer/shapes/
cluster_viewer_DATA = box02.shape \
sphere01.shape \
sphere02.shape \
sphere03.shape \
sphere04.shape \
sphere05.shape \
sphere06.shape \
sphere07.shape \
sphere08.shape
# End of Makefile.am

View file

@ -1,21 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = font
font_SOURCES = main.cpp
fontdir = $(datadir)/nel/samples/font
font_DATA = beteckna.ttf
AM_CXXFLAGS = -DFONT_DIR="\"$(fontdir)\"" -I$(top_srcdir)/src
font_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/3d/libnel3d.la
# End of Makefile.am

View file

@ -1,12 +0,0 @@
#
# $Id: Makefile.am,v 1.2 2005/04/13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
DIST_SUBDIRS = sound_sources pacs georges 3d net misc
SUBDIRS = pacs georges 3d net misc
# End of Makefile.am

View file

@ -1,24 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = georges_sample_8.vcproj georges_sample.sln georges_sample.vcproj
bin_PROGRAMS = georges
georges_SOURCES = main.cpp
georgesdir = $(datadir)/nel/samples/georges
georges_DATA = boolean.typ coolfilesinfo.dfn default.sample_config int.typ positiondata.dfn sample_config.dfn string.typ
AM_CXXFLAGS = -DGF_DIR="\"$(georgesdir)\"" -I$(top_srcdir)/src
georges_LDADD = ../../src/misc/libnelmisc.la \
../../src/georges/libnelgeorges.la
# End of Makefile.am

View file

@ -1,10 +0,0 @@
#
# $Id: Makefile.am,v 1.2 2005-04-13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = command configfile debug i18n log strings
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = command_8.vcproj main.dsp main.dsw
bin_PROGRAMS = command
command_SOURCES = main.cpp
commanddir = $(datadir)/nel/samples/command
AM_CXXFLAGS = -I$(top_srcdir)/src
command_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,23 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = configfile_8.vcproj main.dsp main.dsw
bin_PROGRAMS = configfile
configfile_SOURCES = main.cpp
configfiledir = $(datadir)/nel/samples/configfile
configfile_DATA = simpletest.txt
AM_CXXFLAGS = -DCF_DIR="\"$(configfiledir)\"" -I$(top_srcdir)/src
configfile_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = debug_8.vcproj main.dsp main.dsw
bin_PROGRAMS = debug
debug_SOURCES = main.cpp
debugdir = $(datadir)/nel/samples/debug
AM_CXXFLAGS = -I$(top_srcdir)/src
debug_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,23 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = i18n_8.vcproj main.dsp main.dsw
bin_PROGRAMS = i18n
i18n_SOURCES = main.cpp
i18ndir = $(datadir)/nel/samples/i18n
i18n_DATA = en.uxt fr.uxt de.uxt
AM_CXXFLAGS = -DI18N_DIR="\"$(i18ndir)\"" -I$(top_srcdir)/src
i18n_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = log_8.vcproj main.dsp main.dsw
bin_PROGRAMS = log
log_SOURCES = main.cpp
logdir = $(datadir)/nel/samples/log
AM_CXXFLAGS = -I$(top_srcdir)/src
log_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = main.dsp main.dsw strings_8.vcproj
bin_PROGRAMS = strings
strings_SOURCES = main.cpp
stringsdir = $(datadir)/nel/samples/strings
AM_CXXFLAGS = -I$(top_srcdir)/src
strings_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,20 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = main.dsp main.dsw types_check_8.vcproj
bin_PROGRAMS = types_check
types_check_SOURCES = main.cpp
types_checkdir = $(datadir)/nel/samples/types_check
AM_CXXFLAGS = -I$(top_srcdir)/src
types_check_LDADD = ../../../src/misc/libnelmisc.la
# End of Makefile.am

View file

@ -1,11 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = chat udp login_system
# End of Makefile.am

View file

@ -1,27 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = chatserver chatclient
chatserver_SOURCES = server.cpp
chatclient_SOURCES = client.cpp kbhit.h kbhit.cpp
chatserverdir=$(datadir)/nel/samples/net/chat
chatserver_DATA=chat_service.cfg
chatclientdir=$(datadir)/nel/samples/net/chat
chatclient_DATA=client.cfg
AM_CXXFLAGS = -DCHAT_DIR="\"$(chatclientdir)\"" -I$(top_srcdir)/src
chatserver_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
chatclient_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
# End of Makefile.am

View file

@ -1,30 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = main.dsw client.dsp client.cfg frontend_service.cfg frontend_service.dsp
bin_PROGRAMS = nls_login_client nls_frontend_service
nls_frontend_service_SOURCES = frontend_service.cpp
nls_login_client_SOURCES = client.cpp
nls_frontend_servicedir=$(datadir)/nel/samples/net/udp
nls_frontend_service_DATA=frontend_service.cfg
nls_login_clientdir=$(datadir)/nel/samples/net/udp
nls_login_client_DATA=client.cfg
AM_CXXFLAGS = -DLC_DIR="\"$(nls_login_clientdir)\"" -I$(top_srcdir)/src
nls_frontend_service_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
nls_login_client_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
# End of Makefile.am

View file

@ -1,32 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005-04-13 12:37:26 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = main.dsw main.sln bench_service_8.vcproj bench_service.vcproj bench_service.dsp client_8.vcproj client.dsp client.vcproj readme.txt
bin_PROGRAMS = udp_bench_service udp_bench_client
udp_bench_service_SOURCES = bench_service.cpp receive_task.cpp receive_task.h
udp_bench_client_SOURCES = client.cpp graph.cpp graph.h simlag.cpp simlag.h
noinst_HEADERS = receive_task.h graph.h simlag.h
udp_bench_servicedir=$(datadir)/nel/samples/net/udp
udp_bench_service_DATA= bench_service.cfg
udp_bench_clientdir=$(datadir)/nel/samples/net/udp
udp_bench_client_DATA=client.cfg
AM_CXXFLAGS = -DUDP_DIR="\"$(udp_bench_clientdir)\"" -I$(top_srcdir)/src
udp_bench_service_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
udp_bench_client_LDADD = ../../../src/misc/libnelmisc.la \
../../../src/net/libnelnet.la
# End of Makefile.am

View file

@ -1,19 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = pacs_sample
pacs_sample_SOURCES = main.cpp object.cpp object.h
AM_CXXFLAGS = -I$(top_srcdir)/src
pacs_sample_LDADD = ../../src/misc/libnelmisc.la \
../../src/3d/libnel3d.la \
../../src/pacs/libnelpacs.la
# End of Makefile.am

View file

@ -1,23 +0,0 @@
#
# $Id: Makefile.am,v 1.1 2005/04/04 09:45:06 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = sound_sources
sound_sources_SOURCES = main.cpp
AM_CXXFLAGS = -I$(top_srcdir)/src
sound_sources_LDADD = ../../src/misc/libnelmisc.la \
../../src/sound/libnelsnd.la \
../../src/sound/driver/libnelsnd_lowlevel.la \
../../src/sound/driver/fmod/libnel_drv_fmod.la \
../../src/ligo/libnelligo.la \
../../src/georges/libnelgeorges.la \
../../src/3d/libnel3d.la
# End of Makefile.am

View file

@ -706,6 +706,9 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-3d.pc) NL_GEN_PC(nel-3d.pc)
INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nel3d LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
ADD_SUBDIRECTORY(driver) ADD_SUBDIRECTORY(driver)

View file

@ -1,616 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = driver
lib_LTLIBRARIES = libnel3d.la
EXTRA_DIST = mesh_mrm_skin_template.cpp mesh_mrm_skinned_template.cpp
libnel3d_la_SOURCES = \
anim_ctrl.cpp \
anim_detail_trav.cpp \
anim_detail_trav.h \
animatable.cpp \
animatable.h \
animated_lightmap.cpp \
animated_lightmap.h \
animated_material.cpp \
animated_material.h \
animated_morph.cpp \
animated_morph.h \
animated_value.cpp \
animated_value.h \
animation.cpp \
animation.h \
animation_optimizer.cpp \
animation_optimizer.h \
animation_playlist.cpp \
animation_playlist.h \
animation_set.cpp \
animation_set.h \
animation_set_user.cpp \
animation_set_user.h \
animation_time.cpp \
async_file_manager_3d.cpp \
async_file_manager_3d.h \
async_texture_block.cpp \
async_texture_block.h \
async_texture_manager.cpp \
async_texture_manager.h \
bezier_patch.cpp \
bezier_patch.h \
bloom_effect.cpp \
bloom_effect.h \
bone.cpp \
bone.h \
bsp_tree.h \
camera.cpp \
camera.h \
camera_col.cpp \
camera_col.h \
channel_mixer.cpp \
channel_mixer.h \
clip_trav.cpp \
clip_trav.h \
cloud.cpp \
cloud.h \
cloud_scape.cpp \
cloud_scape.h \
cloud_scape_user.cpp \
cloud_scape_user.h \
cluster.cpp \
cluster.h \
coarse_mesh_build.cpp \
coarse_mesh_build.h \
coarse_mesh_manager.cpp \
coarse_mesh_manager.h \
computed_string.cpp \
computed_string.h \
cube_grid.cpp \
cube_grid.h \
cube_map_builder.cpp \
cube_map_builder.h \
debug_vb.cpp \
debug_vb.h \
deform_2d.cpp \
deform_2d.h \
driver.cpp \
driver.h \
driver_material_inline.h \
driver_user.cpp \
driver_user.h \
driver_user2.cpp \
dru.cpp \
dru.h \
event_mouse_listener.cpp \
event_mouse_listener.h \
fast_ptr_list.cpp \
fast_ptr_list.h \
fasthls_modifier.cpp \
fasthls_modifier.h \
flare_model.cpp \
flare_model.h \
flare_shape.cpp \
flare_shape.h \
font_generator.cpp \
font_generator.h \
font_manager.cpp \
font_manager.h \
frustum.cpp \
heat_haze.cpp \
heat_haze.h \
height_map.cpp \
hls_color_texture.cpp \
hls_color_texture.h \
hls_texture_bank.cpp \
hls_texture_bank.h \
hls_texture_manager.cpp \
hls_texture_manager.h \
hrc_trav.cpp \
hrc_trav.h \
ig_surface_light.cpp \
ig_surface_light.h \
ig_surface_light_build.cpp \
ig_surface_light_build.h \
index_buffer.cpp \
index_buffer.h \
init_3d.cpp \
init_3d.h \
instance_group_user.cpp \
instance_group_user.h \
instance_lighter.cpp \
instance_lighter.h \
key.cpp \
key.h \
landscape.cpp \
landscape.h \
landscape_collision_grid.cpp \
landscape_collision_grid.h \
landscape_def.cpp \
landscape_def.h \
landscape_face_vector_manager.cpp \
landscape_face_vector_manager.h \
landscape_model.cpp \
landscape_model.h \
landscape_profile.cpp \
landscape_profile.h \
landscape_user.cpp \
landscape_user.h \
landscape_vegetable_block.cpp \
landscape_vegetable_block.h \
landscapeig_manager.cpp \
landscapevb_allocator.cpp \
landscapevb_allocator.h \
landscapevb_info.cpp \
landscapevb_info.h \
layered_ordering_table.h \
light.cpp \
light.h \
light_contribution.cpp \
light_contribution.h \
light_influence_interpolator.cpp \
light_influence_interpolator.h \
light_trav.cpp \
light_trav.h \
light_user.cpp \
light_user.h \
lighting_manager.cpp \
lighting_manager.h \
load_balancing_trav.cpp \
load_balancing_trav.h \
lod_character_builder.cpp \
lod_character_builder.h \
lod_character_instance.cpp \
lod_character_instance.h \
lod_character_manager.cpp \
lod_character_manager.h \
lod_character_shape.cpp \
lod_character_shape.h \
lod_character_shape_bank.cpp \
lod_character_shape_bank.h \
lod_character_texture.cpp \
lod_character_texture.h \
logic_info.cpp \
material.cpp \
material.h \
matrix_3x4.cpp \
matrix_3x4.h \
mesh.cpp \
mesh.h \
mesh_base.cpp \
mesh_base.h \
mesh_base_instance.cpp \
mesh_base_instance.h \
mesh_blender.cpp \
mesh_blender.h \
mesh_block_manager.cpp \
mesh_block_manager.h \
mesh_geom.cpp \
mesh_geom.h \
mesh_instance.cpp \
mesh_instance.h \
mesh_morpher.cpp \
mesh_morpher.h \
mesh_mrm.cpp \
mesh_mrm.h \
mesh_mrm_instance.cpp \
mesh_mrm_instance.h \
mesh_mrm_skin.cpp \
mesh_mrm_skin_template.cpp \
mesh_mrm_skinned.cpp \
mesh_mrm_skinned.h \
mesh_mrm_skinned_instance.cpp \
mesh_mrm_skinned_instance.h \
mesh_mrm_skinned_template.cpp \
mesh_multi_lod.cpp \
mesh_multi_lod.h \
mesh_multi_lod_instance.cpp \
mesh_multi_lod_instance.h \
mesh_vertex_program.cpp \
mesh_vertex_program.h \
meshvp_per_pixel_light.cpp \
meshvp_per_pixel_light.h \
meshvp_wind_tree.cpp \
meshvp_wind_tree.h \
mini_col.cpp \
mini_col.h \
motion_blur.cpp \
motion_blur.h \
mrm_builder.cpp \
mrm_builder.h \
mrm_internal.cpp \
mrm_internal.h \
mrm_level_detail.cpp \
mrm_level_detail.h \
mrm_mesh.cpp \
mrm_mesh.h \
mrm_parameters.cpp \
mrm_parameters.h \
nelu.cpp \
nelu.h \
noise_3d.cpp \
noise_3d.h \
occlusion_query.h \
ordering_table.h \
packed_zone.cpp \
packed_zone.h \
packed_world.cpp \
packed_world.h \
particle_system.cpp \
particle_system.h \
particle_system_manager.cpp \
particle_system_manager.h \
particle_system_model.cpp \
particle_system_model.h \
particle_system_process.cpp \
particle_system_process.h \
particle_system_shape.cpp \
particle_system_shape.h \
particle_system_sound_user.cpp \
patch.cpp \
patch.h \
patch_lightmap.cpp \
patch_noise.cpp \
patch_rdr_pass.cpp \
patch_rdr_pass.h \
patch_render.cpp \
patch_vegetable.cpp \
patchdlm_context.cpp \
patchdlm_context.h \
patchuv_locator.cpp \
patchuv_locator.h \
play_list_manager.cpp \
play_list_manager.h \
play_list_manager_user.cpp \
play_list_manager_user.h \
play_list_user.cpp \
play_list_user.h \
point_light.cpp \
point_light.h \
point_light_model.cpp \
point_light_model.h \
point_light_named.cpp \
point_light_named.h \
point_light_named_array.cpp \
point_light_named_array.h \
portal.cpp \
portal.h \
primitive_profile.cpp \
ps_allocator.cpp \
ps_allocator.h \
ps_attrib.h \
ps_attrib_maker.h \
ps_attrib_maker_bin_op.cpp \
ps_attrib_maker_bin_op.h \
ps_attrib_maker_bin_op_inline.h \
ps_attrib_maker_helper.cpp \
ps_attrib_maker_helper.h \
ps_attrib_maker_iterators.h \
ps_attrib_maker_template.cpp \
ps_attrib_maker_template.h \
ps_color.cpp \
ps_color.h \
ps_direction.h \
ps_dot.cpp \
ps_dot.h \
ps_edit.h \
ps_emitter.cpp \
ps_emitter.h \
ps_face.cpp \
ps_face.h \
ps_face_look_at.cpp \
ps_face_look_at.h \
ps_fan_light.cpp \
ps_fan_light.h \
ps_float.cpp \
ps_float.h \
ps_force.cpp \
ps_force.h \
ps_int.cpp \
ps_int.h \
ps_iterator.h \
ps_light.cpp \
ps_light.h \
ps_located.cpp \
ps_located.h \
ps_lod.h \
ps_macro.h \
ps_mesh.cpp \
ps_mesh.h \
ps_misc.h \
ps_particle.cpp \
ps_particle.h \
ps_particle2.cpp \
ps_particle2.h \
ps_particle_basic.cpp \
ps_particle_basic.h \
ps_plane_basis.h \
ps_plane_basis_maker.cpp \
ps_plane_basis_maker.h \
ps_quad.cpp \
ps_quad.h \
ps_register_attribs.cpp \
ps_register_color_attribs.h \
ps_register_emitters.cpp \
ps_register_float_attribs.h \
ps_register_forces.cpp \
ps_register_int_attribs.h \
ps_register_particles.cpp \
ps_register_plane_basis_attribs.h \
ps_register_zones.cpp \
ps_ribbon.cpp \
ps_ribbon.h \
ps_ribbon_base.cpp \
ps_ribbon_base.h \
ps_ribbon_look_at.cpp \
ps_ribbon_look_at.h \
ps_shockwave.cpp \
ps_shockwave.h \
ps_spawn_info.h \
ps_sound.cpp \
ps_sound.h \
ps_tail_dot.cpp \
ps_tail_dot.h \
ps_util.cpp \
ps_util.h \
ps_zone.cpp \
ps_zone.h \
ptr_set.cpp \
ptr_set.h \
quad_effect.cpp \
quad_effect.h \
quad_grid.cpp \
quad_grid.h \
quad_grid_clip_cluster.cpp \
quad_grid_clip_cluster.h \
quad_grid_clip_manager.cpp \
quad_grid_clip_manager.h \
radix_sort.cpp \
radix_sort.h \
raw_skin.cpp \
raw_skin.h \
raw_skinned.cpp \
raw_skinned.h \
ray_mesh.cpp \
ray_mesh.h \
register_3d.cpp \
register_3d.h \
render_trav.cpp \
render_trav.h \
root_model.cpp \
root_model.h \
scene.cpp \
scene.h \
scene_group.cpp \
scene_group.h \
scene_user.cpp \
scene_user.h \
scissor.cpp \
seg_remanence.cpp \
seg_remanence.h \
seg_remanence_shape.cpp \
seg_remanence_shape.h \
shader.cpp \
shader.h \
shadow_map.cpp \
shadow_map.h \
shadow_map_manager.cpp \
shadow_map_manager.h \
shadow_poly_receiver.cpp \
shadow_poly_receiver.h \
shadow_skin.cpp \
shadow_skin.h \
shape.cpp \
shape.h \
shape_bank.cpp \
shape_bank.h \
shape_bank_user.cpp \
shape_bank_user.h \
shape_info.cpp \
shape_info.h \
shifted_triangle_cache.cpp \
shifted_triangle_cache.h \
skeleton_model.cpp \
skeleton_model.h \
skeleton_shape.cpp \
skeleton_shape.h \
skeleton_spawn_script.cpp \
skeleton_spawn_script.h \
skeleton_weight.cpp \
skeleton_weight.h \
static_quad_grid.cpp \
static_quad_grid.h \
std3d.cpp \
std3d.h \
stripifier.cpp \
stripifier.h \
surface_light_grid.cpp \
surface_light_grid.h \
tangent_space_build.cpp \
tangent_space_build.h \
target_anim_ctrl.cpp \
tess_block.cpp \
tess_block.h \
tess_face_priority_list.cpp \
tess_face_priority_list.h \
tess_list.cpp \
tess_list.h \
tessellation.cpp \
tessellation.h \
text_context.cpp \
text_context.h \
text_context_user.cpp \
text_context_user.h \
texture.cpp \
texture.h \
texture_blank.cpp \
texture_blank.h \
texture_bloom.cpp \
texture_bloom.h \
texture_blend.cpp \
texture_blend.h \
texture_bump.cpp \
texture_bump.h \
texture_cube.cpp \
texture_cube.h \
texture_dlm.cpp \
texture_dlm.h \
texture_emboss.cpp \
texture_emboss.h \
texture_far.cpp \
texture_far.h \
texture_file.cpp \
texture_file.h \
texture_font.cpp \
texture_font.h \
texture_grouped.cpp \
texture_grouped.h \
texture_mem.cpp \
texture_mem.h \
texture_multi_file.cpp \
texture_multi_file.h \
texture_near.cpp \
texture_near.h \
texture_user.cpp \
texture_user.h \
tile_bank.cpp \
tile_bank.h \
tile_color.cpp \
tile_color.h \
tile_element.cpp \
tile_element.h \
tile_far_bank.cpp \
tile_far_bank.h \
tile_light_influence.cpp \
tile_light_influence.h \
tile_lumel.cpp \
tile_lumel.h \
tile_noise_map.cpp \
tile_noise_map.h \
tile_vegetable_desc.cpp \
tile_vegetable_desc.h \
track.cpp \
track.h \
track_bezier.h \
track_keyframer.cpp \
track_keyframer.h \
track_sampled_common.cpp \
track_sampled_common.h \
track_sampled_quat.cpp \
track_sampled_quat.h \
track_sampled_quat_small_header.cpp \
track_sampled_quat_small_header.h \
track_sampled_vector.cpp \
track_sampled_vector.h \
track_tcb.h \
transform.cpp \
transform.h \
transform_shape.cpp \
transform_shape.h \
transformable.cpp \
transformable.h \
trav_scene.cpp \
trav_scene.h \
u_bone.cpp \
u_camera.cpp \
u_instance.cpp \
u_instance_material.cpp \
u_material.cpp \
u_particle_system_instance.cpp \
u_point_light.cpp \
u_shape.cpp \
u_skeleton.cpp \
u_transform.cpp \
u_transformable.cpp \
u_visual_collision_mesh.cpp \
u_water.cpp \
vegetable.cpp \
vegetable.h \
vegetable_blend_layer_model.cpp \
vegetable_blend_layer_model.h \
vegetable_clip_block.cpp \
vegetable_clip_block.h \
vegetable_def.cpp \
vegetable_def.h \
vegetable_instance_group.cpp \
vegetable_instance_group.h \
vegetable_light_ex.cpp \
vegetable_light_ex.h \
vegetable_manager.cpp \
vegetable_manager.h \
vegetable_quadrant.cpp \
vegetable_quadrant.h \
vegetable_shape.cpp \
vegetable_shape.h \
vegetable_sort_block.cpp \
vegetable_sort_block.h \
vegetable_uv8.cpp \
vegetable_uv8.h \
vegetablevb_allocator.cpp \
vegetablevb_allocator.h \
vertex_buffer.cpp \
vertex_buffer.h \
vertex_buffer_heap.cpp \
vertex_buffer_heap.h \
vertex_program.cpp \
vertex_program.h \
vertex_program_parse.cpp \
vertex_program_parse.h \
vertex_stream_manager.cpp \
vertex_stream_manager.h \
viewport.cpp \
visual_collision_entity.cpp \
visual_collision_entity.h \
visual_collision_entity_user.cpp \
visual_collision_entity_user.h \
visual_collision_manager.cpp \
visual_collision_manager.h \
visual_collision_manager_user.cpp \
visual_collision_manager_user.h \
visual_collision_mesh.cpp \
visual_collision_mesh.h \
water_env_map.cpp \
water_env_map.h \
water_env_map_user.cpp \
water_env_map_user.h \
water_height_map.cpp \
water_height_map.h \
water_model.cpp \
water_model.h \
water_pool_manager.cpp \
water_pool_manager.h \
water_shape.cpp \
water_shape.h \
zone.cpp \
zone.h \
zone_corner_smoother.cpp \
zone_corner_smoother.h \
zone_lighter.cpp \
zone_lighter.h \
zone_manager.cpp \
zone_manager.h \
zone_search.cpp \
zone_search.h \
zone_smoother.cpp \
zone_smoother.h \
zone_symmetrisation.cpp \
zone_symmetrisation.h \
zone_tgt_smoother.cpp \
zone_tgt_smoother.h
noinst_HEADERS = std3d.h
# mesh_vertex_program.h meshvp_wind_tree.h
AM_CXXFLAGS = -I$(top_srcdir)/src @FREETYPE_CFLAGS@
libnel3d_la_LIBADD = @FREETYPE_LIBS@ -lc -ldl -lpthread
libnel3d_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nel-3d.pc
# End of Makefile.am

View file

@ -1,10 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = direct3d
SUBDIRS = opengl
# End of Makefile.am

View file

@ -16,7 +16,9 @@ IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp) ADD_NATIVE_PRECOMPILED_HEADER(nel_drv_direct3d_win ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.h ${CMAKE_CURRENT_SOURCE_DIR}/stddirect3d.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
IF(WITH_MAXPLUGIN) INSTALL(TARGETS nel_drv_direct3d_win LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d) IF(WITH_MAXPLUGIN)
ENDIF(WITH_MAXPLUGIN) INSTALL(TARGETS nel_drv_direct3d_win RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
ENDIF(WITH_MAXPLUGIN)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)

View file

@ -1228,7 +1228,7 @@ bool CDriverD3D::init (uint windowIcon, emptyProc exitFunc)
ExitFunc = exitFunc; ExitFunc = exitFunc;
createCursors(); createCursors();
// Register a window class // Register a window class
WNDCLASSW wc; WNDCLASSW wc;

View file

@ -61,7 +61,9 @@ IF(NOT APPLE AND WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp) ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_OGL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopengl.cpp)
ENDIF(NOT APPLE AND WITH_PCH) ENDIF(NOT APPLE AND WITH_PCH)
INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
IF(WITH_MAXPLUGIN) INSTALL(TARGETS ${NLDRV_OGL_LIB} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION lib RUNTIME DESTINATION bin COMPONENT drivers3d)
INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d) IF(WITH_MAXPLUGIN)
ENDIF(WITH_MAXPLUGIN) INSTALL(TARGETS ${NLDRV_OGL_LIB} RUNTIME DESTINATION maxplugin COMPONENT drivers3d)
ENDIF(WITH_MAXPLUGIN)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)

View file

@ -1,47 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = driver_opengl_8.vcproj \
driver_opengl.vcproj \
driver_opengl.dsp \
driver_opengl.def
lib_LTLIBRARIES = libnel_drv_opengl.la
libnel_drv_opengl_la_SOURCES = driver_opengl.cpp \
driver_opengl.h \
driver_opengl_extension.cpp \
driver_opengl_extension.h \
driver_opengl_extension_def.h \
driver_opengl_light.cpp \
driver_opengl_mac.cpp \
driver_opengl_material.cpp \
driver_opengl_matrix.cpp \
driver_opengl_states.cpp \
driver_opengl_states.h \
driver_opengl_texture.cpp \
driver_opengl_vertex.cpp \
driver_opengl_vertex_buffer_hard.cpp \
driver_opengl_vertex_buffer_hard.h \
driver_opengl_vertex_program.cpp \
stdopengl.cpp \
stdopengl.h \
unix_event_emitter.cpp \
unix_event_emitter.h
noinst_HEADERS = stdopengl.h
AM_CXXFLAGS = -I$(top_srcdir)/src \
@OPENGL_CFLAGS@ @XF86VIDMODE_CFLAGS@
libnel_drv_opengl_la_LIBADD = @OPENGL_LIBS@ @XF86VIDMODE_LIBS@ -lXmu
libnel_drv_opengl_la_LDFLAGS = -no-undefined
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nel-driverogl.pc
# End of Makefile.am

View file

@ -138,7 +138,7 @@ void CDriverGL::setLightInternal(uint8 num, const CLight& light)
} }
else else
{ {
// Deactivate spot properties // Disable spot properties
#ifdef USE_OPENGLES #ifdef USE_OPENGLES
glLightf (lightNum, GL_SPOT_CUTOFF, 180.f); glLightf (lightNum, GL_SPOT_CUTOFF, 180.f);
glLightf (lightNum, GL_SPOT_EXPONENT, 0.f); glLightf (lightNum, GL_SPOT_EXPONENT, 0.f);

View file

@ -978,7 +978,7 @@ void CDriverGL::setupGlArraysStd(CVertexBufferInfo &vb)
// Check type // Check type
nlassert (vb.Type[CVertexBuffer::Normal]==CVertexBuffer::Float3); nlassert (vb.Type[CVertexBuffer::Normal]==CVertexBuffer::Float3);
_DriverGLStates.enableNormalArray(true); _DriverGLStates.enableNormalArray(true);
nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Normal]); nglArrayObjectATI(GL_NORMAL_ARRAY, 3, GL_FLOAT, vb.VertexSize, vb.VertexObjectId, (ptrdiff_t) vb.ValuePtr[CVertexBuffer::Normal]);
} }
else else
{ {

View file

@ -188,6 +188,9 @@ bool GlWndProc(CDriverGL *driver, const void* e)
static Atom XA_WM_STATE = 0; static Atom XA_WM_STATE = 0;
static Atom XA_WM_STATE_FULLSCREEN = 0; static Atom XA_WM_STATE_FULLSCREEN = 0;
static Atom XA_WM_ICON = 0; static Atom XA_WM_ICON = 0;
static Atom XA_WM_WINDOW_TYPE = 0;
static Atom XA_WM_WINDOW_TYPE_NORMAL = 0;
static Atom XA_FRAME_EXTENTS = 0;
sint nelXErrorsHandler(Display *dpy, XErrorEvent *e) sint nelXErrorsHandler(Display *dpy, XErrorEvent *e)
{ {
@ -233,7 +236,7 @@ bool GlWndProc(CDriverGL *driver, XEvent &e)
break; break;
case Expose: case Expose:
nlwarning("Expose event"); // nlwarning("Expose event");
break; break;
case ConfigureNotify: case ConfigureNotify:
@ -243,20 +246,36 @@ bool GlWndProc(CDriverGL *driver, XEvent &e)
// first time setting decoration sizes // first time setting decoration sizes
if ((driver->_DecorationWidth == -1) || (driver->_DecorationWidth == 0)) if ((driver->_DecorationWidth == -1) || (driver->_DecorationWidth == 0))
{ {
driver->_DecorationWidth = e.xconfigure.x - driver->_WindowX; Atom type_return = 0;
driver->_DecorationHeight = e.xconfigure.y - driver->_WindowY; int format_return = 0;
unsigned long nitems_return = 0;
unsigned long bytes_after_return = 0;
long *data = NULL;
int status = XGetWindowProperty(driver->_dpy, driver->_win, XA_FRAME_EXTENTS, 0, 4, False, XA_CARDINAL, &type_return, &format_return, &nitems_return, &bytes_after_return, (unsigned char**)&data);
nlwarning("Decoration size x = %d, y = %d", driver->_DecorationWidth, driver->_DecorationHeight); // succeeded to retrieve decoration size
if (status == Success && type_return == XA_CARDINAL && format_return == 32 && nitems_return == 4 && data)
{
driver->_DecorationWidth = data[0];
driver->_DecorationHeight = data[2];
}
else
{
// use difference between current position and previous one (set by application)
driver->_DecorationWidth = e.xconfigure.x - driver->_WindowX;
driver->_DecorationHeight = e.xconfigure.y - driver->_WindowY;
}
// don't allow negative decoration sizes
if (driver->_DecorationWidth < 0) driver->_DecorationWidth = 0;
if (driver->_DecorationHeight < 0) driver->_DecorationHeight = 0;
} }
driver->_CurrentMode.Width = e.xconfigure.width; driver->_CurrentMode.Width = e.xconfigure.width;
driver->_CurrentMode.Height = e.xconfigure.height; driver->_CurrentMode.Height = e.xconfigure.height;
driver->_WindowX = e.xconfigure.x - driver->_DecorationWidth; driver->_WindowX = e.xconfigure.x - driver->_DecorationWidth;
driver->_WindowY = e.xconfigure.y - driver->_DecorationHeight; driver->_WindowY = e.xconfigure.y - driver->_DecorationHeight;
XConfigureEvent event = e.xconfigure;
nlwarning("Configure x = %d, y = %d, width = %d, height = %d, send event = %d", event.x, event.y, event.width, event.height, event.send_event);
} }
break; break;
@ -401,6 +420,9 @@ bool CDriverGL::init (uint windowIcon, emptyProc exitFunc)
XA_WM_STATE = XInternAtom(_dpy, "_NET_WM_STATE", False); XA_WM_STATE = XInternAtom(_dpy, "_NET_WM_STATE", False);
XA_WM_STATE_FULLSCREEN = XInternAtom(_dpy, "_NET_WM_STATE_FULLSCREEN", False); XA_WM_STATE_FULLSCREEN = XInternAtom(_dpy, "_NET_WM_STATE_FULLSCREEN", False);
XA_WM_ICON = XInternAtom(_dpy, "_NET_WM_ICON", False); XA_WM_ICON = XInternAtom(_dpy, "_NET_WM_ICON", False);
XA_WM_WINDOW_TYPE = XInternAtom(_dpy, "_NET_WM_WINDOW_TYPE", False);
XA_WM_WINDOW_TYPE_NORMAL = XInternAtom(_dpy, "_NET_WM_WINDOW_TYPE_NORMAL", False);
XA_FRAME_EXTENTS = XInternAtom(_dpy, "_NET_FRAME_EXTENTS", False);
#endif #endif
@ -1528,6 +1550,42 @@ bool CDriverGL::createWindow(const GfxMode &mode)
return false; return false;
} }
// normal window type
XChangeProperty(_dpy, window, XA_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (const unsigned char*)&XA_WM_WINDOW_TYPE_NORMAL, 1);
// set WM hints
XWMHints *wm_hints = XAllocWMHints();
if (wm_hints)
{
wm_hints->flags = StateHint | InputHint;
wm_hints->initial_state = NormalState;
wm_hints->input = True;
XSetWMHints(_dpy, window, wm_hints);
XFree(wm_hints);
}
else
{
nlwarning("3D: Couldn't allocate XWMHints");
}
// set class hints
XClassHint *class_hints = XAllocClassHint();
if (class_hints)
{
class_hints->res_name = (char*)"NeL";
class_hints->res_class = (char*)"nel";
XSetClassHint(_dpy, window, class_hints);
XFree(class_hints);
}
else
{
nlwarning("3D: Couldn't allocate XClassHint");
}
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
_win = window; _win = window;
@ -2201,11 +2259,19 @@ void CDriverGL::setWindowTitle(const ucstring &title)
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
// UTF8 properties
Xutf8SetWMProperties (_dpy, _win, (char*)title.toUtf8().c_str(), (char*)title.toUtf8().c_str(), NULL, 0, NULL, NULL, NULL); Xutf8SetWMProperties (_dpy, _win, (char*)title.toUtf8().c_str(), (char*)title.toUtf8().c_str(), NULL, 0, NULL, NULL, NULL);
#else #else
// standard properties
XTextProperty text_property; XTextProperty text_property;
XStringListToTextProperty((char**)&title.toUtf8().c_str(), 1, &text_property); if (XStringListToTextProperty((char**)&title.toUtf8().c_str(), 1, &text_property) != 0)
XSetWMProperties (_dpy, _win, &text_property, &text_property, 0, 0, NULL, 0, 0); {
XSetWMProperties (_dpy, _win, &text_property, &text_property, NULL, 0, NULL, NULL, NULL);
}
else
{
nlwarning("3D: Can't convert title to TextProperty");
}
#endif #endif
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS

View file

@ -149,14 +149,28 @@ static NLMISC::TKey virtualKeycodeToNelKey(unsigned short keycode)
bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text) bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
{ {
#warning "OpenGL Driver: Missing Mac Implementation for pasteTextFromClipboard" NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
NSDictionary *options = [NSDictionary dictionary];
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
if (ok)
{
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
NSString *nstext = [objectsToPaste objectAtIndex:0];
text.fromUtf8([nstext UTF8String]);
return true;
}
return false; return false;
} }
bool CCocoaEventEmitter::copyTextToClipboard(const ucstring &text) bool CCocoaEventEmitter::copyTextToClipboard(const ucstring &text)
{ {
#warning "OpenGL Driver: Missing Mac Implementation for copyTextToClipboard" NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
return false; [pasteboard clearContents];
NSArray *copiedObjects = [NSArray arrayWithObject:[NSString stringWithUTF8String:text.toUtf8().c_str()]];
[pasteboard writeObjects:copiedObjects];
return true;
} }
/// convert modifier key state to nel internal modifier key state /// convert modifier key state to nel internal modifier key state

View file

@ -4851,8 +4851,10 @@ typedef ptrdiff_t GLsizeiptrARB;
#ifndef GL_ARB_shader_objects #ifndef GL_ARB_shader_objects
/* GL types for program/shader text and shader object handles */ /* GL types for program/shader text and shader object handles */
typedef char GLcharARB; typedef char GLcharARB;
#if !defined(MAC_OS_X_VERSION_10_7)
typedef unsigned int GLhandleARB; typedef unsigned int GLhandleARB;
#endif #endif
#endif
/* GL type for "half" precision (s10e5) float data in host memory */ /* GL type for "half" precision (s10e5) float data in host memory */
#ifndef GL_ARB_half_float_pixel #ifndef GL_ARB_half_float_pixel

View file

@ -58,7 +58,7 @@ bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow syst
CNELU::Driver = NULL; CNELU::Driver = NULL;
// Init driver. // Init driver.
#if defined(NL_OS_WINDOWS) #ifdef NL_OS_WINDOWS
if (direct3d) if (direct3d)
{ {
CNELU::Driver= CDRU::createD3DDriver(); CNELU::Driver= CDRU::createD3DDriver();
@ -75,6 +75,7 @@ bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow syst
nlwarning ("CNELU::initDriver: no driver found"); nlwarning ("CNELU::initDriver: no driver found");
return false; return false;
} }
if (!CNELU::Driver->init()) if (!CNELU::Driver->init())
{ {
nlwarning ("CNELU::initDriver: init() failed"); nlwarning ("CNELU::initDriver: init() failed");

View file

@ -39,7 +39,11 @@ namespace NL3D {
using NLMISC::CIFile; using NLMISC::CIFile;
namespace {
NLMISC::CMutex s_PSSMutex;
} /* anonymous namespace */
// private usage : macro to check the memory integrity // private usage : macro to check the memory integrity
#if defined(NL_DEBUG) && defined(NL_OS_WINDOWS) #if defined(NL_DEBUG) && defined(NL_OS_WINDOWS)
@ -220,9 +224,8 @@ CParticleSystem *CParticleSystemShape::instanciatePS(CScene &scene, NLMISC::CCon
return _SharedSystem; return _SharedSystem;
} }
// avoid prb with concurent thread (may append if an instance group containing ps is loaded in background) // avoid prb with concurrent thread (may happen if an instance group containing ps is loaded in background)
NLMISC::CMutex mutex; s_PSSMutex.enter();
mutex.enter();
#ifdef PS_FAST_ALLOC #ifdef PS_FAST_ALLOC
@ -295,7 +298,7 @@ CParticleSystem *CParticleSystemShape::instanciatePS(CScene &scene, NLMISC::CCon
} }
#endif #endif
mutex.leave(); s_PSSMutex.leave();
/*NLMISC::TTicks end = NLMISC::CTime::getPerformanceTime(); /*NLMISC::TTicks end = NLMISC::CTime::getPerformanceTime();
nlinfo("instanciation time = %.2f", (float) (1000 * NLMISC::CTime::ticksToSecond(end - start))); */ nlinfo("instanciation time = %.2f", (float) (1000 * NLMISC::CTime::ticksToSecond(end - start))); */
@ -390,8 +393,7 @@ void CParticleSystemShape::flushTextures(IDriver &driver, uint selectedTexture)
} }
else else
{ {
NLMISC::CMutex mutex; s_PSSMutex.enter();
mutex.enter();
// must create an instance just to flush the textures // must create an instance just to flush the textures
CParticleSystem *myInstance = NULL; CParticleSystem *myInstance = NULL;
@ -436,7 +438,7 @@ void CParticleSystemShape::flushTextures(IDriver &driver, uint selectedTexture)
#ifdef PS_FAST_ALLOC #ifdef PS_FAST_ALLOC
PSBlockAllocator = NULL; PSBlockAllocator = NULL;
#endif #endif
mutex.leave(); s_PSSMutex.leave();
} }
for(uint k = 0; k < _CachedTex.size(); ++k) for(uint k = 0; k < _CachedTex.size(); ++k)
{ {

View file

@ -1018,8 +1018,8 @@ void CPatchDLMContext::computeTextureFar()
// compute src pixel // compute src pixel
const CRGBA *srcPixel= pTile->getPixels(CTileFarBank::diffuse, CTileFarBank::order1); const CRGBA *srcPixel= pTile->getPixels(CTileFarBank::diffuse, CTileFarBank::order1);
// compute src info, for this tile rot and 256x256 context. // compute src info, for this tile rot and 256x256 context.
sint srcDeltaX; sint srcDeltaX = 0;
sint srcDeltaY; sint srcDeltaY = 0;
srcPixel= computeTileFarSrcDeltas(nRot, is256x256, uvOff, srcPixel, srcDeltaX, srcDeltaY); srcPixel= computeTileFarSrcDeltas(nRot, is256x256, uvOff, srcPixel, srcDeltaX, srcDeltaY);
// compute dst coordinate. start writing at pixel (1,1) // compute dst coordinate. start writing at pixel (1,1)

View file

@ -1,19 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
DIST_SUBDIRS = net 3d pacs sound misc georges ligo
SUBDIRS = @NEL_SUBDIRS@
EXTRA_DIST = 3d.vcproj \
georges.vcproj \
ligo.vcproj \
logic.vcproj \
misc.vcproj \
net.vcproj \
pacs.vcproj \
sound.vcproj
# End of Makefile.am

View file

@ -1,56 +0,0 @@
#############################################################################
# A few basic default rules and intrinsic rules
# Load objects dependencies
ifeq (Dependencies.mk,$(wildcard Dependencies.mk))
include Dependencies.mk
check-deps:
@echo
@echo Dependencies found [OK]
@echo
else
check-deps:
@echo
@echo "No dependencies found [ERROR]"
@echo "You should try 'make update' first"
@echo
@exit 1
endif
# Start off by over-riding the default build rules with our own intrinsics
.SUFFIXES:
.SUFFIXES: .cpp .o
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< -o $@
# remove object files and core (if any)
clean:
find . -name "core*" -exec $(RM) {} \;
find . -name "*.o" -exec $(RM) {} \;
find . -name "*~" -exec $(RM) {} \;
find . -name "Dependencies.mk" -exec $(RM) {} \;
# remove object files, core dump, and executable (if any)
distclean:
$(MAKE) clean
$(RM) $(TARGETS)
$(RM) $(TARGETS)_debug
# make the thing again from scratch
again:
$(MAKE) distclean
$(MAKE) $(TARGETS)
UPDATE_OBJS=`cat ../$(DSP_TARGET) | grep SOURCE | sed -e 's/\r$$//' | grep "\.cpp$$" | cut -d\\\\ -f3- | tr '\n' ' ' | sed -e 's/=/..\\\\/g' | tr '\n' ' ' | sed -e 's/\\\\/\\//g' | sed -e 's/\.cpp /\.o /g'`
UPDATE_SRCS=`cat ../$(DSP_TARGET) | grep SOURCE | sed -e 's/\r$$//' | grep "\.cpp$$" | cut -d\\\\ -f3- | tr '\n' ' ' | sed -e 's/=/..\\\\/g' | tr '\n' ' ' | sed -e 's/\\\\/\\//g'`
dep: update
update:
../gen_deps.sh $(CXX) $(CXXFLAGS) -- $(UPDATE_SRCS) > Dependencies.mk
echo "OBJS=$(UPDATE_OBJS)" > Objects.mk
touch:
$(RM) $(TARGETS)
$(RM) $(TARGETS)_debug

View file

@ -1,20 +0,0 @@
#############################################################################
# Setting up the global compiler settings...
# The names of the executables
CXX = c++
RM = rm -f
MAKE = make
DBG = off
FLAGS_CMN = -g -pipe -Wno-ctor-dtor-privacy -Wno-multichar -D_REENTRANT -DHAVE_X86
FLAGS_DBG_on = -O0 -finline-functions -DNL_DEBUG -DNL_DEBUG_FAST
FLAGS_DBG_off = -O3 -ftemplate-depth-24 -funroll-loops -DNL_RELEASE_DEBUG
DIR_DBG_on = debug
DIR_DBG_off = release
ifeq (Objects.mk,$(wildcard Objects.mk))
include Objects.mk
endif

View file

@ -11,4 +11,6 @@ NL_ADD_LIB_SUFFIX(nelceguirenderer)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_CEGUIRENDERER_EXPORTS) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DNEL_CEGUIRENDERER_EXPORTS)
INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelceguirenderer RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -1,19 +0,0 @@
#
# $Id: Makefile.am,v 1.7 2002-06-10 17:02:05 cado Exp $
#
MAINTAINERCLEANFILES = Makefile.in
lib_LTLIBRARIES = libnelceguirenderer.la
libnelceguirenderer_la_SOURCES = nelrenderer.cpp nelresourceprovider.cpp neltexture.cpp
AM_CXXFLAGS = -I$(top_srcdir)/src @CEGUI_CFLAGS@
libnelceguirenderer_la_LIBADD = -lc -lpthread @CEGUI_LIBS@
libnelceguirenderer_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
# End of Makefile.am

View file

@ -1,25 +0,0 @@
#!/bin/sh
command=''
sources=''
phase=0
for arg in $*
do
if [ "$phase" == 0 ] && [ "$arg" == '--' ]
then
phase=1
elif [ "$phase" == 0 ]
then
command="$command $arg"
elif [ "$phase" == 1 ]
then
sources="$sources $arg"
fi
done
for src in $sources
do
obj=`echo $src | sed -e 's/.cpp$/.o/'`
$command -MT $obj -M $src
done

View file

@ -21,4 +21,7 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-georges.pc) NL_GEN_PC(nel-georges.pc)
INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelgeorges LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -1,34 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = georges_file_format.txt
lib_LTLIBRARIES = libnelgeorges.la
libnelgeorges_la_SOURCES = form.cpp \
form.h \
form_loader.cpp \
form_loader.h \
form_dfn.cpp \
form_dfn.h \
form_elm.cpp \
form_elm.h \
stdgeorges.cpp \
stdgeorges.h \
header.cpp \
header.h \
load_form.cpp \
type.cpp \
type.h
AM_CXXFLAGS = -I$(top_srcdir)/src
libnelgeorges_la_LIBADD = -lc -lpthread
libnelgeorges_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
# End of Makefile.am

View file

@ -19,4 +19,7 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-ligo.pc) NL_GEN_PC(nel-ligo.pc)
INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelligo LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -1,36 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
lib_LTLIBRARIES = libnelligo.la
libnelligo_la_SOURCES = ligo_config.cpp \
ligo_error.cpp \
ligo_error.h \
ligo_material.cpp \
ligo_material.h \
primitive.cpp \
primitive_class.cpp \
primitive_configuration.cpp \
transition.cpp \
transition.h \
zone_bank.cpp \
zone_bank.h \
zone_edge.cpp \
zone_edge.h \
zone_region.cpp \
zone_region.h \
zone_template.cpp \
zone_template.h \
primitive_utils.cpp
AM_CXXFLAGS = -I$(top_srcdir)/src
libnelligo_la_LIBADD = -lc -lpthread
libnelligo_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
# End of Makefile.am

View file

@ -2118,7 +2118,7 @@ bool CPrimAlias::read (xmlNodePtr xmlNode, const char *filename, uint version, C
xmlNodePtr ptNode = CIXml::getFirstChildNode (xmlNode, "ALIAS"); xmlNodePtr ptNode = CIXml::getFirstChildNode (xmlNode, "ALIAS");
if (ptNode) if (ptNode)
{ {
int val; sint val = 0;
if (ReadInt ("VALUE", val, filename, ptNode)) if (ReadInt ("VALUE", val, filename, ptNode))
{ {
_Alias = uint32(val); _Alias = uint32(val);

View file

@ -14,4 +14,6 @@ NL_ADD_LIB_SUFFIX(nellogic)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
INSTALL(TARGETS nellogic LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nellogic LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -53,4 +53,7 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-misc.pc) NL_GEN_PC(nel-misc.pc)
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -1,142 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = config_file
lib_LTLIBRARIES = libnelmisc.la
libnelmisc_la_SOURCES = \
aabbox.cpp \
app_context.cpp \
algo.cpp \
async_file_manager.cpp \
big_file.cpp \
bit_mem_stream.cpp \
bit_set.cpp \
bitmap.cpp \
bitmap_jpeg.cpp \
bitmap_png.cpp \
block_memory.cpp \
bsphere.cpp \
buf_fifo.cpp \
class_id.cpp \
class_registry.cpp \
command.cpp \
common.cpp \
contiguous_block_allocator.cpp \
cpu_time_stat.cpp \
debug.cpp \
di_event_emitter.cpp \
di_game_device.cpp \
di_game_device.h \
di_keyboard_device.cpp \
di_keyboard_device.h \
di_mouse_device.cpp \
di_mouse_device.h \
diff_tool.cpp \
displayer.cpp \
eid_translator.cpp \
entity_id.cpp \
eval_num_expr.cpp \
event_emitter.cpp \
event_emitter_multi.cpp \
event_listener.cpp \
event_server.cpp \
events.cpp \
fast_floor.cpp \
fast_mem.cpp \
file.cpp \
fixed_size_allocator.cpp \
game_device.cpp \
game_device_events.cpp \
geom_ext.cpp \
grid_traversal.cpp \
gtk_displayer.cpp \
heap_memory.cpp \
hierarchical_timer.cpp \
i18n.cpp \
i_xml.cpp \
input_device.cpp \
input_device_server.cpp \
keyboard_device.cpp \
line.cpp \
log.cpp \
matrix.cpp \
md5.cpp \
mem_displayer.cpp \
mem_stream.cpp \
mouse_smoother.cpp \
mutex.cpp \
noise_value.cpp \
o_xml.cpp \
object_arena_allocator.cpp \
object_vector.cpp \
p_thread.cpp \
path.cpp \
plane.cpp \
polygon.cpp \
progress_callback.cpp \
quad.cpp \
quat.cpp \
reader_writer.cpp \
rect.cpp \
report.cpp \
rgba.cpp \
sha1.cpp \
shared_memory.cpp \
sheet_id.cpp \
smart_ptr.cpp \
stdmisc.cpp \
stdmisc.h \
stl_block_allocator.cpp \
stl_block_list.cpp \
stop_watch.cpp \
stream.cpp \
string_common.cpp \
string_id_array.cpp \
string_mapper.cpp \
system_info.cpp \
system_utils.cpp \
task_manager.cpp \
tds.cpp \
time_nl.cpp \
triangle.cpp \
uv.cpp \
unicode.cpp \
value_smoother.cpp \
variable.cpp \
vector.cpp \
vector_2d.cpp \
vector_2f.cpp \
vector_h.cpp \
vectord.cpp \
win_displayer.cpp \
win_event_emitter.cpp \
win_thread.cpp \
window_displayer.cpp \
words_dictionary.cpp \
dynloadlib.cpp \
sstring.cpp \
co_task.cpp \
xml_pack.cpp \
inter_window_msg_queue.cpp \
win32_util.cpp
noinst_HEADERS = di_game_device.h \
di_keyboard_device.h \
di_mouse_device.h \
stdmisc.h
libnelmisc_la_LIBADD = config_file/libconfig.la -lc -lpthread -lrt -ldl -lpng -ljpeg
libnelmisc_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = nel-misc.pc
# End of Makefile.am

View file

@ -30,6 +30,7 @@
#include "nel/misc/command.h" #include "nel/misc/command.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include "nel/misc/i18n.h"
using namespace std; using namespace std;
@ -526,6 +527,31 @@ void toUpper(char *str)
} }
} }
std::string formatThousands(const std::string& s)
{
int i, k;
int remaining = s.length() - 1;
static std::string separator = NLMISC::CI18N::get("uiThousandsSeparator").toUtf8();
// Don't add separator if the number is < 10k
if (remaining < 4) return s;
std::string ns;
do
{
for (i = remaining, k = 0; i >= 0 && k < 3; --i, ++k )
{
ns = s[i] + ns; // New char is added to front of ns
if ( i > 0 && k == 2) ns = separator + ns; // j > 0 means still more digits
}
remaining -= 3;
}
while (remaining >= 0);
return ns;
}
// //
// Exceptions // Exceptions

View file

@ -1,21 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
noinst_LTLIBRARIES = libconfig.la
AM_YFLAGS = --defines=cf_gramatical.h -p cf
AM_LFLAGS = -f -8 -Pcf -olex.yy.c
EXTRA_DIST = cf_gramatical.h cf_bison.simple cf_flex.skl do.bat
libconfig_la_SOURCES = cf_lexical.lpp \
cf_gramatical.ypp \
config_file.cpp
#libconfig_la_SOURCES = config_file.cpp
# End of Makefile.am

View file

@ -417,6 +417,17 @@ void CEntityIdTranslator::checkEntity (const CEntityId &eid, const ucstring &ent
} }
} }
void CEntityIdTranslator::removeShardFromName(ucstring& name)
{
// The string must contain a '(' and a ')'
ucstring::size_type p0= name.find('(');
ucstring::size_type p1= name.find(')');
if (p0 == ucstring::npos || p1 == ucstring::npos || p1 <= p0)
return;
name = name.substr(0, p0) + name.substr(p1 + 1);
}
// this callback is call when the file is changed // this callback is call when the file is changed
void cbInvalidEntityNamesFilename(const std::string &invalidEntityNamesFilename) void cbInvalidEntityNamesFilename(const std::string &invalidEntityNamesFilename)
{ {

View file

@ -178,7 +178,7 @@ static const CStringConversion<TKey>::CPair stringTable [] =
{ "KeyZOOM", KeyZOOM }, { "KeyZOOM", KeyZOOM },
{ "KeyNONAME", KeyNONAME }, { "KeyNONAME", KeyNONAME },
{ "KeyPA1", KeyPA1 }, { "KeyPA1", KeyPA1 },
{ "KeyOEM_CLEAR", KeyOEM_CLEAR }, { "KeyOEM_CLEAR", KeyOEM_CLEAR }
}; };

View file

@ -18,7 +18,7 @@
#include "nel/misc/noise_value.h" #include "nel/misc/noise_value.h"
#include "nel/misc/fast_floor.h" #include "nel/misc/fast_floor.h"
#include "nel/misc/random.h"
namespace NLMISC namespace NLMISC
@ -45,7 +45,8 @@ public:
CRandomGrid3D() CRandomGrid3D()
{ {
//seed //seed
srand(0); CRandom Random;
Random.srand(0);
// init the grid // init the grid
for(uint z=0; z<NL3D_NOISE_GRID_SIZE; z++) for(uint z=0; z<NL3D_NOISE_GRID_SIZE; z++)
@ -56,7 +57,7 @@ public:
{ {
uint id= x + (y<<NL3D_NOISE_GRID_SIZE_SHIFT) + (z<<(NL3D_NOISE_GRID_SIZE_SHIFT*2)); uint id= x + (y<<NL3D_NOISE_GRID_SIZE_SHIFT) + (z<<(NL3D_NOISE_GRID_SIZE_SHIFT*2));
// take higher bits of rand gives better result. // take higher bits of rand gives better result.
uint v= rand() >> 5; uint v= Random.rand() >> 5;
_Texture3d[id]= v&255; _Texture3d[id]= v&255;
} }
} }
@ -80,9 +81,9 @@ public:
// init LevelPhases. // init LevelPhases.
for(i=0; i<NL3D_NOISE_LEVEL; i++) for(i=0; i<NL3D_NOISE_LEVEL; i++)
{ {
_LevelPhase[i].x= frand(NL3D_NOISE_GRID_SIZE); _LevelPhase[i].x= Random.frand(NL3D_NOISE_GRID_SIZE);
_LevelPhase[i].y= frand(NL3D_NOISE_GRID_SIZE); _LevelPhase[i].y= Random.frand(NL3D_NOISE_GRID_SIZE);
_LevelPhase[i].z= frand(NL3D_NOISE_GRID_SIZE); _LevelPhase[i].z= Random.frand(NL3D_NOISE_GRID_SIZE);
} }
// not for level 0. // not for level 0.
_LevelPhase[0]= CVector::Null; _LevelPhase[0]= CVector::Null;

View file

@ -643,6 +643,8 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const
{ {
h = 2.f + (b - r) / diff; h = 2.f + (b - r) / diff;
} }
#if defined(GCC_VERSION) && (GCC_VERSION == 40204)
// use the fix only if using the specific GCC version
else if (maxV == b) else if (maxV == b)
{ {
h = 4.f + (r - g) / diff; h = 4.f + (r - g) / diff;
@ -652,6 +654,12 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const
// this case is to fix a compiler bug // this case is to fix a compiler bug
h = (g - b) / diff; h = (g - b) / diff;
} }
#else
else
{
h = 4.f + (r - g) / diff;
}
#endif
h *= 60.f; // scale to [0..360] h *= 60.f; // scale to [0..360]

View file

@ -153,6 +153,13 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPA
if ((int)wParam==VK_SHIFT) if ((int)wParam==VK_SHIFT)
_ShiftButton=false; _ShiftButton=false;
// As Print Screen button does not trigger a WM_KEYDOWN msg, simulate it here
if ((int)wParam==VK_SNAPSHOT)
{
if (wParam < KeyCount)
server->postEvent (new CEventKeyDown ((NLMISC::TKey)wParam, getKeyButton(_AltButton, _ShiftButton, _CtrlButton), true, this));
}
// Post the message // Post the message
if (wParam < KeyCount) if (wParam < KeyCount)
server->postEvent (new CEventKeyUp ((NLMISC::TKey)wParam, getKeyButton(_AltButton, _ShiftButton, _CtrlButton), this)); server->postEvent (new CEventKeyUp ((NLMISC::TKey)wParam, getKeyButton(_AltButton, _ShiftButton, _CtrlButton), this));

View file

@ -24,4 +24,7 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-net.pc) NL_GEN_PC(nel-net.pc)
INSTALL(TARGETS nelnet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelnet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

View file

@ -1,60 +0,0 @@
#
#
MAINTAINERCLEANFILES = Makefile.in
lib_LTLIBRARIES = libnelnet.la
libnelnet_la_SOURCES = buf_client.cpp \
buf_net_base.cpp \
buf_server.cpp \
buf_sock.cpp \
callback_client.cpp \
callback_net_base.cpp \
callback_server.cpp \
dummy_tcp_sock.cpp \
inet_address.cpp \
listen_sock.cpp \
login_client.cpp \
login_cookie.cpp \
login_server.cpp \
message.cpp \
message_recorder.cpp \
naming_client.cpp \
net_displayer.cpp \
net_log.cpp \
service.cpp \
sock.cpp \
tcp_sock.cpp \
udp_sock.cpp \
udp_sim_sock.cpp \
unitime.cpp \
unified_network.cpp \
varpath.cpp \
transport_class.cpp \
email.cpp \
admin.cpp \
stdin_monitor_thread.cpp \
stdin_monitor_thread.h \
module.cpp \
module_common.cpp \
module_gateway.cpp \
module_manager.cpp \
module_message.cpp \
module_socket.cpp \
module_gateway_transport.cpp \
module_l5_transport.cpp \
module_local_gateway.cpp \
stdnet.cpp
noinst_HEADERS = stdnet.h
AM_CXXFLAGS = -I$(top_srcdir)/src
libnelnet_la_LIBADD = -lc -lpthread
libnelnet_la_LDFLAGS = -version-info @LIBTOOL_VERSION@
# End of Makefile.am

View file

@ -77,7 +77,7 @@ string typeToString (CTransportClass::TProp type)
string conv[] = { string conv[] = {
"PropUInt8", "PropUInt16", "PropUInt32", "PropUInt64", "PropUInt8", "PropUInt16", "PropUInt32", "PropUInt64",
"PropSInt8", "PropSInt16", "PropSInt32", "PropSInt64", "PropSInt8", "PropSInt16", "PropSInt32", "PropSInt64",
"PropBool", "PropFloat", "PropDouble", "PropString", "PropDataSetRow", "PropSheetId", "PropUKN" }; "PropBool", "PropFloat", "PropDouble", "PropString", "PropDataSetRow", "PropSheetId", "PropUCString", "PropUKN" };
// "PropBool", "PropFloat", "PropDouble", "PropString", "PropDataSetRow", "PropEntityId", "PropSheetId", "PropUKN" }; // "PropBool", "PropFloat", "PropDouble", "PropString", "PropDataSetRow", "PropEntityId", "PropSheetId", "PropUKN" };
if (type > CTransportClass::PropUKN) if (type > CTransportClass::PropUKN)
@ -352,6 +352,7 @@ void CTransportClass::init ()
// nlassert (PropDataSetRow < PropUKN); DummyProp[PropDataSetRow] = new CTransportClass::CRegisteredProp<TDataSetRow>; // nlassert (PropDataSetRow < PropUKN); DummyProp[PropDataSetRow] = new CTransportClass::CRegisteredProp<TDataSetRow>;
// nlassert (PropEntityId < PropUKN); DummyProp[PropEntityId] = new CTransportClass::CRegisteredProp<CEntityId>; // nlassert (PropEntityId < PropUKN); DummyProp[PropEntityId] = new CTransportClass::CRegisteredProp<CEntityId>;
nlassert (PropSheetId < PropUKN); DummyProp[PropSheetId] = new CTransportClass::CRegisteredProp<CSheetId>; nlassert (PropSheetId < PropUKN); DummyProp[PropSheetId] = new CTransportClass::CRegisteredProp<CSheetId>;
nlassert (PropUCString < PropUKN); DummyProp[PropUCString] = new CTransportClass::CRegisteredProp<ucstring>;
// we have to know when a service comes, so add callback (put the callback before all other one because we have to send this message first) // we have to know when a service comes, so add callback (put the callback before all other one because we have to send this message first)
CUnifiedNetwork::getInstance()->setServiceUpCallback("*", cbTCUpService, NULL, false); CUnifiedNetwork::getInstance()->setServiceUpCallback("*", cbTCUpService, NULL, false);

View file

@ -19,4 +19,7 @@ IF(WITH_PCH)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
NL_GEN_PC(nel-pacs.pc) NL_GEN_PC(nel-pacs.pc)
INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
INSTALL(TARGETS nelpacs LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)

Some files were not shown because too many files have changed in this diff Show more