Compare commits
No commits in common. "27-creer-une-config-patchman-pour-lirria-et-spofu" and "main" have entirely different histories.
27-creer-u
...
main
4082 changed files with 14354 additions and 142930 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -162,8 +162,6 @@ build/*
|
||||||
install/*
|
install/*
|
||||||
build_vc*
|
build_vc*
|
||||||
code/nel/tools/build_gamedata/configuration/buildsite.py
|
code/nel/tools/build_gamedata/configuration/buildsite.py
|
||||||
code/build*
|
|
||||||
|
|
||||||
|
|
||||||
# Linux nel compile
|
# Linux nel compile
|
||||||
code/nel/build/nel-config
|
code/nel/build/nel-config
|
||||||
|
@ -240,7 +238,6 @@ code/ryzom/tools/server/ryzom_ams/old
|
||||||
|
|
||||||
#tools and external dir's
|
#tools and external dir's
|
||||||
external
|
external
|
||||||
external_vc14
|
|
||||||
external_stlport
|
external_stlport
|
||||||
nel_tools*
|
nel_tools*
|
||||||
ryzom_tools*
|
ryzom_tools*
|
||||||
|
|
133
.gitlab-ci.yml
133
.gitlab-ci.yml
|
@ -1,25 +1,17 @@
|
||||||
stages:
|
Linux:
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- staging
|
|
||||||
- production
|
|
||||||
|
|
||||||
## BUILDS
|
|
||||||
|
|
||||||
# Job de compilation pour Linux
|
|
||||||
Linux client build:
|
|
||||||
stage: build
|
stage: build
|
||||||
except:
|
only:
|
||||||
- ryzomcore
|
- develop
|
||||||
|
- /^feature\/.*(\+CI$|\+CI-LIN64.*)/
|
||||||
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- Docker
|
- Docker
|
||||||
image: debian:jessie
|
- Linux
|
||||||
|
image: ubuntu:14.04
|
||||||
script:
|
script:
|
||||||
# Installation des dépendances
|
# Installation des dépendances
|
||||||
- echo "deb http://ftp.debian.org/debian/ jessie-backports non-free contrib main" >> /etc/apt/sources.list
|
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get -y upgrade
|
- apt-get install -y g++ gcc cmake libgl1-mesa-dev libjpeg-dev libpng12-dev libopenal-dev libfreetype6-dev libxxf86vm-dev libxrandr-dev libxrender-dev libvorbis-dev libluabind-dev libboost-dev libmysqlclient-dev libssl-dev liblzma-dev libxml2-dev
|
||||||
- apt-get -t jessie-backports install libxml2 -y g++ gcc cmake libcurl4-openssl-dev libgl1-mesa-dev libjpeg-dev libpng-dev libopenal-dev libfreetype6-dev libxxf86vm-dev libxrandr-dev libxrender-dev libvorbis-dev libluabind-dev libboost-dev libmysqlclient-dev libssl-dev liblzma-dev libxml2-dev makeself
|
|
||||||
# Installation des dépendances des dépendances statiques (à commenter si construction de Khanat en mode dynamique)
|
# Installation des dépendances des dépendances statiques (à commenter si construction de Khanat en mode dynamique)
|
||||||
# libxml2 : python-pyicu (support d'unicode), python-dev (support de... python)
|
# libxml2 : python-pyicu (support d'unicode), python-dev (support de... python)
|
||||||
- apt-get install -y wget python-pyicu python-dev
|
- apt-get install -y wget python-pyicu python-dev
|
||||||
|
@ -28,32 +20,31 @@ Linux client build:
|
||||||
- cd BUILD/x86_64
|
- cd BUILD/x86_64
|
||||||
## Le curl des dépots a trop de dépendances en statique. On le recompile donc, afin d'aléger l'executable
|
## Le curl des dépots a trop de dépendances en statique. On le recompile donc, afin d'aléger l'executable
|
||||||
# Téléchargement et décompression des dépendances à recompiller
|
# Téléchargement et décompression des dépendances à recompiller
|
||||||
- wget -c http://curl.haxx.se/download/curl-7.50.0.tar.gz
|
- wget -c http://curl.haxx.se/download/curl-7.21.0.tar.gz
|
||||||
- tar xzf curl-7.50.0.tar.gz
|
- tar xzf curl-7.21.0.tar.gz
|
||||||
# Compilation de curl
|
# Compilation de curl
|
||||||
- cd curl-7.50.0
|
- cd curl-7.21.0
|
||||||
- ./configure --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 --without-libssh2 --with-ssl
|
- ./configure --disable-ldap --disable-ldaps --disable-rtsp --disable-dict --disable-ipv6 --disable-crypto-auth --disable-sspi --disable-tls-srp --without-gnutls --without-librtmp --without-libidn --disable-versioned-symbols --disable-pop3 --without-libssh2 --with-ssl=/usr/lib/x86_64-linux-gnu/libssl.so
|
||||||
- make install -j$(nproc)
|
- make install -j$(($(nproc)-1))
|
||||||
- cd ..
|
- cd ..
|
||||||
## Compilation de Khanat
|
## Compilation de Khanat
|
||||||
# Configuration
|
# Configuration
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_LUA52=ON ../../code
|
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_BUILD_TYPE=Release -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_UNIX_STRUCTURE=OFF -DWITH_INSTALL_LIBRARIES=OFF -DWITH_LUA52=ON -DCURL_LIBRARY=/usr/local/lib/libcurl.a ../../code
|
||||||
# Compilation et installation
|
# Compilation et installation
|
||||||
- make -j$(nproc) install DESTDIR=../../Linux/x86_64
|
- make -j$(($(nproc)-1)) install DESTDIR=../../Linux/x86_64
|
||||||
# Packaging
|
|
||||||
- cd ../../
|
|
||||||
- cp ./dist/khanat/autoextract_script.sh ./Linux/x86_64/
|
|
||||||
- chmod +x ./Linux/x86_64/autoextract_script.sh
|
|
||||||
- makeself --nox11 --target /tmp/khanat_installer ./Linux/x86_64/ khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run "Khanat installer" ./autoextract_script.sh
|
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "khanat-$(echo $CI_BUILD_REF | head -c 7)-$CI_PIPELINE_ID-Linux-x86_64"
|
|
||||||
paths:
|
paths:
|
||||||
- khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
- Linux
|
||||||
|
cache:
|
||||||
|
key: "$CI_BUILD_NAME"
|
||||||
|
paths:
|
||||||
|
- BUILD
|
||||||
|
|
||||||
# Job de compilation pour OSX
|
OSX:
|
||||||
OSX client build:
|
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
|
- develop
|
||||||
|
- /^feature\/.*(\+CI$|\+CI-OSX.*)/
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- OSX
|
- OSX
|
||||||
|
@ -64,77 +55,11 @@ OSX client build:
|
||||||
# Configuration
|
# Configuration
|
||||||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFINAL_VERSION=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON -DWITH_LUA52=ON ../../code
|
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFINAL_VERSION=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON -DWITH_LUA52=ON ../../code
|
||||||
# Compilation et installation
|
# Compilation et installation
|
||||||
- make -j$(($(sysctl -n hw.ncpu)/2)) install DESTDIR=../../OSX/x86_64
|
- make -j$(($(sysctl -n hw.ncpu)-1)) install DESTDIR=../../OSX/x86_64
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-OSX-x86_64"
|
|
||||||
paths:
|
paths:
|
||||||
- OSX/x86_64/*
|
- OSX
|
||||||
when: manual
|
cache:
|
||||||
|
key: "$CI_BUILD_NAME"
|
||||||
## TESTS
|
paths:
|
||||||
|
- BUILD
|
||||||
Linux client test:
|
|
||||||
stage: test
|
|
||||||
except:
|
|
||||||
- ryzomcore
|
|
||||||
tags:
|
|
||||||
- Docker
|
|
||||||
image: ubuntu:14.04
|
|
||||||
script:
|
|
||||||
# Test de l'installation initiale
|
|
||||||
- ./khanat-$(echo $CI_BUILD_REF | head -c 7 )-$CI_PIPELINE_ID-Linux-x86_64.run
|
|
||||||
dependencies:
|
|
||||||
- Linux client build
|
|
||||||
|
|
||||||
.OSX client test:
|
|
||||||
stage: test
|
|
||||||
except:
|
|
||||||
- ryzomcore
|
|
||||||
tags:
|
|
||||||
- OSX
|
|
||||||
script:
|
|
||||||
- echo "pas encore de test pour le client OSX"
|
|
||||||
dependencies:
|
|
||||||
- OSX client build
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
##DEPLOYEMENT TO STAGING (TEST SERVER)
|
|
||||||
|
|
||||||
# Job de déploiment vers le staging. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de staging (zone de test)
|
|
||||||
.Deploy to Staging:
|
|
||||||
stage: staging
|
|
||||||
environment: Staging
|
|
||||||
except:
|
|
||||||
- ryzomcore
|
|
||||||
tags:
|
|
||||||
- Docker
|
|
||||||
image: ubuntu:14.04
|
|
||||||
script:
|
|
||||||
- echo "pas encore de deployment"
|
|
||||||
dependencies:
|
|
||||||
- Linux client build
|
|
||||||
- Linux client test
|
|
||||||
- OSX client build
|
|
||||||
- OSX client test
|
|
||||||
when: manual
|
|
||||||
|
|
||||||
##DEPLOYEMENT TO PRODUCTION
|
|
||||||
|
|
||||||
# Job de déploiment vers la production. Inutilisé pour le moment, il pourrait servir à l'avenir pour déployer automatiquement les nouvelles versions du client/serveur vers l'environnement de production
|
|
||||||
.Release to Production:
|
|
||||||
stage: production
|
|
||||||
environment: Production
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- Docker
|
|
||||||
image: ubuntu:14.04
|
|
||||||
script:
|
|
||||||
- echo "pas encore de tag"
|
|
||||||
dependencies:
|
|
||||||
- Linux client build
|
|
||||||
- Linux client test
|
|
||||||
- OSX client build
|
|
||||||
- OSX client test
|
|
||||||
- Deploy to Staging
|
|
||||||
when: manual
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ IF(COMMAND cmake_policy)
|
||||||
IF(POLICY CMP0020)
|
IF(POLICY CMP0020)
|
||||||
CMAKE_POLICY(SET CMP0020 NEW)
|
CMAKE_POLICY(SET CMP0020 NEW)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(COMMAND cmake_policy)
|
||||||
|
|
||||||
INCLUDE(nel)
|
INCLUDE(nel)
|
||||||
INCLUDE(ConfigureChecks)
|
INCLUDE(ConfigureChecks)
|
||||||
|
@ -61,12 +61,11 @@ SET(NL_VERSION_MAJOR 0)
|
||||||
SET(NL_VERSION_MINOR 12)
|
SET(NL_VERSION_MINOR 12)
|
||||||
SET(NL_VERSION_PATCH 0)
|
SET(NL_VERSION_PATCH 0)
|
||||||
SET(YEAR "2004-${CURRENT_YEAR}")
|
SET(YEAR "2004-${CURRENT_YEAR}")
|
||||||
SET(AUTHOR "Winch Gate and The Ryzom Core Community")
|
SET(AUTHOR "Winchgate and The Ryzom Core Community")
|
||||||
|
|
||||||
SET(RYZOM_VERSION_MAJOR 2)
|
SET(RYZOM_VERSION_MAJOR 2)
|
||||||
SET(RYZOM_VERSION_MINOR 9)
|
SET(RYZOM_VERSION_MINOR 9)
|
||||||
SET(RYZOM_VERSION_PATCH 0)
|
SET(RYZOM_VERSION_PATCH 0)
|
||||||
SET(REVISION 0)
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Redirect output files
|
# Redirect output files
|
||||||
|
@ -76,15 +75,15 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
# DLL should be in the same directory as EXE under Windows
|
# DLL should be in the same directory as EXE under Windows
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_MFC)
|
IF(WITH_MFC)
|
||||||
FIND_PACKAGE(MFC QUIET)
|
FIND_PACKAGE(MFC QUIET)
|
||||||
ENDIF()
|
ENDIF(WITH_MFC)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Set default config options
|
# Set default config options
|
||||||
|
@ -98,6 +97,8 @@ NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
|
||||||
NL_SETUP_PREFIX_PATHS()
|
NL_SETUP_PREFIX_PATHS()
|
||||||
RYZOM_SETUP_PREFIX_PATHS()
|
RYZOM_SETUP_PREFIX_PATHS()
|
||||||
|
|
||||||
|
NL_CONFIGURE_CHECKS()
|
||||||
|
|
||||||
NL_SETUP_BUILD()
|
NL_SETUP_BUILD()
|
||||||
NL_SETUP_BUILD_FLAGS()
|
NL_SETUP_BUILD_FLAGS()
|
||||||
|
|
||||||
|
@ -111,8 +112,8 @@ IF(WIN32)
|
||||||
|
|
||||||
IF(WITH_MFC)
|
IF(WITH_MFC)
|
||||||
FIND_PACKAGE(CustomMFC REQUIRED)
|
FIND_PACKAGE(CustomMFC REQUIRED)
|
||||||
ENDIF()
|
ENDIF(WITH_MFC)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
FIND_PACKAGE(ZLIB REQUIRED)
|
FIND_PACKAGE(ZLIB REQUIRED)
|
||||||
FIND_PACKAGE(LibXml2 REQUIRED)
|
FIND_PACKAGE(LibXml2 REQUIRED)
|
||||||
|
@ -121,25 +122,15 @@ FIND_PACKAGE(OpenSSL REQUIRED)
|
||||||
FIND_PACKAGE(GIF)
|
FIND_PACKAGE(GIF)
|
||||||
FIND_PACKAGE(Jpeg)
|
FIND_PACKAGE(Jpeg)
|
||||||
|
|
||||||
IF(WITH_LIBOVR)
|
|
||||||
FIND_PACKAGE(LibOVR)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(WITH_LIBVR)
|
|
||||||
FIND_PACKAGE(LibVR)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
NL_CONFIGURE_CHECKS()
|
|
||||||
|
|
||||||
IF(WITH_STATIC_LIBXML2)
|
IF(WITH_STATIC_LIBXML2)
|
||||||
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
SET(LIBXML2_DEFINITIONS ${LIBXML2_DEFINITIONS} -DLIBXML_STATIC)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_LIBXML2)
|
||||||
|
|
||||||
IF(WITH_LIBXML2_ICONV)
|
IF(WITH_LIBXML2_ICONV)
|
||||||
FIND_PACKAGE(Iconv REQUIRED)
|
FIND_PACKAGE(Iconv REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR})
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICONV_LIBRARIES})
|
||||||
ENDIF()
|
ENDIF(WITH_LIBXML2_ICONV)
|
||||||
|
|
||||||
IF(WITH_STATIC)
|
IF(WITH_STATIC)
|
||||||
# libxml2 could need winsock2 library
|
# libxml2 could need winsock2 library
|
||||||
|
@ -154,20 +145,20 @@ IF(WITH_STATIC)
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC)
|
||||||
|
|
||||||
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake)
|
||||||
|
|
||||||
IF(FINAL_VERSION)
|
IF(FINAL_VERSION)
|
||||||
ADD_DEFINITIONS(-DFINAL_VERSION=1)
|
ADD_DEFINITIONS(-DFINAL_VERSION=1)
|
||||||
ENDIF()
|
ENDIF(FINAL_VERSION)
|
||||||
|
|
||||||
IF(WITH_SSE2)
|
IF(WITH_SSE2)
|
||||||
ADD_DEFINITIONS(-DNL_HAS_SSE2)
|
ADD_DEFINITIONS(-DNL_HAS_SSE2)
|
||||||
IF(WITH_SSE3)
|
IF(WITH_SSE3)
|
||||||
ADD_DEFINITIONS(-DNL_HAS_SSE3)
|
ADD_DEFINITIONS(-DNL_HAS_SSE3)
|
||||||
ENDIF()
|
ENDIF(WITH_SSE3)
|
||||||
ENDIF()
|
ENDIF(WITH_SSE2)
|
||||||
|
|
||||||
IF(APPLE_CERTIFICATE)
|
IF(APPLE_CERTIFICATE)
|
||||||
# Find codesign_allocate
|
# Find codesign_allocate
|
||||||
|
@ -313,7 +304,7 @@ IF(WITH_QT5)
|
||||||
|
|
||||||
ADD_QT_LIBRARY(XcbQpa)
|
ADD_QT_LIBRARY(XcbQpa)
|
||||||
ADD_QT_LIBRARY(PlatformSupport)
|
ADD_QT_LIBRARY(PlatformSupport)
|
||||||
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL -lxcb-glx)
|
SET(QT_LIBRARIES ${QT_LIBRARIES} -lX11-xcb -lXi -lSM -lICE -lxcb -lGL)
|
||||||
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
||||||
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
|
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -408,16 +399,16 @@ IF(WITH_QT)
|
||||||
|
|
||||||
# Use Qt 4
|
# Use Qt 4
|
||||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
|
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
|
||||||
ENDIF()
|
ENDIF(WITH_QT)
|
||||||
|
|
||||||
IF(WITH_ASSIMP)
|
IF(WITH_ASSIMP)
|
||||||
FIND_PACKAGE(assimp REQUIRED)
|
FIND_PACKAGE(assimp REQUIRED)
|
||||||
ENDIF()
|
ENDIF(WITH_ASSIMP)
|
||||||
|
|
||||||
IF(WITH_NEL)
|
IF(WITH_NEL)
|
||||||
IF(WITH_NEL_TESTS)
|
IF(WITH_NEL_TESTS)
|
||||||
FIND_PACKAGE(CppTest)
|
FIND_PACKAGE(CppTest)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_TESTS)
|
||||||
|
|
||||||
IF(WITH_GUI)
|
IF(WITH_GUI)
|
||||||
FIND_PACKAGE(Luabind REQUIRED)
|
FIND_PACKAGE(Luabind REQUIRED)
|
||||||
|
@ -455,19 +446,19 @@ IF(WITH_NEL)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
|
||||||
ADD_SUBDIRECTORY(nel)
|
ADD_SUBDIRECTORY(nel)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL)
|
||||||
|
|
||||||
IF(WITH_RYZOM)
|
IF(WITH_RYZOM)
|
||||||
ADD_SUBDIRECTORY(ryzom)
|
ADD_SUBDIRECTORY(ryzom)
|
||||||
ENDIF()
|
ENDIF(WITH_RYZOM)
|
||||||
|
|
||||||
IF(WITH_NELNS)
|
IF(WITH_NELNS)
|
||||||
ADD_SUBDIRECTORY(nelns)
|
ADD_SUBDIRECTORY(nelns)
|
||||||
ENDIF()
|
ENDIF(WITH_NELNS)
|
||||||
|
|
||||||
IF(WITH_SNOWBALLS)
|
IF(WITH_SNOWBALLS)
|
||||||
ADD_SUBDIRECTORY(snowballs2)
|
ADD_SUBDIRECTORY(snowballs2)
|
||||||
ENDIF()
|
ENDIF(WITH_SNOWBALLS)
|
||||||
|
|
||||||
IF(WITH_TOOLS)
|
IF(WITH_TOOLS)
|
||||||
ADD_SUBDIRECTORY(tool)
|
ADD_SUBDIRECTORY(tool)
|
||||||
|
@ -475,22 +466,22 @@ ENDIF()
|
||||||
|
|
||||||
IF(WITH_STUDIO)
|
IF(WITH_STUDIO)
|
||||||
ADD_SUBDIRECTORY(studio)
|
ADD_SUBDIRECTORY(studio)
|
||||||
ENDIF()
|
ENDIF(WITH_STUDIO)
|
||||||
|
|
||||||
# To build the documention, you will have to enable it
|
# To build the documention, you will have to enable it
|
||||||
# and then do the equivalent of "make DoxygenDoc".
|
# and then do the equivalent of "make DoxygenDoc".
|
||||||
IF(BUILD_DOCUMENTATION)
|
IF(BUILD_DOCUMENTATION)
|
||||||
IF(DOT)
|
IF(DOT)
|
||||||
SET(HAVE_DOT YES)
|
SET(HAVE_DOT YES)
|
||||||
ELSE()
|
ELSE(DOT)
|
||||||
SET(HAVE_DOT NO)
|
SET(HAVE_DOT NO)
|
||||||
ENDIF()
|
ENDIF(DOT)
|
||||||
# This processes our Doxyfile.in and substitutes paths to generate
|
# This processes our Doxyfile.in and substitutes paths to generate
|
||||||
# a final Doxyfile
|
# a final Doxyfile
|
||||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/Doxyfile.cmake.in ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN} ${CMAKE_BINARY_DIR}/doc/Doxyfile)
|
||||||
ENDIF()
|
ENDIF(BUILD_DOCUMENTATION)
|
||||||
|
|
||||||
IF(WITH_NEL_TESTS)
|
IF(WITH_NEL_TESTS)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
|
@ -500,8 +491,8 @@ IF(WITH_NEL_TESTS)
|
||||||
SET(SVNCOMMAND svn)
|
SET(SVNCOMMAND svn)
|
||||||
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
|
SET(SVNSOURCEDIR http://dev.ryzom.com/svn/trunk/nel)
|
||||||
SET(GENERATELOGS svn2cl)
|
SET(GENERATELOGS svn2cl)
|
||||||
ENDIF()
|
ENDIF(BUILD_DASHBOARD)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_TESTS)
|
||||||
|
|
||||||
# packaging information
|
# packaging information
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ryzom Core MMORPG Framework")
|
||||||
|
@ -533,10 +524,10 @@ IF(WIN32)
|
||||||
#SET(CPACK_GENERATOR "NSIS")
|
#SET(CPACK_GENERATOR "NSIS")
|
||||||
SET(CPACK_GENERATOR "NSIS;ZIP")
|
SET(CPACK_GENERATOR "NSIS;ZIP")
|
||||||
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
SET(CPACK_GENERATOR "TGZ")
|
SET(CPACK_GENERATOR "TGZ")
|
||||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
set(CPACK_SOURCE_IGNORE_FILES
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
"~$"
|
"~$"
|
||||||
"\\\\.cvsignore$"
|
"\\\\.cvsignore$"
|
||||||
|
@ -554,8 +545,8 @@ IF(WIN32)
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtXmld4.dll"
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtCored4.dll"
|
||||||
DESTINATION ${NL_BIN_PREFIX})
|
DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF()
|
ENDIF(WITH_QT)
|
||||||
ELSE()
|
ELSE(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
IF(WITH_QT)
|
IF(WITH_QT)
|
||||||
INCLUDE(${QT_USE_FILE})
|
INCLUDE(${QT_USE_FILE})
|
||||||
INSTALL(FILES
|
INSTALL(FILES
|
||||||
|
@ -563,8 +554,8 @@ IF(WIN32)
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtXml4.dll"
|
||||||
"${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
|
"${QT_LIBRARY_DIR}/../bin/QtCore4.dll"
|
||||||
DESTINATION ${NL_BIN_PREFIX})
|
DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF()
|
ENDIF(WITH_QT)
|
||||||
ENDIF()
|
ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
|
|
||||||
# Install CEGUI and its dependencies.
|
# Install CEGUI and its dependencies.
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
|
@ -574,14 +565,14 @@ IF(WIN32)
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/CEGUIFalagardWRBase.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/Devil.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(FILES "${CEGUI_LIB_DIR}/ILU.dll" DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_CEGUI)
|
||||||
|
|
||||||
# Only the tools require MFC.
|
# Only the tools require MFC.
|
||||||
IF(WITH_TOOLS)
|
IF(WITH_TOOLS)
|
||||||
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
|
SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE)
|
||||||
ENDIF()
|
ENDIF(WITH_TOOLS)
|
||||||
#INCLUDE(InstallRequiredSystemLibraries)
|
#INCLUDE(InstallRequiredSystemLibraries)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
|
@ -591,4 +582,4 @@ INCLUDE(CMakePackaging.txt)
|
||||||
#INCLUDE(UseDebian)
|
#INCLUDE(UseDebian)
|
||||||
#IF(DEBIAN_FOUND)
|
#IF(DEBIAN_FOUND)
|
||||||
# ADD_DEBIAN_TARGETS(nel)
|
# ADD_DEBIAN_TARGETS(nel)
|
||||||
#ENDIF()
|
#ENDIF(DEBIAN_FOUND)
|
||||||
|
|
|
@ -22,8 +22,13 @@ IF(NOT TARGET_CPU)
|
||||||
SET(TARGET_CPU "armv7")
|
SET(TARGET_CPU "armv7")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
SET(ARMV7_HARD_FLOAT OFF)
|
||||||
|
|
||||||
IF(TARGET_CPU STREQUAL "armv7")
|
IF(TARGET_CPU STREQUAL "armv7")
|
||||||
SET(LIBRARY_ARCHITECTURE "armeabi-v7a")
|
SET(LIBRARY_ARCHITECTURE "armeabi-v7a")
|
||||||
|
IF(ARMV7_HARD_FLOAT)
|
||||||
|
SET(LIBRARY_ARCHITECTURE "${LIBRARY_ARCHITECTURE}-hard")
|
||||||
|
ENDIF()
|
||||||
SET(CMAKE_SYSTEM_PROCESSOR "armv7")
|
SET(CMAKE_SYSTEM_PROCESSOR "armv7")
|
||||||
SET(TOOLCHAIN_ARCH "arm")
|
SET(TOOLCHAIN_ARCH "arm")
|
||||||
SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi")
|
SET(GCC_TOOLCHAIN_PREFIX "arm-linux-androideabi")
|
||||||
|
@ -118,12 +123,6 @@ MACRO(SEARCH_TOOLCHAIN _COMPILER)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# try prefixes without version
|
|
||||||
SET(_TOOLCHAIN_WITHOUT_VERSION "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}")
|
|
||||||
IF(EXISTS ${_TOOLCHAIN_WITHOUT_VERSION})
|
|
||||||
LIST(APPEND ${_COMPILER}_TOOLCHAIN_VERSIONS "default")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT ${_COMPILER}_TOOLCHAIN_VERSIONS)
|
IF(NOT ${_COMPILER}_TOOLCHAIN_VERSIONS)
|
||||||
MESSAGE(FATAL_ERROR "No Android ${_COMPILER} toolchain found in default search path ${NDK_ROOT}/toolchains")
|
MESSAGE(FATAL_ERROR "No Android ${_COMPILER} toolchain found in default search path ${NDK_ROOT}/toolchains")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -137,15 +136,7 @@ MACRO(SEARCH_TOOLCHAIN _COMPILER)
|
||||||
LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION)
|
LIST(GET ${_COMPILER}_TOOLCHAIN_VERSIONS 0 ${_COMPILER}_TOOLCHAIN_VERSION)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
MESSAGE(STATUS "TOOLCHAIN_PREFIX = ${${_COMPILER}_TOOLCHAIN_VERSION}")
|
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-${${_COMPILER}_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}")
|
||||||
|
|
||||||
IF("${${_COMPILER}_TOOLCHAIN_VERSION}" STREQUAL "default")
|
|
||||||
MESSAGE(STATUS "default")
|
|
||||||
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}/prebuilt/${TOOLCHAIN_HOST}")
|
|
||||||
ELSE()
|
|
||||||
MESSAGE(STATUS "not default")
|
|
||||||
SET(${_COMPILER}_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${${_COMPILER}_TOOLCHAIN_PREFIX}-${${_COMPILER}_TOOLCHAIN_VERSION}/prebuilt/${TOOLCHAIN_HOST}")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT EXISTS "${${_COMPILER}_TOOLCHAIN_ROOT}")
|
IF(NOT EXISTS "${${_COMPILER}_TOOLCHAIN_ROOT}")
|
||||||
FILE(GLOB _TOOLCHAIN_PREFIXES "${${_COMPILER}_TOOLCHAIN_ROOT}*")
|
FILE(GLOB _TOOLCHAIN_PREFIXES "${${_COMPILER}_TOOLCHAIN_ROOT}*")
|
||||||
|
@ -201,7 +192,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
MACRO(SET_TOOLCHAIN_BINARY_LLVM _NAME _BINARY)
|
MACRO(SET_TOOLCHAIN_BINARY_LLVM _NAME _BINARY)
|
||||||
SET(${_NAME} ${CLANG_TOOLCHAIN_ROOT}/bin/${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE)
|
SET(${_NAME} ${CLANG_TOOLCHAIN_ROOT}/bin/${_BINARY}${TOOLCHAIN_BIN_SUFFIX} CACHE PATH "" FORCE )
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
MACRO(SET_TOOLCHAIN_BINARY_GCC _NAME _BINARY)
|
MACRO(SET_TOOLCHAIN_BINARY_GCC _NAME _BINARY)
|
||||||
|
@ -223,14 +214,6 @@ IF(CLANG)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_ASM_COMPILER llvm-as)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_ASM_COMPILER llvm-as)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_AR llvm-ar)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_AR llvm-ar)
|
||||||
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_LINKER clang++)
|
SET_TOOLCHAIN_BINARY_LLVM(CMAKE_LINKER clang++)
|
||||||
|
|
||||||
IF(NOT EXISTS "${CMAKE_ASM_COMPILER}")
|
|
||||||
SET_TOOLCHAIN_BINARY_GCC(CMAKE_ASM_COMPILER as)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT EXISTS "${CMAKE_AR}")
|
|
||||||
SET_TOOLCHAIN_BINARY_GCC(CMAKE_AR ar)
|
|
||||||
ENDIF()
|
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE(STATUS "Using GCC compiler")
|
MESSAGE(STATUS "Using GCC compiler")
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
SET(${SYMBOL_FOUND} FALSE)
|
||||||
# MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
# MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
||||||
ENDIF()
|
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||||
ENDIF()
|
ENDIF(CMAKE_NM)
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
SET(CMAKE_OBJDUMP objdump)
|
SET(CMAKE_OBJDUMP objdump)
|
||||||
IF(CMAKE_OBJDUMP)
|
IF(CMAKE_OBJDUMP)
|
||||||
|
@ -35,11 +35,11 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
IF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
|
#MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}")
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
SET(${SYMBOL_FOUND} FALSE)
|
||||||
ELSE()
|
ELSE(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
|
#MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}")
|
||||||
ENDIF()
|
ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND")
|
||||||
ENDIF()
|
ENDIF(CMAKE_OBJDUMP)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
||||||
|
|
||||||
# CHECK_LINKED_LIBRARY
|
# CHECK_LINKED_LIBRARY
|
||||||
|
@ -66,8 +66,8 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
||||||
SET(${LIBRARY_FOUND} TRUE)
|
SET(${LIBRARY_FOUND} TRUE)
|
||||||
# MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
# MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
||||||
ENDIF()
|
ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
||||||
ENDIF()
|
ENDIF(CMAKE_OTOOL)
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
SET(CMAKE_OBJDUMP objdump)
|
SET(CMAKE_OBJDUMP objdump)
|
||||||
IF(CMAKE_OBJDUMP)
|
IF(CMAKE_OBJDUMP)
|
||||||
|
@ -79,11 +79,11 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
|
#MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.")
|
||||||
SET(${LIBRARY_FOUND} TRUE)
|
SET(${LIBRARY_FOUND} TRUE)
|
||||||
ELSE()
|
ELSE(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||||
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
|
#MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!")
|
||||||
ENDIF()
|
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
||||||
ENDIF()
|
ENDIF(CMAKE_OBJDUMP)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
ENDMACRO(CHECK_LINKED_LIBRARY)
|
ENDMACRO(CHECK_LINKED_LIBRARY)
|
||||||
|
|
||||||
MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
||||||
|
@ -91,13 +91,13 @@ MACRO(CHECK_DEPENDS MYLIBRARY OTHERLIBRARY SYMBOL MUSTLINK)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND)
|
IF(SYMBOL_FOUND)
|
||||||
CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
ENDIF()
|
ENDIF(SYMBOL_FOUND)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
SET(${MUSTLINK} YES)
|
SET(${MUSTLINK} YES)
|
||||||
ELSE()
|
ELSE(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
SET(${MUSTLINK} NO)
|
SET(${MUSTLINK} NO)
|
||||||
ENDIF()
|
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
ENDMACRO(CHECK_DEPENDS)
|
ENDMACRO(CHECK_DEPENDS)
|
||||||
|
|
||||||
# LINK_DEPENDS
|
# LINK_DEPENDS
|
||||||
|
@ -116,23 +116,23 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL)
|
||||||
IF(WIN32 OR WITH_STATIC)
|
IF(WIN32 OR WITH_STATIC)
|
||||||
# In static, we link all libraries because it will keep only used symbols
|
# In static, we link all libraries because it will keep only used symbols
|
||||||
SET(MUST_LINK TRUE)
|
SET(MUST_LINK TRUE)
|
||||||
ELSE()
|
ELSE(WIN32 OR WITH_STATIC)
|
||||||
CHECK_UNDEFINED_SYMBOL(${MYLIBRARY} ${SYMBOL} SYMBOL_FOUND)
|
CHECK_UNDEFINED_SYMBOL(${MYLIBRARY} ${SYMBOL} SYMBOL_FOUND)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND)
|
IF(SYMBOL_FOUND)
|
||||||
CHECK_LINKED_LIBRARY(${MYLIBRARY} ${OTHERLIBRARY} LIBRARY_FOUND)
|
CHECK_LINKED_LIBRARY(${MYLIBRARY} ${OTHERLIBRARY} LIBRARY_FOUND)
|
||||||
ENDIF()
|
ENDIF(SYMBOL_FOUND)
|
||||||
|
|
||||||
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
IF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
MESSAGE(STATUS "Underlinking found: ${${MYLIBRARY}} needs ${${OTHERLIBRARY}} but is not linked to, manually linking...")
|
MESSAGE(STATUS "Underlinking found: ${${MYLIBRARY}} needs ${${OTHERLIBRARY}} but is not linked to, manually linking...")
|
||||||
SET(MUST_LINK TRUE)
|
SET(MUST_LINK TRUE)
|
||||||
ENDIF()
|
ENDIF(SYMBOL_FOUND AND NOT LIBRARY_FOUND)
|
||||||
ENDIF()
|
ENDIF(WIN32 OR WITH_STATIC)
|
||||||
ENDIF()
|
ENDIF(${MYLIBRARY} AND ${OTHERLIBRARY} AND NOT ${OTHERLIBRARY}_LINKED)
|
||||||
IF(MUST_LINK)
|
IF(MUST_LINK)
|
||||||
MESSAGE(STATUS "Linking with ${${OTHERLIBRARY}}")
|
MESSAGE(STATUS "Linking with ${${OTHERLIBRARY}}")
|
||||||
SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}})
|
SET(${LIBRARIES} ${${LIBRARIES}} ${${OTHERLIBRARY}})
|
||||||
SET(${OTHERLIBRARY}_LINKED TRUE)
|
SET(${OTHERLIBRARY}_LINKED TRUE)
|
||||||
ENDIF()
|
ENDIF(MUST_LINK)
|
||||||
ENDMACRO(LINK_DEPENDS)
|
ENDMACRO(LINK_DEPENDS)
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,7 @@ MACRO(NL_CONFIGURE_CHECKS)
|
||||||
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
|
SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}")
|
||||||
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
|
SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}")
|
||||||
|
|
||||||
SET(RYZOM_VERSION_SHORT "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}")
|
SET(RYZOM_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}.${REVISION}")
|
||||||
SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}")
|
|
||||||
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
|
SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}")
|
||||||
NOW(BUILD_DATE)
|
NOW(BUILD_DATE)
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ if(MAXSDK_FOUND)
|
||||||
${MAXSDK_PARAMBLK2_LIBRARY}
|
${MAXSDK_PARAMBLK2_LIBRARY}
|
||||||
${MAXSDK_BMM_LIBRARY} )
|
${MAXSDK_BMM_LIBRARY} )
|
||||||
|
|
||||||
ELSE()
|
else(MAXSDK_FOUND)
|
||||||
set(MAXSDK_LIBRARIES)
|
set(MAXSDK_LIBRARIES)
|
||||||
ENDIF()
|
endif(MAXSDK_FOUND)
|
||||||
|
|
||||||
mark_as_advanced(MAXSDK_INCLUDE_DIR MAXSDK_LIBRARY)
|
mark_as_advanced(MAXSDK_INCLUDE_DIR MAXSDK_LIBRARY)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(CEGUI_FIND_QUIETLY TRUE)
|
SET(CEGUI_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(CEGUI_INCLUDE_DIRS
|
FIND_PATH(CEGUI_INCLUDE_DIRS
|
||||||
|
@ -45,9 +45,9 @@ IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
|
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
|
||||||
IF(NOT CEGUI_FIND_QUIETLY)
|
IF(NOT CEGUI_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
|
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
IF(NOT CEGUI_FIND_QUIETLY)
|
IF(NOT CEGUI_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
|
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
|
||||||
ENDIF()
|
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
IF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(CPPTEST_FIND_QUIETLY TRUE)
|
SET(CPPTEST_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(CPPTEST_LIBRARIES AND CPPTEST_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(CPPTEST_INCLUDE_DIR
|
FIND_PATH(CPPTEST_INCLUDE_DIR
|
||||||
cpptest.h
|
cpptest.h
|
||||||
|
@ -30,7 +30,7 @@ SET(LIBRARY_NAME_DEBUG cpptestd)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
|
SET(LIBRARY_NAME_RELEASE cpptest_stlport ${LIBRARY_NAME_RELEASE})
|
||||||
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
|
SET(LIBRARY_NAME_DEBUG cpptest_stlportd ${LIBRARY_NAME_DEBUG})
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
FIND_LIBRARY(CPPTEST_LIBRARY_RELEASE
|
||||||
${LIBRARY_NAME_RELEASE}
|
${LIBRARY_NAME_RELEASE}
|
||||||
|
@ -67,18 +67,18 @@ IF(CPPTEST_INCLUDE_DIR)
|
||||||
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
SET(CPPTEST_LIBRARIES "optimized;${CPPTEST_LIBRARY_RELEASE}")
|
||||||
IF(CPPTEST_LIBRARY_DEBUG)
|
IF(CPPTEST_LIBRARY_DEBUG)
|
||||||
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
SET(CPPTEST_LIBRARIES "${CPPTEST_LIBRARIES};debug;${CPPTEST_LIBRARY_DEBUG}")
|
||||||
ENDIF()
|
ENDIF(CPPTEST_LIBRARY_DEBUG)
|
||||||
ENDIF()
|
ENDIF(CPPTEST_LIBRARY_RELEASE)
|
||||||
ENDIF()
|
ENDIF(CPPTEST_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(CPPTEST_FOUND)
|
IF(CPPTEST_FOUND)
|
||||||
IF(NOT CPPTEST_FIND_QUIETLY)
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
MESSAGE(STATUS "Found CppTest: ${CPPTEST_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(CPPTEST_FOUND)
|
||||||
IF(NOT CPPTEST_FIND_QUIETLY)
|
IF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
MESSAGE(STATUS "Warning: Unable to find CppTest!")
|
||||||
ENDIF()
|
ENDIF(NOT CPPTEST_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(CPPTEST_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(CPPTEST_LIBRARY_RELEASE CPPTEST_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -6,20 +6,20 @@
|
||||||
|
|
||||||
IF(CustomMFC_FIND_REQUIRED)
|
IF(CustomMFC_FIND_REQUIRED)
|
||||||
SET(MFC_FIND_REQUIRED TRUE)
|
SET(MFC_FIND_REQUIRED TRUE)
|
||||||
ENDIF()
|
ENDIF(CustomMFC_FIND_REQUIRED)
|
||||||
|
|
||||||
IF(NOT MFC_DIR)
|
IF(NOT MFC_DIR)
|
||||||
# If MFC have been found, remember their directory
|
# If MFC have been found, remember their directory
|
||||||
IF(VC_DIR)
|
IF(VC_DIR)
|
||||||
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
|
SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc")
|
||||||
ENDIF()
|
ENDIF(VC_DIR)
|
||||||
|
|
||||||
FIND_PATH(MFC_DIR
|
FIND_PATH(MFC_DIR
|
||||||
include/afxwin.h
|
include/afxwin.h
|
||||||
HINTS
|
HINTS
|
||||||
${MFC_STANDARD_DIR}
|
${MFC_STANDARD_DIR}
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF(NOT MFC_DIR)
|
||||||
|
|
||||||
# Display an error message if MFC are not found, MFC_FOUND is updated
|
# Display an error message if MFC are not found, MFC_FOUND is updated
|
||||||
# User will be able to update MFC_DIR to the correct directory
|
# User will be able to update MFC_DIR to the correct directory
|
||||||
|
@ -33,9 +33,9 @@ IF(MFC_FOUND)
|
||||||
# Using 32 or 64 bits libraries
|
# Using 32 or 64 bits libraries
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib/amd64")
|
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib/amd64")
|
||||||
ELSE()
|
ELSE(TARGET_X64)
|
||||||
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib")
|
SET(MFC_LIBRARY_DIR "${MFC_DIR}/lib")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
# Add MFC libraries directory to default library path
|
# Add MFC libraries directory to default library path
|
||||||
LINK_DIRECTORIES(${MFC_LIBRARY_DIR})
|
LINK_DIRECTORIES(${MFC_LIBRARY_DIR})
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
if(DSOUND_INCLUDE_DIR)
|
if(DSOUND_INCLUDE_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(DSOUND_FIND_QUIETLY TRUE)
|
set(DSOUND_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
endif(DSOUND_INCLUDE_DIR)
|
||||||
|
|
||||||
find_path(DSOUND_INCLUDE_DIR dsound.h
|
find_path(DSOUND_INCLUDE_DIR dsound.h
|
||||||
"$ENV{DXSDK_DIR}"
|
"$ENV{DXSDK_DIR}"
|
||||||
|
@ -29,8 +29,8 @@ find_package_handle_standard_args(DSOUND DEFAULT_MSG
|
||||||
|
|
||||||
if(DSOUND_FOUND)
|
if(DSOUND_FOUND)
|
||||||
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
|
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
|
||||||
ELSE()
|
else(DSOUND_FOUND)
|
||||||
set(DSOUND_LIBRARIES)
|
set(DSOUND_LIBRARIES)
|
||||||
ENDIF()
|
endif(DSOUND_FOUND)
|
||||||
|
|
||||||
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
IF(DXSDK_DIR)
|
IF(DXSDK_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
SET(DXSDK_FIND_QUIETLY TRUE)
|
SET(DXSDK_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(DXSDK_DIR)
|
||||||
|
|
||||||
FIND_PATH(DXSDK_DIR
|
FIND_PATH(DXSDK_DIR
|
||||||
"Include/dxsdkver.h"
|
"Include/dxsdkver.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
||||||
|
@ -42,9 +42,9 @@ IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
SET(EFXUTIL_FOUND "YES")
|
SET(EFXUTIL_FOUND "YES")
|
||||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
IF(NOT EFXUTIL_FIND_QUIETLY)
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
||||||
ENDIF()
|
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
|
|
@ -16,7 +16,7 @@ IF(WITH_STLPORT)
|
||||||
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
|
SET(EXTERNAL_TEMP_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external_stlport ${CMAKE_CURRENT_SOURCE_DIR}/../external_stlport ${EXTERNAL_TEMP_PATH})
|
||||||
SET(EXTERNAL_TEMP_FILE "include/stlport/string")
|
SET(EXTERNAL_TEMP_FILE "include/stlport/string")
|
||||||
SET(EXTERNAL_NAME "external with STLport")
|
SET(EXTERNAL_NAME "external with STLport")
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
FIND_PATH(EXTERNAL_PATH
|
FIND_PATH(EXTERNAL_PATH
|
||||||
${EXTERNAL_TEMP_FILE}
|
${EXTERNAL_TEMP_FILE}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(FMOD_FIND_QUIETLY TRUE)
|
SET(FMOD_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(FMOD_INCLUDE_DIR
|
FIND_PATH(FMOD_INCLUDE_DIR
|
||||||
|
@ -25,9 +25,9 @@ FIND_PATH(FMOD_INCLUDE_DIR
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
|
SET(FMOD_LIBRARY_NAMES fmod64 fmod)
|
||||||
ELSE()
|
ELSE(TARGET_X64)
|
||||||
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
|
SET(FMOD_LIBRARY_NAMES fmodvc fmod)
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
FIND_LIBRARY(FMOD_LIBRARY
|
FIND_LIBRARY(FMOD_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
|
@ -49,9 +49,9 @@ IF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
SET(FMOD_FOUND "YES")
|
SET(FMOD_FOUND "YES")
|
||||||
IF(NOT FMOD_FIND_QUIETLY)
|
IF(NOT FMOD_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARY}")
|
MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT FMOD_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
IF(NOT FMOD_FIND_QUIETLY)
|
IF(NOT FMOD_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find FMOD!")
|
MESSAGE(STATUS "Warning: Unable to find FMOD!")
|
||||||
ENDIF()
|
ENDIF(NOT FMOD_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(Freetype_FIND_QUIETLY TRUE)
|
SET(Freetype_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
||||||
freetype
|
freetype
|
||||||
|
@ -24,7 +24,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIRS
|
||||||
|
|
||||||
IF(NOT FREETYPE_INCLUDE_DIRS)
|
IF(NOT FREETYPE_INCLUDE_DIRS)
|
||||||
SET(FREETYPE_INCLUDE_DIRS "")
|
SET(FREETYPE_INCLUDE_DIRS "")
|
||||||
ENDIF()
|
ENDIF(NOT FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
||||||
# ft2build.h does not reside in the freetype include dir
|
# ft2build.h does not reside in the freetype include dir
|
||||||
FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
||||||
|
@ -42,7 +42,7 @@ FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
||||||
# combine both include directories into one variable
|
# combine both include directories into one variable
|
||||||
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
||||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
|
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
|
||||||
ENDIF()
|
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
||||||
NAMES freetype libfreetype freetype219 freetype246
|
NAMES freetype libfreetype freetype219 freetype246
|
||||||
|
@ -89,8 +89,8 @@ IF(FREETYPE_INCLUDE_DIRS)
|
||||||
# Case where Freetype is compiled from sources (debug version is compiled by default)
|
# Case where Freetype is compiled from sources (debug version is compiled by default)
|
||||||
SET(FREETYPE_FOUND ON)
|
SET(FREETYPE_FOUND ON)
|
||||||
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_DEBUG})
|
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY_DEBUG})
|
||||||
ENDIF()
|
ENDIF(FREETYPE_LIBRARY_RELEASE AND FREETYPE_LIBRARY_DEBUG)
|
||||||
ENDIF()
|
ENDIF(FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
||||||
IF(FREETYPE_FOUND)
|
IF(FREETYPE_FOUND)
|
||||||
IF(WITH_STATIC_EXTERNAL AND APPLE)
|
IF(WITH_STATIC_EXTERNAL AND APPLE)
|
||||||
|
@ -98,13 +98,13 @@ IF(FREETYPE_FOUND)
|
||||||
IF(BZIP2_FOUND)
|
IF(BZIP2_FOUND)
|
||||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
|
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR})
|
||||||
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} ${BZIP2_LIBRARIES})
|
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} ${BZIP2_LIBRARIES})
|
||||||
ENDIF()
|
ENDIF(BZIP2_FOUND)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_EXTERNAL AND APPLE)
|
||||||
IF(NOT Freetype_FIND_QUIETLY)
|
IF(NOT Freetype_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARIES}")
|
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT Freetype_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||||
IF(NOT Freetype_FIND_QUIETLY)
|
IF(NOT Freetype_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find FreeType!")
|
MESSAGE(STATUS "Warning: Unable to find FreeType!")
|
||||||
ENDIF()
|
ENDIF(NOT Freetype_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(FREETYPE_FOUND)
|
||||||
|
|
|
@ -41,7 +41,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
${_GTK2IncDir}
|
${_GTK2IncDir}
|
||||||
/usr/include/gtk-2.0
|
/usr/include/gtk-2.0
|
||||||
/usr/local/include/gtk-2.0
|
/usr/local/include/gtk-2.0
|
||||||
/opt/local/include/gtk-2.0
|
|
||||||
/opt/include/gtk-2.0
|
/opt/include/gtk-2.0
|
||||||
/opt/gnome/include/gtk-2.0
|
/opt/gnome/include/gtk-2.0
|
||||||
/sw/include/gtk-2.0
|
/sw/include/gtk-2.0
|
||||||
|
@ -64,7 +63,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/gnome/lib64/glib-2.0/include
|
/opt/gnome/lib64/glib-2.0/include
|
||||||
/opt/gnome/lib/glib-2.0/include
|
/opt/gnome/lib/glib-2.0/include
|
||||||
/opt/lib/glib-2.0/include
|
/opt/lib/glib-2.0/include
|
||||||
/opt/local/lib/glib-2.0/include
|
|
||||||
/usr/lib64/glib-2.0/include
|
/usr/lib64/glib-2.0/include
|
||||||
/usr/lib/glib-2.0/include
|
/usr/lib/glib-2.0/include
|
||||||
/sw/lib/glib-2.0/include
|
/sw/lib/glib-2.0/include
|
||||||
|
@ -79,7 +77,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
${_GLIB2IncDir}
|
${_GLIB2IncDir}
|
||||||
${_GMODULE2IncDir}
|
${_GMODULE2IncDir}
|
||||||
/opt/include/glib-2.0
|
/opt/include/glib-2.0
|
||||||
/opt/local/include/glib-2.0
|
|
||||||
/opt/gnome/include/glib-2.0
|
/opt/gnome/include/glib-2.0
|
||||||
/usr/include/glib-2.0
|
/usr/include/glib-2.0
|
||||||
/sw/include/glib-2.0
|
/sw/include/glib-2.0
|
||||||
|
@ -96,7 +93,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/gnome/lib/gtk-2.0/include
|
/opt/gnome/lib/gtk-2.0/include
|
||||||
/opt/gnome/lib64/gtk-2.0/include
|
/opt/gnome/lib64/gtk-2.0/include
|
||||||
/opt/lib/gtk-2.0/include
|
/opt/lib/gtk-2.0/include
|
||||||
/opt/local/lib/gtk-2.0/include
|
|
||||||
/usr/lib/gtk-2.0/include
|
/usr/lib/gtk-2.0/include
|
||||||
/usr/lib64/gtk-2.0/include
|
/usr/lib64/gtk-2.0/include
|
||||||
/sw/lib/gtk-2.0/include
|
/sw/lib/gtk-2.0/include
|
||||||
|
@ -112,7 +108,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/gnome/lib/gtk-2.0/include
|
/opt/gnome/lib/gtk-2.0/include
|
||||||
/opt/gnome/lib64/gtk-2.0/include
|
/opt/gnome/lib64/gtk-2.0/include
|
||||||
/opt/lib/gtk-2.0/include
|
/opt/lib/gtk-2.0/include
|
||||||
/opt/local/include/gdk-pixbuf-2.0
|
|
||||||
/usr/lib/gtk-2.0/include
|
/usr/lib/gtk-2.0/include
|
||||||
/usr/lib64/gtk-2.0/include
|
/usr/lib64/gtk-2.0/include
|
||||||
/sw/lib/gtk-2.0/include
|
/sw/lib/gtk-2.0/include
|
||||||
|
@ -145,7 +140,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/gnome/include/libglade-2.0
|
/opt/gnome/include/libglade-2.0
|
||||||
/usr/include/libglade-2.0
|
/usr/include/libglade-2.0
|
||||||
/opt/include/libglade-2.0
|
/opt/include/libglade-2.0
|
||||||
/opt/local/include/libglade-2.0
|
|
||||||
/sw/include/libglade-2.0
|
/sw/include/libglade-2.0
|
||||||
)
|
)
|
||||||
gtk2_debug_message("GTK2_GLADE_INCLUDE_DIR is ${GTK2_GLADE_INCLUDE_DIR}")
|
gtk2_debug_message("GTK2_GLADE_INCLUDE_DIR is ${GTK2_GLADE_INCLUDE_DIR}")
|
||||||
|
@ -160,7 +154,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/usr/include/pango-1.0
|
/usr/include/pango-1.0
|
||||||
/opt/gnome/include/pango-1.0
|
/opt/gnome/include/pango-1.0
|
||||||
/opt/include/pango-1.0
|
/opt/include/pango-1.0
|
||||||
/opt/local/include/pango-1.0
|
|
||||||
/sw/include/pango-1.0
|
/sw/include/pango-1.0
|
||||||
)
|
)
|
||||||
gtk2_debug_message("GTK2_PANGO_INCLUDE_DIR is ${GTK2_PANGO_INCLUDE_DIR}")
|
gtk2_debug_message("GTK2_PANGO_INCLUDE_DIR is ${GTK2_PANGO_INCLUDE_DIR}")
|
||||||
|
@ -177,7 +170,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/usr/include/cairo
|
/usr/include/cairo
|
||||||
/opt/include
|
/opt/include
|
||||||
/opt/include/cairo
|
/opt/include/cairo
|
||||||
/opt/local/include/cairo
|
|
||||||
/sw/include
|
/sw/include
|
||||||
/sw/include/cairo
|
/sw/include/cairo
|
||||||
)
|
)
|
||||||
|
@ -193,7 +185,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/gnome/include/atk-1.0
|
/opt/gnome/include/atk-1.0
|
||||||
/usr/include/atk-1.0
|
/usr/include/atk-1.0
|
||||||
/opt/include/atk-1.0
|
/opt/include/atk-1.0
|
||||||
/opt/local/include/atk-1.0
|
|
||||||
/sw/include/atk-1.0
|
/sw/include/atk-1.0
|
||||||
)
|
)
|
||||||
gtk2_debug_message("GTK2_ATK_INCLUDE_DIR is ${GTK2_ATK_INCLUDE_DIR}")
|
gtk2_debug_message("GTK2_ATK_INCLUDE_DIR is ${GTK2_ATK_INCLUDE_DIR}")
|
||||||
|
@ -241,27 +232,6 @@ else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||||
/opt/lib
|
/opt/lib
|
||||||
/sw/lib
|
/sw/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT GTK2_GDK_PIXBUF_LIBRARY)
|
|
||||||
# May need .dylib on Mac
|
|
||||||
SET(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib)
|
|
||||||
find_library(GTK2_GDK_PIXBUF_LIBRARY
|
|
||||||
NAMES
|
|
||||||
gdk_pixbuf-2.0.0
|
|
||||||
PATHS
|
|
||||||
${_GDK2LinkDir}
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/openwin/lib
|
|
||||||
/usr/X11R6/lib
|
|
||||||
/opt/gnome/lib
|
|
||||||
/opt/lib
|
|
||||||
/sw/lib
|
|
||||||
)
|
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
endif (NOT GTK2_GDK_PIXBUF_LIBRARY)
|
|
||||||
|
|
||||||
gtk2_debug_message("GTK2_GDK_PIXBUF_LIBRARY is ${GTK2_GDK_PIXBUF_LIBRARY}")
|
gtk2_debug_message("GTK2_GDK_PIXBUF_LIBRARY is ${GTK2_GDK_PIXBUF_LIBRARY}")
|
||||||
|
|
||||||
find_library(GTK2_GMODULE_LIBRARY
|
find_library(GTK2_GMODULE_LIBRARY
|
||||||
|
|
|
@ -20,7 +20,7 @@ FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c PATHS /opt/local)
|
||||||
|
|
||||||
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
SET(ICONV_FOUND TRUE)
|
SET(ICONV_FOUND TRUE)
|
||||||
ENDIF()
|
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||||
|
@ -29,7 +29,7 @@ IF(ICONV_FOUND)
|
||||||
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
|
||||||
if(ICONV_HAVE_WERROR)
|
if(ICONV_HAVE_WERROR)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
ENDIF()
|
endif(ICONV_HAVE_WERROR)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
int main(){
|
int main(){
|
||||||
|
@ -43,19 +43,19 @@ IF(ICONV_FOUND)
|
||||||
}
|
}
|
||||||
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
" ICONV_SECOND_ARGUMENT_IS_CONST )
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
|
||||||
ENDIF()
|
ENDIF(ICONV_FOUND)
|
||||||
set(CMAKE_REQUIRED_INCLUDES)
|
set(CMAKE_REQUIRED_INCLUDES)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
IF(ICONV_FOUND)
|
IF(ICONV_FOUND)
|
||||||
IF(NOT ICONV_FIND_QUIETLY)
|
IF(NOT ICONV_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT ICONV_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(ICONV_FOUND)
|
||||||
IF(Iconv_FIND_REQUIRED)
|
IF(Iconv_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
||||||
ENDIF()
|
ENDIF(Iconv_FIND_REQUIRED)
|
||||||
ENDIF()
|
ENDIF(ICONV_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
ICONV_INCLUDE_DIR
|
ICONV_INCLUDE_DIR
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(JPEG_FIND_QUIETLY TRUE)
|
SET(JPEG_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(JPEG_INCLUDE_DIR
|
FIND_PATH(JPEG_INCLUDE_DIR
|
||||||
|
@ -42,9 +42,9 @@ IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
SET(JPEG_FOUND "YES")
|
SET(JPEG_FOUND "YES")
|
||||||
IF(NOT JPEG_FIND_QUIETLY)
|
IF(NOT JPEG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
|
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT JPEG_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
IF(NOT JPEG_FIND_QUIETLY)
|
IF(NOT JPEG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
|
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
|
||||||
ENDIF()
|
ENDIF(NOT JPEG_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||||
|
|
|
@ -7,11 +7,10 @@
|
||||||
IF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
IF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LIBOVR_FIND_QUIETLY TRUE)
|
SET(LIBOVR_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(LIBOVR_INCLUDE_DIR
|
FIND_PATH(LIBOVR_INCLUDE_DIR
|
||||||
NAMES
|
OVR.h
|
||||||
OVR.h OVR_CAPI.h
|
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{LIBOVR_DIR}/Include
|
$ENV{LIBOVR_DIR}/Include
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
|
@ -25,18 +24,18 @@ FIND_PATH(LIBOVR_INCLUDE_DIR
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/x86_64")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/x86_64")
|
||||||
ELSE()
|
ELSE(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/i386")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Linux/Release/i386")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
ELSEIF(APPLE)
|
ELSEIF(APPLE)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/MacOS/Release")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/MacOS/Release")
|
||||||
ELSEIF(WIN32)
|
ELSEIF(WIN32)
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/x64")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/x64")
|
||||||
ELSE()
|
ELSE(TARGET_X64)
|
||||||
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Win32")
|
SET(LIBOVR_LIBRARY_BUILD_PATH "Lib/Win32")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
ENDIF()
|
ENDIF(UNIX)
|
||||||
|
|
||||||
FIND_LIBRARY(LIBOVR_LIBRARY
|
FIND_LIBRARY(LIBOVR_LIBRARY
|
||||||
NAMES ovr libovr
|
NAMES ovr libovr
|
||||||
|
@ -56,17 +55,17 @@ FIND_LIBRARY(LIBOVR_LIBRARY
|
||||||
IF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
IF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBOVR_FIND_QUIETLY)
|
IF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found LibOVR: ${LIBOVR_LIBRARY}")
|
MESSAGE(STATUS "Found LibOVR: ${LIBOVR_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
SET(LIBOVR_FOUND "YES")
|
SET(LIBOVR_FOUND "YES")
|
||||||
SET(LIBOVR_DEFINITIONS "-DHAVE_LIBOVR")
|
SET(LIBOVR_DEFINITIONS "-DHAVE_LIBOVR")
|
||||||
SET(NL_STEREO_AVAILABLE ON)
|
SET(NL_STEREO_AVAILABLE ON)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY} X11 Xinerama udev pthread)
|
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY} X11 Xinerama udev pthread)
|
||||||
ELSE()
|
ELSE(UNIX)
|
||||||
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY})
|
SET(LIBOVR_LIBRARIES ${LIBOVR_LIBRARY})
|
||||||
ENDIF()
|
ENDIF(UNIX)
|
||||||
ELSE()
|
ELSE(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBOVR_FIND_QUIETLY)
|
IF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find LibOVR!")
|
MESSAGE(STATUS "Warning: Unable to find LibOVR!")
|
||||||
ENDIF()
|
ENDIF(NOT LIBOVR_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(LIBOVR_LIBRARY AND LIBOVR_INCLUDE_DIR)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
IF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(LIBVR_FIND_QUIETLY TRUE)
|
SET(LIBVR_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(LIBVR_LIBRARIES AND LIBVR_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(LIBVR_INCLUDE_DIR hmd.h
|
FIND_PATH(LIBVR_INCLUDE_DIR hmd.h
|
||||||
PATH_SUFFIXES include/LibVR
|
PATH_SUFFIXES include/LibVR
|
||||||
|
@ -22,12 +22,12 @@ FIND_LIBRARY(LIBVR_LIBRARY
|
||||||
IF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
IF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBVR_FIND_QUIETLY)
|
IF(NOT LIBVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found LibVR: ${LIBVR_LIBRARY}")
|
MESSAGE(STATUS "Found LibVR: ${LIBVR_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT LIBVR_FIND_QUIETLY)
|
||||||
SET(LIBVR_FOUND "YES")
|
SET(LIBVR_FOUND "YES")
|
||||||
SET(LIBVR_DEFINITIONS "-DHAVE_LIBVR")
|
SET(LIBVR_DEFINITIONS "-DHAVE_LIBVR")
|
||||||
SET(NL_STEREO_AVAILABLE ON)
|
SET(NL_STEREO_AVAILABLE ON)
|
||||||
ELSE()
|
ELSE(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
||||||
IF(NOT LIBVR_FIND_QUIETLY)
|
IF(NOT LIBVR_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find LibVR!")
|
MESSAGE(STATUS "Warning: Unable to find LibVR!")
|
||||||
ENDIF()
|
ENDIF(NOT LIBVR_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(LIBVR_LIBRARY AND LIBVR_INCLUDE_DIR)
|
||||||
|
|
|
@ -124,7 +124,7 @@ IF(WITH_LUA51)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua51)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua51d)
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua51)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua51d)
|
||||||
|
@ -134,7 +134,7 @@ IF(WITH_LUA50)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua50)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua50d)
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua50)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua50d)
|
||||||
|
@ -143,7 +143,7 @@ ENDIF()
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport)
|
||||||
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd)
|
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlportd)
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
# generic libraries names
|
# generic libraries names
|
||||||
LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind)
|
LIST(APPEND LIBRARY_NAME_RELEASE luabind libluabind)
|
||||||
|
@ -194,8 +194,8 @@ IF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||||
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
# Case where Luabind is compiled from sources (debug version is compiled by default)
|
||||||
SET(LUABIND_FOUND TRUE)
|
SET(LUABIND_FOUND TRUE)
|
||||||
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
SET(LUABIND_LIBRARIES ${LUABIND_LIBRARY_DEBUG})
|
||||||
ENDIF()
|
ENDIF(LUABIND_LIBRARY_RELEASE AND LUABIND_LIBRARY_DEBUG)
|
||||||
ENDIF()
|
ENDIF(LUABIND_INCLUDE_DIR AND Boost_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(LUABIND_FOUND)
|
IF(LUABIND_FOUND)
|
||||||
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
SET(LUABIND_INCLUDE_DIR ${LUABIND_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||||
|
@ -203,17 +203,17 @@ IF(LUABIND_FOUND)
|
||||||
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
FIND_FILE(LUABIND_VERSION_FILE luabind/version.hpp PATHS ${LUABIND_INCLUDE_DIR})
|
||||||
IF(LUABIND_VERSION_FILE)
|
IF(LUABIND_VERSION_FILE)
|
||||||
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
SET(LUABIND_DEFINITIONS "-DHAVE_LUABIND_VERSION")
|
||||||
ENDIF()
|
ENDIF(LUABIND_VERSION_FILE)
|
||||||
|
|
||||||
FIND_CORRECT_LUA_VERSION()
|
FIND_CORRECT_LUA_VERSION()
|
||||||
|
|
||||||
IF(NOT Luabind_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(LUABIND_FOUND)
|
||||||
IF(NOT Luabind_FIND_QUIETLY)
|
IF(NOT Luabind_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||||
ENDIF()
|
ENDIF(NOT Luabind_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(LUABIND_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG Boost_LIB_DIAGNOSTIC_DEFINITIONS)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(OGG_FIND_QUIETLY TRUE)
|
SET(OGG_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(OGG_INCLUDE_DIR
|
FIND_PATH(OGG_INCLUDE_DIR
|
||||||
|
@ -41,9 +41,9 @@ IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
SET(OGG_FOUND "YES")
|
SET(OGG_FOUND "YES")
|
||||||
IF(NOT OGG_FIND_QUIETLY)
|
IF(NOT OGG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
|
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT OGG_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
IF(NOT OGG_FIND_QUIETLY)
|
IF(NOT OGG_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Ogg!")
|
MESSAGE(STATUS "Warning: Unable to find Ogg!")
|
||||||
ENDIF()
|
ENDIF(NOT OGG_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
|
||||||
|
|
|
@ -43,7 +43,7 @@ IF(OPENGLES_GLES_LIBRARY)
|
||||||
IF(OPENGLES_EGL_LIBRARY)
|
IF(OPENGLES_EGL_LIBRARY)
|
||||||
SET(OPENGLES_EGL_FOUND "YES")
|
SET(OPENGLES_EGL_FOUND "YES")
|
||||||
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
|
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
|
||||||
ELSE()
|
ELSE(OPENGLES_EGL_LIBRARY)
|
||||||
SET(OPENGLES_EGL_FOUND "NO")
|
SET(OPENGLES_EGL_FOUND "NO")
|
||||||
ENDIF()
|
ENDIF(OPENGLES_EGL_LIBRARY)
|
||||||
ENDIF()
|
ENDIF(OPENGLES_GLES_LIBRARY)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
IF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
IF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(STLPORT_FIND_QUIETLY TRUE)
|
SET(STLPORT_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(STLPORT_LIBRARIES AND STLPORT_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(STLPORT_INCLUDE_DIR
|
FIND_PATH(STLPORT_INCLUDE_DIR
|
||||||
iostream
|
iostream
|
||||||
|
@ -74,18 +74,18 @@ IF(STLPORT_INCLUDE_DIR)
|
||||||
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
SET(STLPORT_LIBRARIES ${STLPORT_LIBRARY_RELEASE})
|
||||||
IF(STLPORT_LIBRARY_DEBUG)
|
IF(STLPORT_LIBRARY_DEBUG)
|
||||||
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
SET(STLPORT_LIBRARIES optimized ${STLPORT_LIBRARIES} debug ${STLPORT_LIBRARY_DEBUG})
|
||||||
ENDIF()
|
ENDIF(STLPORT_LIBRARY_DEBUG)
|
||||||
ENDIF()
|
ENDIF(STLPORT_LIBRARY_RELEASE)
|
||||||
ENDIF()
|
ENDIF(STLPORT_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(STLPORT_FOUND)
|
IF(STLPORT_FOUND)
|
||||||
IF(NOT STLPORT_FIND_QUIETLY)
|
IF(NOT STLPORT_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found STLport: ${STLPORT_LIBRARIES}")
|
MESSAGE(STATUS "Found STLport: ${STLPORT_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT STLPORT_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(STLPORT_FOUND)
|
||||||
IF(NOT STLPORT_FIND_QUIETLY)
|
IF(NOT STLPORT_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find STLport!")
|
MESSAGE(STATUS "Warning: Unable to find STLport!")
|
||||||
ENDIF()
|
ENDIF(NOT STLPORT_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(STLPORT_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(STLPORT_LIBRARY_RELEASE STLPORT_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(STLPORT_LIBRARY_RELEASE STLPORT_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
IF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(SQUISH_FIND_QUIETLY TRUE)
|
SET(SQUISH_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(SQUISH_LIBRARIES AND SQUISH_INCLUDE_DIR)
|
||||||
|
|
||||||
FIND_PATH(SQUISH_INCLUDE_DIR
|
FIND_PATH(SQUISH_INCLUDE_DIR
|
||||||
squish.h
|
squish.h
|
||||||
|
@ -58,26 +58,26 @@ IF(SQUISH_INCLUDE_DIR)
|
||||||
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
|
SET(SQUISH_LIBRARIES "optimized;${SQUISH_LIBRARY_RELEASE}")
|
||||||
IF(SQUISH_LIBRARY_DEBUG)
|
IF(SQUISH_LIBRARY_DEBUG)
|
||||||
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
|
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_DEBUG}")
|
||||||
ELSE()
|
ELSE(SQUISH_LIBRARY_DEBUG)
|
||||||
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}")
|
SET(SQUISH_LIBRARIES "${SQUISH_LIBRARIES};debug;${SQUISH_LIBRARY_RELEASE}")
|
||||||
MESSAGE("Debug Squish NOT found, using the release version!")
|
MESSAGE("Debug Squish NOT found, using the release version!")
|
||||||
ENDIF()
|
ENDIF(SQUISH_LIBRARY_DEBUG)
|
||||||
ENDIF()
|
ENDIF(SQUISH_LIBRARY_RELEASE)
|
||||||
ENDIF()
|
ENDIF(SQUISH_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(SQUISH_FOUND)
|
IF(SQUISH_FOUND)
|
||||||
IF(NOT SQUISH_FIND_QUIETLY)
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
|
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARIES}")
|
||||||
ENDIF()
|
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||||
FILE(STRINGS ${SQUISH_INCLUDE_DIR}/squish.h METRIC REGEX "metric = 0")
|
FILE(STRINGS ${SQUISH_INCLUDE_DIR}/squish.h METRIC REGEX "metric = 0")
|
||||||
IF(METRIC)
|
IF(METRIC)
|
||||||
SET(SQUISH_COMPRESS_HAS_METRIC ON)
|
SET(SQUISH_COMPRESS_HAS_METRIC ON)
|
||||||
SET(SQUISH_DEFINITIONS -DSQUISH_COMPRESS_HAS_METRIC)
|
SET(SQUISH_DEFINITIONS -DSQUISH_COMPRESS_HAS_METRIC)
|
||||||
ENDIF()
|
ENDIF(METRIC)
|
||||||
ELSE()
|
ELSE(SQUISH_FOUND)
|
||||||
IF(NOT SQUISH_FIND_QUIETLY)
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
||||||
ENDIF()
|
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(SQUISH_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)
|
MARK_AS_ADVANCED(SQUISH_LIBRARY_RELEASE SQUISH_LIBRARY_DEBUG)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
IF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(VORBIS_FIND_QUIETLY TRUE)
|
SET(VORBIS_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(VORBIS_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(VORBIS_INCLUDE_DIR
|
FIND_PATH(VORBIS_INCLUDE_DIR
|
||||||
|
@ -57,9 +57,9 @@ IF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
|
SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
|
||||||
IF(NOT VORBIS_FIND_QUIETLY)
|
IF(NOT VORBIS_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
|
MESSAGE(STATUS "Found Vorbis: ${VORBIS_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT VORBIS_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
IF(NOT VORBIS_FIND_QUIETLY)
|
IF(NOT VORBIS_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
|
MESSAGE(STATUS "Warning: Unable to find Vorbis!")
|
||||||
ENDIF()
|
ENDIF(NOT VORBIS_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBIS_INCLUDE_DIR)
|
||||||
|
|
|
@ -366,34 +366,19 @@ FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(WINSDK_UCRT_DIR)
|
IF(WINSDK_UCRT_DIR)
|
||||||
# determine exact UCRT version
|
# directory where UCRT headers are found
|
||||||
SET(WINSDK_UCRT_INCLUDE_ROOT_DIR ${WINSDK_UCRT_DIR}/Include)
|
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
||||||
SET(WINSDK_UCRT_LIB_ROOT_DIR ${WINSDK_UCRT_DIR}/Lib)
|
HINTS
|
||||||
|
${WINSDK_UCRT_DIR}/Include/10.0.10056.0/ucrt
|
||||||
|
${WINSDK_UCRT_DIR}/Include/10.0.10150.0/ucrt
|
||||||
|
)
|
||||||
|
|
||||||
FILE(GLOB UCRT_SUBDIRS RELATIVE ${WINSDK_UCRT_INCLUDE_ROOT_DIR} ${WINSDK_UCRT_INCLUDE_ROOT_DIR}/*)
|
# directory where UCRT libraries are found
|
||||||
SET(UCRT_VERSION)
|
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
||||||
|
HINTS
|
||||||
FOREACH(UCRT_SUBDIR ${UCRT_SUBDIRS})
|
${WINSDK_UCRT_DIR}/Lib/10.0.10056.0/ucrt/${WINSDK8_SUFFIX}
|
||||||
IF(NOT UCRT_VERSION OR UCRT_SUBDIR VERSION_GREATER UCRT_VERSION)
|
${WINSDK_UCRT_DIR}/Lib/10.0.10150.0/ucrt/${WINSDK8_SUFFIX}
|
||||||
SET(UCRT_VERSION ${UCRT_SUBDIR})
|
)
|
||||||
ENDIF()
|
|
||||||
ENDFOREACH()
|
|
||||||
|
|
||||||
IF(UCRT_VERSION)
|
|
||||||
MESSAGE(STATUS "Using Windows UCRT ${UCRT_VERSION}")
|
|
||||||
|
|
||||||
# directory where UCRT headers are found
|
|
||||||
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
|
||||||
HINTS
|
|
||||||
${WINSDK_UCRT_INCLUDE_ROOT_DIR}/${UCRT_VERSION}/ucrt
|
|
||||||
)
|
|
||||||
|
|
||||||
# directory where UCRT libraries are found
|
|
||||||
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
|
||||||
HINTS
|
|
||||||
${WINSDK_UCRT_LIB_ROOT_DIR}/${UCRT_VERSION}/ucrt/${WINSDK8_SUFFIX}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# signtool is used to sign executables
|
# signtool is used to sign executables
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
# in cache already
|
# in cache already
|
||||||
SET(XF86VidMode_FIND_QUIETLY TRUE)
|
SET(XF86VidMode_FIND_QUIETLY TRUE)
|
||||||
ENDIF()
|
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(XF86VidMode_INCLUDE_DIR
|
FIND_PATH(XF86VidMode_INCLUDE_DIR
|
||||||
|
@ -37,10 +37,10 @@ IF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
SET(XF86VidMode_DEFINITIONS -DXF86VIDMODE)
|
SET(XF86VidMode_DEFINITIONS -DXF86VIDMODE)
|
||||||
IF(NOT XF86VidMode_FIND_QUIETLY)
|
IF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
|
MESSAGE(STATUS "Found XF86VidMode: ${XF86VidMode_LIBRARY}")
|
||||||
ENDIF()
|
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
ELSE()
|
ELSE(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
IF(NOT XF86VidMode_FIND_QUIETLY)
|
IF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
|
MESSAGE(STATUS "Warning: Unable to find XF86VidMode!")
|
||||||
ENDIF()
|
ENDIF(NOT XF86VidMode_FIND_QUIETLY)
|
||||||
ENDIF()
|
ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
|
@ -33,29 +33,17 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
SET(PCH_ARCHS)
|
SET(PCH_ARCHS)
|
||||||
|
|
||||||
SET(_FLAGS)
|
SET(_FLAGS)
|
||||||
|
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
|
||||||
|
|
||||||
# C++ flags
|
|
||||||
SET(_FLAG ${CMAKE_CXX_FLAGS})
|
|
||||||
SEPARATE_ARGUMENTS(_FLAG)
|
|
||||||
|
|
||||||
LIST(APPEND _FLAGS ${_FLAG})
|
|
||||||
|
|
||||||
# C++ config flags
|
|
||||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
|
||||||
|
LIST(APPEND _FLAGS " ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}}")
|
||||||
SET(_FLAG ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}})
|
|
||||||
SEPARATE_ARGUMENTS(_FLAG)
|
|
||||||
|
|
||||||
LIST(APPEND _FLAGS ${_FLAG})
|
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
|
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
|
||||||
|
|
||||||
SET(_USE_PIC OFF)
|
SET(_USE_PIC OFF)
|
||||||
|
|
||||||
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
|
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
|
||||||
SET(_FLAG ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
|
LIST(APPEND _FLAGS " ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
|
||||||
SEPARATE_ARGUMENTS(_FLAG)
|
|
||||||
LIST(APPEND _FLAGS ${_FLAG})
|
|
||||||
ELSE()
|
ELSE()
|
||||||
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
|
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
|
||||||
IF(_pic)
|
IF(_pic)
|
||||||
|
@ -65,71 +53,67 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
|
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND _FLAGS -I"${item}")
|
LIST(APPEND _FLAGS " -I\"${item}\"")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
# NOTE: As cmake files (eg FindQT4) may now use generator expressions around their defines that evaluate
|
|
||||||
# to an empty string, wrap all "items" in an expression that outputs a -D IFF the generated
|
|
||||||
# expression is not empty.
|
|
||||||
|
|
||||||
# Required for CMake 2.6
|
# Required for CMake 2.6
|
||||||
SET(GLOBAL_DEFINITIONS)
|
SET(GLOBAL_DEFINITIONS)
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
|
GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
|
||||||
IF(oldProps)
|
IF(oldProps)
|
||||||
LIST(APPEND _FLAGS ${oldProps})
|
LIST(APPEND _FLAGS " ${oldProps}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
|
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
|
||||||
IF(oldPropsBuild)
|
IF(oldPropsBuild)
|
||||||
LIST(APPEND _FLAGS ${oldPropsBuild})
|
LIST(APPEND _FLAGS " ${oldPropsBuild}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
|
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
|
||||||
IF(DIRINC)
|
IF(DIRINC)
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND _FLAGS -I"${item}")
|
LIST(APPEND _FLAGS " -I\"${item}\"")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
|
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||||
IF(DEFINITIONS)
|
IF(DEFINITIONS)
|
||||||
FOREACH(item ${DEFINITIONS})
|
FOREACH(item ${DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -142,7 +126,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
IF(_DIRS)
|
IF(_DIRS)
|
||||||
FOREACH(item ${_DIRS})
|
FOREACH(item ${_DIRS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS -I"${item}")
|
LIST(APPEND GLOBAL_DEFINITIONS " -I\"${item}\"")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -151,7 +135,10 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
|
|
||||||
IF(_DEFINITIONS)
|
IF(_DEFINITIONS)
|
||||||
FOREACH(item ${_DEFINITIONS})
|
FOREACH(item ${_DEFINITIONS})
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
# don't use dynamic expressions
|
||||||
|
IF(NOT item MATCHES "\\$<")
|
||||||
|
LIST(APPEND GLOBAL_DEFINITIONS " -D${item}")
|
||||||
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -162,7 +149,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
|
IF(GLOBAL_DEFINITIONS MATCHES "QT_CORE_LIB")
|
||||||
# Hack to define missing QT_NO_DEBUG with Qt 5.2
|
# Hack to define missing QT_NO_DEBUG with Qt 5.2
|
||||||
IF(_UPPER_BUILD STREQUAL "RELEASE")
|
IF(_UPPER_BUILD STREQUAL "RELEASE")
|
||||||
LIST(APPEND GLOBAL_DEFINITIONS "-DQT_NO_DEBUG")
|
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
|
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
|
||||||
|
@ -171,26 +158,28 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(_USE_PIC)
|
IF(_USE_PIC)
|
||||||
LIST(APPEND _FLAGS ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
|
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
LIST(APPEND _FLAGS " ${GLOBAL_DEFINITIONS}")
|
||||||
|
|
||||||
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
IF(CMAKE_VERSION VERSION_LESS "3.3.0")
|
||||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
||||||
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
||||||
LIST(APPEND _FLAGS ${_directory_flags})
|
LIST(APPEND _FLAGS " ${_directory_flags}")
|
||||||
LIST(APPEND _FLAGS ${_directory_definitions})
|
LIST(APPEND _FLAGS " ${_directory_definitions}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Format definitions
|
# Format definitions
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# Fix path with space
|
# Fix path with space
|
||||||
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
|
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
|
||||||
|
ELSE()
|
||||||
|
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
|
||||||
|
SEPARATE_ARGUMENTS(_FLAGS)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Already in list form and items may contain non-leading spaces that should not be split on
|
|
||||||
LIST(INSERT _FLAGS 0 "${GLOBAL_DEFINITIONS}")
|
|
||||||
|
|
||||||
IF(CLANG)
|
IF(CLANG)
|
||||||
# Determining all architectures and get common flags
|
# Determining all architectures and get common flags
|
||||||
SET(_ARCH_NEXT)
|
SET(_ARCH_NEXT)
|
||||||
|
@ -247,7 +236,6 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(PCH_FLAGS)
|
IF(PCH_FLAGS)
|
||||||
LIST(REMOVE_ITEM PCH_FLAGS "")
|
|
||||||
LIST(REMOVE_DUPLICATES PCH_FLAGS)
|
LIST(REMOVE_DUPLICATES PCH_FLAGS)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
@ -259,16 +247,16 @@ MACRO(GET_PDB_FILENAME _out_filename _target)
|
||||||
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
|
ELSEIF(${_targetType} STREQUAL STATIC_LIBRARY)
|
||||||
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
|
||||||
ELSE()
|
ELSE(${_targetType} STREQUAL EXECUTABLE)
|
||||||
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
SET(_targetOutput ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||||
ENDIF()
|
ENDIF(${_targetType} STREQUAL EXECUTABLE)
|
||||||
|
|
||||||
# determine target postfix
|
# determine target postfix
|
||||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}_POSTFIX" _postfix_var_name)
|
STRING(TOUPPER "${CMAKE_BUILD_TYPE}_POSTFIX" _postfix_var_name)
|
||||||
GET_TARGET_PROPERTY(_targetPostfix ${_target} ${_postfix_var_name})
|
GET_TARGET_PROPERTY(_targetPostfix ${_target} ${_postfix_var_name})
|
||||||
IF(${_targetPostfix} MATCHES NOTFOUND)
|
IF(${_targetPostfix} MATCHES NOTFOUND)
|
||||||
SET(_targetPostfix "")
|
SET(_targetPostfix "")
|
||||||
ENDIF()
|
ENDIF(${_targetPostfix} MATCHES NOTFOUND)
|
||||||
|
|
||||||
SET(${_out_filename} "${_targetOutput}/${_target}${_targetPostfix}.pdb")
|
SET(${_out_filename} "${_targetOutput}/${_target}${_targetPostfix}.pdb")
|
||||||
ENDMACRO(GET_PDB_FILENAME)
|
ENDMACRO(GET_PDB_FILENAME)
|
||||||
|
|
|
@ -177,26 +177,26 @@ ENDIF()
|
||||||
# set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv7,armv7s and appears to be XCode's standard.
|
# set the architecture for iOS - using ARCHS_STANDARD_32_BIT sets armv7,armv7s and appears to be XCode's standard.
|
||||||
# The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only
|
# The other value that works is ARCHS_UNIVERSAL_IPHONE_OS but that sets armv7 only
|
||||||
IF(ARCHS)
|
IF(ARCHS)
|
||||||
SET(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE STRING "Build architecture for iOS")
|
SET(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE string "Build architecture for iOS")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Set the find root to the iOS developer roots and to user defined paths
|
# Set the find root to the iOS developer roots and to user defined paths
|
||||||
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} ${CMAKE_SOURCE_DIR}/external $ENV{EXTERNAL_IOS_PATH} CACHE STRING "iOS find search path root")
|
set (CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_IOS_SDK_ROOT} ${CMAKE_PREFIX_PATH} ${CMAKE_INSTALL_PREFIX} $ENV{EXTERNAL_IOS_PATH} CACHE string "iOS find search path root")
|
||||||
|
|
||||||
# default to searching for frameworks first
|
# default to searching for frameworks first
|
||||||
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
set (CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
|
|
||||||
# set up the default search directories for frameworks
|
# set up the default search directories for frameworks
|
||||||
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
set (CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
|
||||||
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
|
||||||
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
|
||||||
)
|
)
|
||||||
|
|
||||||
# only search the iOS sdks, not the remainder of the host filesystem
|
# only search the iOS sdks, not the remainder of the host filesystem
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
# determinate location for bin utils based on CMAKE_FIND_ROOT_PATH
|
# determinate location for bin utils based on CMAKE_FIND_ROOT_PATH
|
||||||
include(CMakeFindBinUtils)
|
include(CMakeFindBinUtils)
|
||||||
|
|
|
@ -4,7 +4,7 @@ SET(CMAKE_TRY_COMPILE_CONFIGURATION "Release")
|
||||||
# Force Release configuration by default
|
# Force Release configuration by default
|
||||||
IF(NOT CMAKE_BUILD_TYPE)
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
||||||
ENDIF()
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
# Declare CMAKE_CONFIGURATION_TYPES before PROJECT
|
# Declare CMAKE_CONFIGURATION_TYPES before PROJECT
|
||||||
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||||
|
@ -17,7 +17,7 @@ MACRO(NL_GEN_PC name)
|
||||||
IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
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 ${NL_LIB_PREFIX}/pkgconfig)
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION ${NL_LIB_PREFIX}/pkgconfig)
|
||||||
ENDIF()
|
ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
||||||
ENDMACRO(NL_GEN_PC)
|
ENDMACRO(NL_GEN_PC)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -26,9 +26,9 @@ ENDMACRO(NL_GEN_PC)
|
||||||
MACRO(NL_TARGET_LIB name)
|
MACRO(NL_TARGET_LIB name)
|
||||||
IF(WITH_STATIC)
|
IF(WITH_STATIC)
|
||||||
ADD_LIBRARY(${name} STATIC ${ARGN})
|
ADD_LIBRARY(${name} STATIC ${ARGN})
|
||||||
ELSE()
|
ELSE(WITH_STATIC)
|
||||||
ADD_LIBRARY(${name} SHARED ${ARGN})
|
ADD_LIBRARY(${name} SHARED ${ARGN})
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC)
|
||||||
ENDMACRO(NL_TARGET_LIB)
|
ENDMACRO(NL_TARGET_LIB)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -37,9 +37,9 @@ ENDMACRO(NL_TARGET_LIB)
|
||||||
MACRO(NL_TARGET_DRIVER name)
|
MACRO(NL_TARGET_DRIVER name)
|
||||||
IF(WITH_STATIC_DRIVERS)
|
IF(WITH_STATIC_DRIVERS)
|
||||||
ADD_LIBRARY(${name} STATIC ${ARGN})
|
ADD_LIBRARY(${name} STATIC ${ARGN})
|
||||||
ELSE()
|
ELSE(WITH_STATIC_DRIVERS)
|
||||||
ADD_LIBRARY(${name} MODULE ${ARGN})
|
ADD_LIBRARY(${name} MODULE ${ARGN})
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_DRIVERS)
|
||||||
ENDMACRO(NL_TARGET_DRIVER)
|
ENDMACRO(NL_TARGET_DRIVER)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -64,35 +64,16 @@ MACRO(NL_DEFAULT_PROPS name label)
|
||||||
VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR})
|
VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR})
|
||||||
IF(NL_LIB_PREFIX)
|
IF(NL_LIB_PREFIX)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
SET_TARGET_PROPERTIES(${name} PROPERTIES INSTALL_NAME_DIR ${NL_LIB_PREFIX})
|
||||||
ENDIF()
|
ENDIF(NL_LIB_PREFIX)
|
||||||
ENDIF()
|
ENDIF(${type} STREQUAL SHARED_LIBRARY)
|
||||||
|
|
||||||
IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
||||||
# check if using a GUI
|
|
||||||
GET_TARGET_PROPERTY(_VALUE ${name} WIN32_EXECUTABLE)
|
|
||||||
|
|
||||||
IF(TARGET_X64)
|
|
||||||
# Target Windows XP 64 bits
|
|
||||||
SET(_SUBSYSTEM_VERSION "5.02")
|
|
||||||
ELSE()
|
|
||||||
# Target Windows XP
|
|
||||||
SET(_SUBSYSTEM_VERSION "5.01")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(_VALUE)
|
|
||||||
# GUI
|
|
||||||
SET(_SUBSYSTEM "WINDOWS")
|
|
||||||
ELSE()
|
|
||||||
# Console
|
|
||||||
SET(_SUBSYSTEM "CONSOLE")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||||
VERSION ${NL_VERSION}
|
VERSION ${NL_VERSION}
|
||||||
SOVERSION ${NL_VERSION_MAJOR}
|
SOVERSION ${NL_VERSION_MAJOR}
|
||||||
COMPILE_FLAGS "/GA"
|
COMPILE_FLAGS "/GA"
|
||||||
LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR} /SUBSYSTEM:${_SUBSYSTEM},${_SUBSYSTEM_VERSION}")
|
LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}")
|
||||||
ENDIF()
|
ENDIF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
|
||||||
ENDMACRO(NL_DEFAULT_PROPS)
|
ENDMACRO(NL_DEFAULT_PROPS)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -102,7 +83,7 @@ ENDMACRO(NL_DEFAULT_PROPS)
|
||||||
MACRO(NL_ADD_LIB_SUFFIX name)
|
MACRO(NL_ADD_LIB_SUFFIX name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
SET_TARGET_PROPERTIES(${name} PROPERTIES DEBUG_POSTFIX "_d" RELEASE_POSTFIX "_r")
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
ENDMACRO(NL_ADD_LIB_SUFFIX)
|
ENDMACRO(NL_ADD_LIB_SUFFIX)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -114,10 +95,10 @@ MACRO(NL_ADD_RUNTIME_FLAGS name)
|
||||||
# SET_TARGET_PROPERTIES(${name} PROPERTIES
|
# SET_TARGET_PROPERTIES(${name} PROPERTIES
|
||||||
# LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
# LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG}"
|
||||||
# LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
|
# LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE}")
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
TARGET_LINK_LIBRARIES(${name} ${STLPORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
TARGET_LINK_LIBRARIES(${name} ${STLPORT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
ENDMACRO(NL_ADD_RUNTIME_FLAGS)
|
||||||
|
|
||||||
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||||
|
@ -125,25 +106,25 @@ MACRO(NL_ADD_STATIC_VID_DRIVERS name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DIRECT3D)
|
IF(WITH_DRIVER_DIRECT3D)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d_win)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_DIRECT3D)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGL)
|
IF(WITH_DRIVER_OPENGL)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl_win)
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENGL)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGLES)
|
IF(WITH_DRIVER_OPENGLES)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles_win)
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENGLES)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_DRIVERS)
|
||||||
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
|
||||||
|
|
||||||
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||||
|
@ -151,30 +132,30 @@ MACRO(NL_ADD_STATIC_SND_DRIVERS name)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DSOUND)
|
IF(WITH_DRIVER_DSOUND)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound_win)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_DSOUND)
|
||||||
|
|
||||||
IF(WITH_DRIVER_XAUDIO2)
|
IF(WITH_DRIVER_XAUDIO2)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2_win)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_XAUDIO2)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_openal_win)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENAL)
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod_win)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod_win)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_FMOD)
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_openal)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENAL)
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_FMOD)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_DRIVERS)
|
||||||
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
|
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -192,14 +173,14 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.:
|
||||||
cd cmake
|
cd cmake
|
||||||
cmake ..
|
cmake ..
|
||||||
")
|
")
|
||||||
ENDIF()
|
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
||||||
|
|
||||||
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
IF(WITH_QT)
|
IF(WITH_QT)
|
||||||
OPTION(WITH_STUDIO "Build Core Studio" OFF )
|
OPTION(WITH_STUDIO "Build Core Studio" OFF )
|
||||||
ENDIF()
|
ENDIF(WITH_QT)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Features
|
# Features
|
||||||
|
@ -213,30 +194,30 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
# Default to static building on Windows.
|
# Default to static building on Windows.
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(WITH_STATIC "With static libraries." ON )
|
OPTION(WITH_STATIC "With static libraries." ON )
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
OPTION(WITH_STATIC "With static libraries." OFF)
|
OPTION(WITH_STATIC "With static libraries." OFF)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
IF (WITH_STATIC)
|
IF (WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" ON )
|
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" ON )
|
||||||
ELSE()
|
ELSE(WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF)
|
OPTION(WITH_STATIC_LIBXML2 "With static libxml2" OFF)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC)
|
||||||
IF (WITH_STATIC)
|
IF (WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_CURL "With static curl" ON )
|
OPTION(WITH_STATIC_CURL "With static curl" ON )
|
||||||
ELSE()
|
ELSE(WITH_STATIC)
|
||||||
OPTION(WITH_STATIC_CURL "With static curl" OFF)
|
OPTION(WITH_STATIC_CURL "With static curl" OFF)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON )
|
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" ON )
|
||||||
ELSE()
|
ELSE(APPLE)
|
||||||
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF)
|
OPTION(WITH_LIBXML2_ICONV "With libxml2 using iconv" OFF)
|
||||||
ENDIF()
|
ENDIF(APPLE)
|
||||||
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(WITH_EXTERNAL "With provided external." ON )
|
OPTION(WITH_EXTERNAL "With provided external." ON )
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
OPTION(WITH_EXTERNAL "With provided external." OFF)
|
OPTION(WITH_EXTERNAL "With provided external." OFF)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
|
||||||
IF(UNIX AND NOT APPLE)
|
IF(UNIX AND NOT APPLE)
|
||||||
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
|
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
|
||||||
|
@ -256,21 +237,20 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
IF(WIN32 AND MFC_FOUND)
|
IF(WIN32 AND MFC_FOUND)
|
||||||
OPTION(WITH_MFC "With MFC Support" ON )
|
OPTION(WITH_MFC "With MFC Support" ON )
|
||||||
ELSE()
|
ELSE(WIN32 AND MFC_FOUND)
|
||||||
OPTION(WITH_MFC "With MFC Support" OFF)
|
OPTION(WITH_MFC "With MFC Support" OFF)
|
||||||
ENDIF()
|
ENDIF(WIN32 AND MFC_FOUND)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Optional support
|
# Optional support
|
||||||
###
|
###
|
||||||
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
||||||
|
|
||||||
# only enable STLport for VC++ 2010 and less
|
IF(WIN32)
|
||||||
IF(WIN32 AND MSVC_VERSION LESS 1600)
|
|
||||||
OPTION(WITH_STLPORT "With STLport support." ON )
|
OPTION(WITH_STLPORT "With STLport support." ON )
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
OPTION(WITH_STLPORT "With STLport support." OFF)
|
OPTION(WITH_STLPORT "With STLport support." OFF)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
|
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
|
||||||
|
|
||||||
|
@ -323,7 +303,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
IF(NOT MSVC)
|
IF(NOT MSVC)
|
||||||
OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF)
|
OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF)
|
||||||
ENDIF()
|
ENDIF(NOT MSVC)
|
||||||
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS)
|
||||||
|
@ -341,7 +321,7 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_RYZOM_CLIENT "Build Ryzom Core Client" ON )
|
OPTION(WITH_RYZOM_CLIENT "Build Ryzom Core Client" ON )
|
||||||
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
|
OPTION(WITH_RYZOM_TOOLS "Build Ryzom Core Tools" ON )
|
||||||
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
|
OPTION(WITH_RYZOM_SERVER "Build Ryzom Core Services" ON )
|
||||||
OPTION(WITH_RYZOM_INSTALLER "Build Ryzom Installer" OFF)
|
OPTION(WITH_RYZOM_SOUND "Enable Ryzom Core Sound" ON )
|
||||||
|
|
||||||
###
|
###
|
||||||
# Optional support
|
# Optional support
|
||||||
|
@ -353,7 +333,6 @@ MACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
|
OPTION(WITH_RYZOM_PATCH "Enable Ryzom in-game patch support" OFF)
|
||||||
OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF)
|
OPTION(WITH_RYZOM_CUSTOM_PATCH_SERVER "Only use patch server from CFG file" OFF)
|
||||||
OPTION(WITH_RYZOM_STEAM "Enable Steam features" OFF)
|
OPTION(WITH_RYZOM_STEAM "Enable Steam features" OFF)
|
||||||
OPTION(WITH_RYZOM_SANDBOX "Enable Sandbox under OS X" OFF)
|
|
||||||
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
ENDMACRO(NL_SETUP_RYZOM_DEFAULT_OPTIONS)
|
||||||
|
|
||||||
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
|
MACRO(NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS)
|
||||||
|
@ -380,15 +359,15 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
SET(NL_BUILD_MODE "NL_DEBUG")
|
SET(NL_BUILD_MODE "NL_DEBUG")
|
||||||
ELSE()
|
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||||
ELSE()
|
ELSE(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||||
# enforce release mode if it's neither Debug nor Release
|
# enforce release mode if it's neither Debug nor Release
|
||||||
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
|
||||||
ENDIF()
|
ENDIF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
ENDIF()
|
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
|
||||||
SET(HOST_CPU ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
SET(HOST_CPU ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||||
|
|
||||||
|
@ -396,35 +375,35 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(HOST_CPU "x86_64")
|
SET(HOST_CPU "x86_64")
|
||||||
ELSEIF(HOST_CPU MATCHES "i.86")
|
ELSEIF(HOST_CPU MATCHES "i.86")
|
||||||
SET(HOST_CPU "x86")
|
SET(HOST_CPU "x86")
|
||||||
ENDIF()
|
ENDIF(HOST_CPU MATCHES "(amd|AMD)64")
|
||||||
|
|
||||||
# Determine target CPU
|
# Determine target CPU
|
||||||
|
|
||||||
# If not specified, use the same CPU as host
|
# If not specified, use the same CPU as host
|
||||||
IF(NOT TARGET_CPU)
|
IF(NOT TARGET_CPU)
|
||||||
SET(TARGET_CPU ${CMAKE_SYSTEM_PROCESSOR})
|
SET(TARGET_CPU ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
ENDIF()
|
ENDIF(NOT TARGET_CPU)
|
||||||
|
|
||||||
IF(TARGET_CPU MATCHES "(amd|AMD)64")
|
IF(TARGET_CPU MATCHES "(amd|AMD)64")
|
||||||
SET(TARGET_CPU "x86_64")
|
SET(TARGET_CPU "x86_64")
|
||||||
ELSEIF(TARGET_CPU MATCHES "i.86")
|
ELSEIF(TARGET_CPU MATCHES "i.86")
|
||||||
SET(TARGET_CPU "x86")
|
SET(TARGET_CPU "x86")
|
||||||
ENDIF()
|
ENDIF(TARGET_CPU MATCHES "(amd|AMD)64")
|
||||||
|
|
||||||
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
SET(CLANG ON)
|
SET(CLANG ON)
|
||||||
MESSAGE(STATUS "Using Clang compiler")
|
MESSAGE(STATUS "Using Clang compiler")
|
||||||
ENDIF()
|
ENDIF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Xcode")
|
IF(CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
SET(XCODE ON)
|
SET(XCODE ON)
|
||||||
MESSAGE(STATUS "Generating Xcode project")
|
MESSAGE(STATUS "Generating Xcode project")
|
||||||
ENDIF()
|
ENDIF(CMAKE_GENERATOR MATCHES "Xcode")
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "NMake")
|
IF(CMAKE_GENERATOR MATCHES "NMake")
|
||||||
SET(NMAKE ON)
|
SET(NMAKE ON)
|
||||||
MESSAGE(STATUS "Generating NMake project")
|
MESSAGE(STATUS "Generating NMake project")
|
||||||
ENDIF()
|
ENDIF(CMAKE_GENERATOR MATCHES "NMake")
|
||||||
|
|
||||||
# If target and host CPU are the same
|
# If target and host CPU are the same
|
||||||
IF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
IF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
||||||
|
@ -433,24 +412,24 @@ MACRO(NL_SETUP_BUILD)
|
||||||
IF(NOT CMAKE_SIZEOF_VOID_P)
|
IF(NOT CMAKE_SIZEOF_VOID_P)
|
||||||
INCLUDE (CheckTypeSize)
|
INCLUDE (CheckTypeSize)
|
||||||
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
|
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
|
||||||
ENDIF()
|
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
|
||||||
|
|
||||||
# Using 32 or 64 bits libraries
|
# Using 32 or 64 bits libraries
|
||||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(TARGET_CPU "x86_64")
|
SET(TARGET_CPU "x86_64")
|
||||||
ELSE()
|
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(TARGET_CPU "x86")
|
SET(TARGET_CPU "x86")
|
||||||
ENDIF()
|
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
ELSEIF(HOST_CPU MATCHES "arm")
|
ELSEIF(HOST_CPU MATCHES "arm")
|
||||||
SET(TARGET_CPU "arm")
|
SET(TARGET_CPU "arm")
|
||||||
ELSE()
|
ELSE(HOST_CPU MATCHES "x86")
|
||||||
SET(TARGET_CPU "unknown")
|
SET(TARGET_CPU "unknown")
|
||||||
MESSAGE(STATUS "Unknown architecture: ${HOST_CPU}")
|
MESSAGE(STATUS "Unknown architecture: ${HOST_CPU}")
|
||||||
ENDIF()
|
ENDIF(HOST_CPU MATCHES "x86")
|
||||||
# TODO: add checks for PPC
|
# TODO: add checks for PPC
|
||||||
ELSE()
|
ELSE("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
||||||
MESSAGE(STATUS "Compiling on ${HOST_CPU} for ${TARGET_CPU}")
|
MESSAGE(STATUS "Compiling on ${HOST_CPU} for ${TARGET_CPU}")
|
||||||
ENDIF()
|
ENDIF("${HOST_CPU}" STREQUAL "${TARGET_CPU}" AND NOT CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
# Use values from environment variables
|
# Use values from environment variables
|
||||||
SET(PLATFORM_CFLAGS "$ENV{CFLAGS} $ENV{CPPFLAGS} ${PLATFORM_CFLAGS}")
|
SET(PLATFORM_CFLAGS "$ENV{CFLAGS} $ENV{CPPFLAGS} ${PLATFORM_CFLAGS}")
|
||||||
|
@ -490,36 +469,36 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(TARGET_ARM 1)
|
SET(TARGET_ARM 1)
|
||||||
ELSEIF(TARGET_CPU STREQUAL "mips")
|
ELSEIF(TARGET_CPU STREQUAL "mips")
|
||||||
SET(TARGET_MIPS 1)
|
SET(TARGET_MIPS 1)
|
||||||
ENDIF()
|
ENDIF(TARGET_CPU STREQUAL "x86_64")
|
||||||
|
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7S")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7S")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7S)
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARMV7")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-HAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-HAVE_ARMV6")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV6)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_ARM")
|
ADD_PLATFORM_FLAGS("-DHAVE_ARM")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARM)
|
||||||
|
|
||||||
IF(TARGET_X86)
|
IF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-DHAVE_X86")
|
||||||
ENDIF()
|
ENDIF(TARGET_X86)
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_X64 -DHAVE_X86_64")
|
ADD_PLATFORM_FLAGS("-DHAVE_X64 -DHAVE_X86_64")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-DHAVE_MIPS")
|
||||||
ENDIF()
|
ENDIF(TARGET_MIPS)
|
||||||
ENDIF()
|
ENDIF(NOT CMAKE_OSX_ARCHITECTURES)
|
||||||
|
|
||||||
# Fix library paths suffixes for Debian MultiArch
|
# Fix library paths suffixes for Debian MultiArch
|
||||||
IF(LIBRARY_ARCHITECTURE)
|
IF(LIBRARY_ARCHITECTURE)
|
||||||
|
@ -528,22 +507,22 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64)
|
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64)
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32)
|
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32)
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
ENDIF()
|
ENDIF(LIBRARY_ARCHITECTURE)
|
||||||
|
|
||||||
IF(APPLE AND NOT IOS)
|
IF(APPLE AND NOT IOS)
|
||||||
SET(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
SET(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
||||||
SET(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
SET(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
||||||
ENDIF()
|
ENDIF(APPLE AND NOT IOS)
|
||||||
|
|
||||||
IF(WITH_LOGGING)
|
IF(WITH_LOGGING)
|
||||||
ADD_PLATFORM_FLAGS("-DENABLE_LOGS")
|
ADD_PLATFORM_FLAGS("-DENABLE_LOGS")
|
||||||
ENDIF()
|
ENDIF(WITH_LOGGING)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
IF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
IF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
||||||
SET(MSVC11 ON)
|
SET(MSVC11 ON)
|
||||||
ENDIF()
|
ENDIF(MSVC_VERSION EQUAL "1700" AND NOT MSVC11)
|
||||||
|
|
||||||
# Ignore default include paths
|
# Ignore default include paths
|
||||||
ADD_PLATFORM_FLAGS("/X")
|
ADD_PLATFORM_FLAGS("/X")
|
||||||
|
@ -555,50 +534,50 @@ MACRO(NL_SETUP_BUILD)
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC12)
|
ELSEIF(MSVC12)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
||||||
# /Ox is working with VC++ 2013, but custom optimizations don't exist
|
# /Ox is working with VC++ 2013, but custom optimizations don't exist
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC11)
|
ELSEIF(MSVC11)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
||||||
# /Ox is working with VC++ 2012, but custom optimizations don't exist
|
# /Ox is working with VC++ 2012, but custom optimizations don't exist
|
||||||
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC10)
|
ELSEIF(MSVC10)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
||||||
# /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(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC90)
|
ELSEIF(MSVC90)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /MP /Zm1000")
|
ADD_PLATFORM_FLAGS("/Gy- /MP")
|
||||||
# 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(RELEASE_CFLAGS "/Ob2 /Oi /Ot /Oy /GT /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ob2 /Oi /Ot /Oy /GT /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Ob1 /GF- ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Ob1 /GF- ${DEBUG_CFLAGS}")
|
||||||
ELSEIF(MSVC80)
|
ELSEIF(MSVC80)
|
||||||
ADD_PLATFORM_FLAGS("/Gy- /Wp64 /Zm1000")
|
ADD_PLATFORM_FLAGS("/Gy- /Wp64")
|
||||||
# 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(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
SET(RELEASE_CFLAGS "/Ox /GF /GS- ${RELEASE_CFLAGS}")
|
||||||
# without inlining it's unusable, use custom optimizations again
|
# without inlining it's unusable, use custom optimizations again
|
||||||
SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/Od /Ob1 ${DEBUG_CFLAGS}")
|
||||||
ELSE()
|
ELSE(MSVC12)
|
||||||
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
|
MESSAGE(FATAL_ERROR "Can't determine compiler version ${MSVC_VERSION}")
|
||||||
ENDIF()
|
ENDIF(MSVC14)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /wd4250")
|
ADD_PLATFORM_FLAGS("/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS /DWIN32 /D_WINDOWS /Zm1000 /wd4250")
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
# Fix a bug with Intellisense
|
# Fix a bug with Intellisense
|
||||||
ADD_PLATFORM_FLAGS("/D_WIN64")
|
ADD_PLATFORM_FLAGS("/D_WIN64")
|
||||||
# Fix a compilation error for some big C++ files
|
# Fix a compilation error for some big C++ files
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} /bigobj")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} /bigobj")
|
||||||
ELSE()
|
ELSE(TARGET_X64)
|
||||||
# Allows 32 bits applications to use 3 GB of RAM
|
# Allows 32 bits applications to use 3 GB of RAM
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /LARGEADDRESSAWARE")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /LARGEADDRESSAWARE")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
# Exceptions are only set for C++
|
# Exceptions are only set for C++
|
||||||
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} /EHa")
|
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} /EHa")
|
||||||
|
@ -606,9 +585,9 @@ MACRO(NL_SETUP_BUILD)
|
||||||
IF(WITH_SYMBOLS)
|
IF(WITH_SYMBOLS)
|
||||||
SET(NL_RELEASE_CFLAGS "/Zi ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "/Zi ${NL_RELEASE_CFLAGS}")
|
||||||
SET(NL_RELEASE_LINKFLAGS "/DEBUG ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "/DEBUG ${NL_RELEASE_LINKFLAGS}")
|
||||||
ELSE()
|
ELSE(WITH_SYMBOLS)
|
||||||
SET(NL_RELEASE_LINKFLAGS "/RELEASE ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "/RELEASE ${NL_RELEASE_LINKFLAGS}")
|
||||||
ENDIF()
|
ENDIF(WITH_SYMBOLS)
|
||||||
|
|
||||||
SET(NL_DEBUG_CFLAGS "/Zi /MDd /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
|
SET(NL_DEBUG_CFLAGS "/Zi /MDd /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
|
||||||
SET(NL_RELEASE_CFLAGS "/MD /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "/MD /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
|
||||||
|
@ -617,25 +596,25 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(WITH_WARNINGS)
|
IF(WITH_WARNINGS)
|
||||||
SET(DEBUG_CFLAGS "/W4 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/W4 ${DEBUG_CFLAGS}")
|
||||||
ELSE()
|
ELSE(WITH_WARNINGS)
|
||||||
SET(DEBUG_CFLAGS "/W3 ${DEBUG_CFLAGS}")
|
SET(DEBUG_CFLAGS "/W3 ${DEBUG_CFLAGS}")
|
||||||
ENDIF()
|
ENDIF(WITH_WARNINGS)
|
||||||
ELSE()
|
ELSE(MSVC)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_PLATFORM_FLAGS("-DWIN32 -D_WIN32")
|
ADD_PLATFORM_FLAGS("-DWIN32 -D_WIN32")
|
||||||
|
|
||||||
IF(CLANG)
|
IF(CLANG)
|
||||||
ADD_PLATFORM_FLAGS("-nobuiltininc")
|
ADD_PLATFORM_FLAGS("-nobuiltininc")
|
||||||
ENDIF()
|
ENDIF(CLANG)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(WITH_SSE3)
|
IF(WITH_SSE3)
|
||||||
ADD_PLATFORM_FLAGS("-msse3")
|
ADD_PLATFORM_FLAGS("-msse3")
|
||||||
ENDIF()
|
ENDIF(WITH_SSE3)
|
||||||
|
|
||||||
IF(WITH_GCC_FPMATH_BOTH)
|
IF(WITH_GCC_FPMATH_BOTH)
|
||||||
ADD_PLATFORM_FLAGS("-mfpmath=both")
|
ADD_PLATFORM_FLAGS("-mfpmath=both")
|
||||||
ENDIF()
|
ENDIF(WITH_GCC_FPMATH_BOTH)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
IF(NOT XCODE)
|
IF(NOT XCODE)
|
||||||
|
@ -670,97 +649,97 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(_ARCHS "${_ARCHS} mips")
|
SET(_ARCHS "${_ARCHS} mips")
|
||||||
SET(TARGET_MIPS 1)
|
SET(TARGET_MIPS 1)
|
||||||
MATH(EXPR TARGETS_COUNT "${TARGETS_COUNT}+1")
|
MATH(EXPR TARGETS_COUNT "${TARGETS_COUNT}+1")
|
||||||
ELSE()
|
ELSE(_ARCH STREQUAL "i386")
|
||||||
SET(_ARCHS "${_ARCHS} unknwon(${_ARCH})")
|
SET(_ARCHS "${_ARCHS} unknwon(${_ARCH})")
|
||||||
ENDIF()
|
ENDIF(_ARCH STREQUAL "i386")
|
||||||
ENDFOREACH(_ARCH)
|
ENDFOREACH(_ARCH)
|
||||||
MESSAGE(STATUS "Compiling under Mac OS X for ${TARGETS_COUNT} architectures: ${_ARCHS}")
|
MESSAGE(STATUS "Compiling under Mac OS X for ${TARGETS_COUNT} architectures: ${_ARCHS}")
|
||||||
ELSE()
|
ELSE(CMAKE_OSX_ARCHITECTURES)
|
||||||
SET(TARGETS_COUNT 0)
|
SET(TARGETS_COUNT 0)
|
||||||
ENDIF()
|
ENDIF(CMAKE_OSX_ARCHITECTURES)
|
||||||
|
|
||||||
IF(TARGETS_COUNT EQUAL 1)
|
IF(TARGETS_COUNT EQUAL 1)
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7s -DHAVE_ARMV7S")
|
ADD_PLATFORM_FLAGS("-arch armv7s -DHAVE_ARMV7S")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7S)
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7 -DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-arch armv7 -DHAVE_ARMV7")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv6 -DHAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-arch armv6 -DHAVE_ARMV6")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV6)
|
||||||
|
|
||||||
IF(TARGET_ARMV5)
|
IF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv5 -DHAVE_ARMV5")
|
ADD_PLATFORM_FLAGS("-arch armv5 -DHAVE_ARMV5")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV5)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-mthumb -DHAVE_ARM")
|
ADD_PLATFORM_FLAGS("-mthumb -DHAVE_ARM")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARM)
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-arch x86_64 -DHAVE_X64 -DHAVE_X86_64 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-arch x86_64 -DHAVE_X64 -DHAVE_X86_64 -DHAVE_X86")
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-arch i386 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-arch i386 -DHAVE_X86")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-arch mips -DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-arch mips -DHAVE_MIPS")
|
||||||
ENDIF()
|
ENDIF(TARGET_MIPS)
|
||||||
ELSEIF(TARGETS_COUNT EQUAL 0)
|
ELSEIF(TARGETS_COUNT EQUAL 0)
|
||||||
# Not using CMAKE_OSX_ARCHITECTURES, HAVE_XXX already defined before
|
# Not using CMAKE_OSX_ARCHITECTURES, HAVE_XXX already defined before
|
||||||
IF(TARGET_ARM)
|
IF(TARGET_ARM)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7s")
|
ADD_PLATFORM_FLAGS("-arch armv7s")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7S)
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv7")
|
ADD_PLATFORM_FLAGS("-arch armv7")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv6")
|
ADD_PLATFORM_FLAGS("-arch armv6")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV6)
|
||||||
|
|
||||||
IF(TARGET_ARMV5)
|
IF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-arch armv5")
|
ADD_PLATFORM_FLAGS("-arch armv5")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV5)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-mthumb")
|
ADD_PLATFORM_FLAGS("-mthumb")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARM)
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-arch x86_64")
|
ADD_PLATFORM_FLAGS("-arch x86_64")
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-arch i386")
|
ADD_PLATFORM_FLAGS("-arch i386")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-arch mips")
|
ADD_PLATFORM_FLAGS("-arch mips")
|
||||||
ENDIF()
|
ENDIF(TARGET_MIPS)
|
||||||
ELSE()
|
ELSE(TARGETS_COUNT EQUAL 1)
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_armv6 -mthumb -Xarch_armv6 -DHAVE_ARM -Xarch_armv6 -DHAVE_ARMV6")
|
ADD_PLATFORM_FLAGS("-Xarch_armv6 -mthumb -Xarch_armv6 -DHAVE_ARM -Xarch_armv6 -DHAVE_ARMV6")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV6)
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_armv7 -mthumb -Xarch_armv7 -DHAVE_ARM -Xarch_armv7 -DHAVE_ARMV7")
|
ADD_PLATFORM_FLAGS("-Xarch_armv7 -mthumb -Xarch_armv7 -DHAVE_ARM -Xarch_armv7 -DHAVE_ARMV7")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
IF(TARGET_X86)
|
IF(TARGET_X86)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_i386 -DHAVE_X86")
|
ADD_PLATFORM_FLAGS("-Xarch_i386 -DHAVE_X86")
|
||||||
ENDIF()
|
ENDIF(TARGET_X86)
|
||||||
|
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_x86_64 -DHAVE_X64 -Xarch_x86_64 -DHAVE_X86_64")
|
ADD_PLATFORM_FLAGS("-Xarch_x86_64 -DHAVE_X64 -Xarch_x86_64 -DHAVE_X86_64")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64)
|
||||||
|
|
||||||
IF(TARGET_MIPS)
|
IF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-Xarch_mips -DHAVE_MIPS")
|
ADD_PLATFORM_FLAGS("-Xarch_mips -DHAVE_MIPS")
|
||||||
ENDIF()
|
ENDIF(TARGET_MIPS)
|
||||||
ENDIF()
|
ENDIF(TARGETS_COUNT EQUAL 1)
|
||||||
|
|
||||||
IF(IOS)
|
IF(IOS)
|
||||||
SET(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
|
SET(CMAKE_OSX_SYSROOT "" CACHE PATH "" FORCE)
|
||||||
|
@ -770,73 +749,73 @@ MACRO(NL_SETUP_BUILD)
|
||||||
CONVERT_VERSION_NUMBER(${IOS_VERSION_MAJOR} ${IOS_VERSION_MINOR} ${IOS_VERSION_PATCH} IOS_VERSION_NUMBER)
|
CONVERT_VERSION_NUMBER(${IOS_VERSION_MAJOR} ${IOS_VERSION_MINOR} ${IOS_VERSION_PATCH} IOS_VERSION_NUMBER)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-D__IPHONE_OS_VERSION_MIN_REQUIRED=${IOS_VERSION_NUMBER}")
|
ADD_PLATFORM_FLAGS("-D__IPHONE_OS_VERSION_MIN_REQUIRED=${IOS_VERSION_NUMBER}")
|
||||||
ENDIF()
|
ENDIF(IOS_VERSION)
|
||||||
|
|
||||||
IF(CMAKE_IOS_SYSROOT)
|
IF(CMAKE_IOS_SYSROOT)
|
||||||
IF(TARGET_ARMV7S)
|
IF(TARGET_ARMV7S)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv7s ")
|
SET(XARCH "-Xarch_armv7s ")
|
||||||
ENDIF()
|
ENDIF(TARGETS_COUNT GREATER 1)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7S)
|
||||||
|
|
||||||
IF(TARGET_ARMV7)
|
IF(TARGET_ARMV7)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv7 ")
|
SET(XARCH "-Xarch_armv7 ")
|
||||||
ENDIF()
|
ENDIF(TARGETS_COUNT GREATER 1)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
IF(TARGET_ARMV6)
|
IF(TARGET_ARMV6)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_armv6 ")
|
SET(XARCH "-Xarch_armv6 ")
|
||||||
ENDIF()
|
ENDIF(TARGETS_COUNT GREATER 1)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-miphoneos-version-min=${IOS_VERSION}")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-iphoneos_version_min,${IOS_VERSION}")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV6)
|
||||||
ENDIF()
|
ENDIF(CMAKE_IOS_SYSROOT)
|
||||||
|
|
||||||
IF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
IF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
||||||
IF(TARGETS_COUNT GREATER 1)
|
IF(TARGETS_COUNT GREATER 1)
|
||||||
SET(XARCH "-Xarch_i386 ")
|
SET(XARCH "-Xarch_i386 ")
|
||||||
ENDIF()
|
ENDIF(TARGETS_COUNT GREATER 1)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SIMULATOR_SYSROOT}")
|
ADD_PLATFORM_FLAGS("${XARCH}-isysroot${CMAKE_IOS_SIMULATOR_SYSROOT}")
|
||||||
ADD_PLATFORM_FLAGS("${XARCH}-mios-simulator-version-min=${IOS_VERSION}")
|
ADD_PLATFORM_FLAGS("${XARCH}-mios-simulator-version-min=${IOS_VERSION}")
|
||||||
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${XARCH}-Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
ENDIF()
|
ENDIF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
ENDIF()
|
ENDIF(CMAKE_IOS_SIMULATOR_SYSROOT AND TARGET_X86)
|
||||||
ELSE()
|
ELSE(IOS)
|
||||||
# Always force -mmacosx-version-min to override environement variable
|
# Always force -mmacosx-version-min to override environement variable
|
||||||
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
ENDIF()
|
ENDIF(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
ENDIF()
|
ENDIF(IOS)
|
||||||
|
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-headerpad_max_install_names")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-headerpad_max_install_names")
|
||||||
|
|
||||||
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-search_paths_first")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-search_paths_first")
|
||||||
ENDIF()
|
ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
|
||||||
ENDIF()
|
ENDIF(NOT XCODE)
|
||||||
ELSE()
|
ELSE(APPLE)
|
||||||
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
IF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
||||||
ADD_PLATFORM_FLAGS("-m32 -march=i686")
|
ADD_PLATFORM_FLAGS("-m32 -march=i686")
|
||||||
ENDIF()
|
ENDIF(HOST_CPU STREQUAL "x86_64" AND TARGET_CPU STREQUAL "x86")
|
||||||
|
|
||||||
IF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
IF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
||||||
ADD_PLATFORM_FLAGS("-m64")
|
ADD_PLATFORM_FLAGS("-m64")
|
||||||
ENDIF()
|
ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64")
|
||||||
ENDIF()
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ADD_PLATFORM_FLAGS("-D_REENTRANT -fno-strict-aliasing")
|
ADD_PLATFORM_FLAGS("-D_REENTRANT -fno-strict-aliasing")
|
||||||
|
|
||||||
|
@ -846,11 +825,11 @@ MACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
IF(WITH_COVERAGE)
|
IF(WITH_COVERAGE)
|
||||||
ADD_PLATFORM_FLAGS("-fprofile-arcs -ftest-coverage")
|
ADD_PLATFORM_FLAGS("-fprofile-arcs -ftest-coverage")
|
||||||
ENDIF()
|
ENDIF(WITH_COVERAGE)
|
||||||
|
|
||||||
IF(WITH_WARNINGS)
|
IF(WITH_WARNINGS)
|
||||||
ADD_PLATFORM_FLAGS("-Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused")
|
ADD_PLATFORM_FLAGS("-Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused")
|
||||||
ENDIF()
|
ENDIF(WITH_WARNINGS)
|
||||||
|
|
||||||
IF(ANDROID)
|
IF(ANDROID)
|
||||||
ADD_PLATFORM_FLAGS("--sysroot=${PLATFORM_ROOT}")
|
ADD_PLATFORM_FLAGS("--sysroot=${PLATFORM_ROOT}")
|
||||||
|
@ -867,17 +846,17 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -march=armv7-a -Wl,--fix-cortex-a8")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -march=armv7-a -Wl,--fix-cortex-a8")
|
||||||
ELSEIF(TARGET_ARMV5)
|
ELSEIF(TARGET_ARMV5)
|
||||||
ADD_PLATFORM_FLAGS("-march=armv5te -mtune=xscale -msoft-float")
|
ADD_PLATFORM_FLAGS("-march=armv5te -mtune=xscale -msoft-float")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARMV7)
|
||||||
|
|
||||||
SET(TARGET_THUMB ON)
|
SET(TARGET_THUMB ON)
|
||||||
IF(TARGET_THUMB)
|
IF(TARGET_THUMB)
|
||||||
ADD_PLATFORM_FLAGS("-mthumb -fno-strict-aliasing -finline-limit=64")
|
ADD_PLATFORM_FLAGS("-mthumb -fno-strict-aliasing -finline-limit=64")
|
||||||
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -marm")
|
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -marm")
|
||||||
ELSE()
|
ELSE(TARGET_THUMB)
|
||||||
ADD_PLATFORM_FLAGS("-funswitch-loops -finline-limit=300")
|
ADD_PLATFORM_FLAGS("-funswitch-loops -finline-limit=300")
|
||||||
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -fno-strict-aliasing")
|
SET(DEBUG_CFLAGS "${DEBUG_CFLAGS} -fno-strict-aliasing")
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -fstrict-aliasing")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -fstrict-aliasing")
|
||||||
ENDIF()
|
ENDIF(TARGET_THUMB)
|
||||||
ELSEIF(TARGET_X86)
|
ELSEIF(TARGET_X86)
|
||||||
# Optimizations for Intel Atom
|
# Optimizations for Intel Atom
|
||||||
ADD_PLATFORM_FLAGS("-march=i686 -mtune=atom -mstackrealign -msse3 -mfpmath=sse -m32 -flto -ffast-math -funroll-loops")
|
ADD_PLATFORM_FLAGS("-march=i686 -mtune=atom -mstackrealign -msse3 -mfpmath=sse -m32 -flto -ffast-math -funroll-loops")
|
||||||
|
@ -887,39 +866,39 @@ MACRO(NL_SETUP_BUILD)
|
||||||
ELSEIF(TARGET_MIPS)
|
ELSEIF(TARGET_MIPS)
|
||||||
ADD_PLATFORM_FLAGS("-fpic -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fno-strict-aliasing")
|
ADD_PLATFORM_FLAGS("-fpic -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fno-strict-aliasing")
|
||||||
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -funswitch-loops -finline-limit=300")
|
SET(RELEASE_CFLAGS "${RELEASE_CFLAGS} -funswitch-loops -finline-limit=300")
|
||||||
ENDIF()
|
ENDIF(TARGET_ARM)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now")
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -L${PLATFORM_ROOT}/usr/lib")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -L${PLATFORM_ROOT}/usr/lib")
|
||||||
ENDIF()
|
ENDIF(ANDROID)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
|
ADD_PLATFORM_FLAGS("-gdwarf-2 -D_DARWIN_UNLIMITED_STREAMS")
|
||||||
ENDIF()
|
ENDIF(APPLE)
|
||||||
|
|
||||||
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
|
# Fix "relocation R_X86_64_32 against.." error on x64 platforms
|
||||||
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
IF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
||||||
ADD_PLATFORM_FLAGS("-fPIC")
|
ADD_PLATFORM_FLAGS("-fPIC")
|
||||||
ENDIF()
|
ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS AND NOT MINGW)
|
||||||
|
|
||||||
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48")
|
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -ftemplate-depth-48")
|
||||||
|
|
||||||
IF(NOT APPLE)
|
IF(NOT APPLE)
|
||||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed")
|
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed")
|
||||||
ENDIF()
|
ENDIF(NOT APPLE)
|
||||||
|
|
||||||
IF(WITH_SYMBOLS)
|
IF(WITH_SYMBOLS)
|
||||||
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
|
SET(NL_RELEASE_CFLAGS "${NL_RELEASE_CFLAGS} -g")
|
||||||
ELSE()
|
ELSE(WITH_SYMBOLS)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "-Wl,-dead_strip ${NL_RELEASE_LINKFLAGS}")
|
||||||
ELSE()
|
ELSE(APPLE)
|
||||||
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
|
SET(NL_RELEASE_LINKFLAGS "-Wl,-s ${NL_RELEASE_LINKFLAGS}")
|
||||||
ENDIF()
|
ENDIF(APPLE)
|
||||||
ENDIF()
|
ENDIF(WITH_SYMBOLS)
|
||||||
|
|
||||||
SET(NL_DEBUG_CFLAGS "-g -DNL_DEBUG -D_DEBUG ${NL_DEBUG_CFLAGS}")
|
SET(NL_DEBUG_CFLAGS "-g -DNL_DEBUG -D_DEBUG ${NL_DEBUG_CFLAGS}")
|
||||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O3 ${NL_RELEASE_CFLAGS}")
|
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -DNDEBUG -O3 ${NL_RELEASE_CFLAGS}")
|
||||||
ENDIF()
|
ENDIF(MSVC)
|
||||||
ENDMACRO(NL_SETUP_BUILD)
|
ENDMACRO(NL_SETUP_BUILD)
|
||||||
|
|
||||||
MACRO(NL_SETUP_BUILD_FLAGS)
|
MACRO(NL_SETUP_BUILD_FLAGS)
|
||||||
|
@ -954,7 +933,7 @@ MACRO(NL_MAKE_ABSOLUTE_PREFIX NAME_RELATIVE NAME_ABSOLUTE)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
|
SET(${NAME_ABSOLUTE} ${${NAME_RELATIVE}})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(IS_ABSOLUTE "${${NAME_RELATIVE}}")
|
||||||
ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX)
|
ENDMACRO(NL_MAKE_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
MACRO(NL_SETUP_PREFIX_PATHS)
|
MACRO(NL_SETUP_PREFIX_PATHS)
|
||||||
|
@ -1031,7 +1010,7 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
|
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(NOT RYZOM_ETC_PREFIX)
|
||||||
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX)
|
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_ETC_PREFIX RYZOM_ETC_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
## Allow override of install_prefix/share path.
|
## Allow override of install_prefix/share path.
|
||||||
|
@ -1071,7 +1050,7 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
|
SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(NOT RYZOM_LIB_PREFIX)
|
||||||
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)
|
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)
|
||||||
|
|
||||||
## Allow override of install_prefix/games path.
|
## Allow override of install_prefix/games path.
|
||||||
|
@ -1089,7 +1068,7 @@ ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||||
MACRO(SETUP_EXTERNAL)
|
MACRO(SETUP_EXTERNAL)
|
||||||
IF(WITH_EXTERNAL)
|
IF(WITH_EXTERNAL)
|
||||||
FIND_PACKAGE(External REQUIRED)
|
FIND_PACKAGE(External REQUIRED)
|
||||||
ENDIF()
|
ENDIF(WITH_EXTERNAL)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FIND_PACKAGE(External REQUIRED)
|
FIND_PACKAGE(External REQUIRED)
|
||||||
|
@ -1098,8 +1077,8 @@ MACRO(SETUP_EXTERNAL)
|
||||||
IF(DEFINED BOOST_DIR)
|
IF(DEFINED BOOST_DIR)
|
||||||
SET(BOOST_INCLUDEDIR ${BOOST_DIR}/include)
|
SET(BOOST_INCLUDEDIR ${BOOST_DIR}/include)
|
||||||
SET(BOOST_LIBRARYDIR ${BOOST_DIR}/lib)
|
SET(BOOST_LIBRARYDIR ${BOOST_DIR}/lib)
|
||||||
ENDIF()
|
ENDIF(DEFINED BOOST_DIR)
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
FIND_PACKAGE(External QUIET)
|
FIND_PACKAGE(External QUIET)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
@ -1108,28 +1087,28 @@ MACRO(SETUP_EXTERNAL)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE(APPLE)
|
||||||
IF(WITH_STATIC_EXTERNAL)
|
IF(WITH_STATIC_EXTERNAL)
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a)
|
SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF(APPLE)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
# Android and iOS have pthread
|
# Android and iOS have pthread
|
||||||
IF(ANDROID OR IOS)
|
IF(ANDROID OR IOS)
|
||||||
SET(CMAKE_USE_PTHREADS_INIT 1)
|
SET(CMAKE_USE_PTHREADS_INIT 1)
|
||||||
SET(Threads_FOUND TRUE)
|
SET(Threads_FOUND TRUE)
|
||||||
ELSE()
|
ELSE(ANDROID OR IOS)
|
||||||
FIND_PACKAGE(Threads REQUIRED)
|
FIND_PACKAGE(Threads REQUIRED)
|
||||||
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
# TODO: replace all -l<lib> by absolute path to <lib> in CMAKE_THREAD_LIBS_INIT
|
||||||
ENDIF()
|
ENDIF(ANDROID OR IOS)
|
||||||
|
|
||||||
IF(WITH_STLPORT)
|
IF(WITH_STLPORT)
|
||||||
FIND_PACKAGE(STLport REQUIRED)
|
FIND_PACKAGE(STLport REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR})
|
||||||
ENDIF()
|
ENDIF(WITH_STLPORT)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# Must include DXSDK before WINSDK
|
# Must include DXSDK before WINSDK
|
||||||
|
@ -1137,10 +1116,10 @@ MACRO(SETUP_EXTERNAL)
|
||||||
# IF(DXSDK_INCLUDE_DIR)
|
# IF(DXSDK_INCLUDE_DIR)
|
||||||
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
|
||||||
# ENDIF()
|
# ENDIF()
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
FIND_PACKAGE(MSVC REQUIRED)
|
FIND_PACKAGE(MSVC REQUIRED)
|
||||||
FIND_PACKAGE(WindowsSDK REQUIRED)
|
FIND_PACKAGE(WindowsSDK REQUIRED)
|
||||||
ENDIF()
|
ENDIF(MSVC)
|
||||||
ENDMACRO(SETUP_EXTERNAL)
|
ENDMACRO(SETUP_EXTERNAL)
|
||||||
|
|
|
@ -2,23 +2,23 @@ PROJECT(NeL CXX C)
|
||||||
|
|
||||||
IF(WITH_STATIC_DRIVERS)
|
IF(WITH_STATIC_DRIVERS)
|
||||||
ADD_DEFINITIONS(-DNL_STATIC)
|
ADD_DEFINITIONS(-DNL_STATIC)
|
||||||
ENDIF()
|
ENDIF(WITH_STATIC_DRIVERS)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# On Win32 we can also build the MAX plugins.
|
# On Win32 we can also build the MAX plugins.
|
||||||
IF(WITH_NEL_MAXPLUGIN)
|
IF(WITH_NEL_MAXPLUGIN)
|
||||||
FIND_PACKAGE(3dsMaxSDK)
|
FIND_PACKAGE(3dsMaxSDK)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_MAXPLUGIN)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
FIND_PACKAGE(FreeType)
|
FIND_PACKAGE(FreeType)
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
FIND_PACKAGE(CEGUI)
|
FIND_PACKAGE(CEGUI)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_CEGUI)
|
||||||
|
|
||||||
ENDIF()
|
ENDIF(WITH_3D)
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
FIND_PACKAGE(Ogg)
|
FIND_PACKAGE(Ogg)
|
||||||
|
@ -26,16 +26,24 @@ IF(WITH_SOUND)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENAL)
|
IF(WITH_DRIVER_OPENAL)
|
||||||
FIND_PACKAGE(OpenAL)
|
FIND_PACKAGE(OpenAL)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENAL)
|
||||||
|
|
||||||
IF(WITH_DRIVER_FMOD)
|
IF(WITH_DRIVER_FMOD)
|
||||||
FIND_PACKAGE(FMOD)
|
FIND_PACKAGE(FMOD)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_FMOD)
|
||||||
ENDIF()
|
ENDIF(WITH_SOUND)
|
||||||
|
|
||||||
IF(WITH_GTK)
|
IF(WITH_GTK)
|
||||||
FIND_PACKAGE(GTK2)
|
FIND_PACKAGE(GTK2)
|
||||||
ENDIF()
|
ENDIF(WITH_GTK)
|
||||||
|
|
||||||
|
IF(WITH_LIBOVR)
|
||||||
|
FIND_PACKAGE(LibOVR)
|
||||||
|
ENDIF(WITH_LIBOVR)
|
||||||
|
|
||||||
|
IF(WITH_LIBVR)
|
||||||
|
FIND_PACKAGE(LibVR)
|
||||||
|
ENDIF(WITH_LIBVR)
|
||||||
|
|
||||||
IF(WITH_INSTALL_LIBRARIES)
|
IF(WITH_INSTALL_LIBRARIES)
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
@ -53,7 +61,7 @@ IF(WITH_INSTALL_LIBRARIES)
|
||||||
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
|
CONFIGURE_FILE(nel-config.in ${CMAKE_CURRENT_BINARY_DIR}/nel-config)
|
||||||
|
|
||||||
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nel-config DESTINATION ${NL_BIN_PREFIX})
|
||||||
ENDIF()
|
ENDIF(UNIX)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(include)
|
ADD_SUBDIRECTORY(include)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
CTrackDefaultFloat DefaultUTrans; // u translation
|
CTrackDefaultFloat DefaultUTrans; // u translation
|
||||||
CTrackDefaultFloat DefaultVTrans; // v translation
|
CTrackDefaultFloat DefaultVTrans; // v translation
|
||||||
CTrackDefaultFloat DefaultUScale; // u scale
|
CTrackDefaultFloat DefaultUScale; // u scale
|
||||||
CTrackDefaultFloat DefaultVScale; // v scale
|
CTrackDefaultFloat DefaultVScale; // u scale
|
||||||
CTrackDefaultFloat DefaultWRot; // v scale
|
CTrackDefaultFloat DefaultWRot; // v scale
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,10 +61,6 @@ public:
|
||||||
sint32 Top; // Distance between origin and top of the texture
|
sint32 Top; // Distance between origin and top of the texture
|
||||||
sint32 Left; // Distance between origin and left of the texture
|
sint32 Left; // Distance between origin and left of the texture
|
||||||
sint32 AdvX; // Advance to the next caracter
|
sint32 AdvX; // Advance to the next caracter
|
||||||
|
|
||||||
SLetterInfo():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false), Next(NULL), Prev(NULL), Cat(0), CharWidth(0), CharHeight(0), GlyphIndex(0), Top(0), Left(0), AdvX(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SLetterKey
|
struct SLetterKey
|
||||||
|
@ -78,10 +74,6 @@ public:
|
||||||
uint32 getVal();
|
uint32 getVal();
|
||||||
//bool operator < (const SLetterKey&k) const;
|
//bool operator < (const SLetterKey&k) const;
|
||||||
//bool operator == (const SLetterKey&k) const;
|
//bool operator == (const SLetterKey&k) const;
|
||||||
|
|
||||||
SLetterKey():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -320,7 +320,7 @@ public:
|
||||||
// For edition: change the tileVegetableDesc. NB: only the TileVegetableDescFileName is serialised.
|
// For edition: change the tileVegetableDesc. NB: only the TileVegetableDescFileName is serialised.
|
||||||
void setTileVegetableDesc (const CTileVegetableDesc &tvd);
|
void setTileVegetableDesc (const CTileVegetableDesc &tvd);
|
||||||
/** try to load the vegetable tile desc associated with the fileName (nlinfo() if can't)
|
/** try to load the vegetable tile desc associated with the fileName (nlinfo() if can't)
|
||||||
* lookup into CPath. no-op if string empty
|
* lookup into CPath. no-op if string=="".
|
||||||
*/
|
*/
|
||||||
void loadTileVegetableDesc();
|
void loadTileVegetableDesc();
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ public:
|
||||||
/** There is (OrderS/2+1) * (OrderT/2+1) tiles light influence.
|
/** There is (OrderS/2+1) * (OrderT/2+1) tiles light influence.
|
||||||
* It indicates which static pointLight influence each corner of a TessBlock (block of 2*2 tiles).
|
* It indicates which static pointLight influence each corner of a TessBlock (block of 2*2 tiles).
|
||||||
*
|
*
|
||||||
* If empty(), suppose no light influence. but CZone::retrieve() always return a
|
* If size()==0, suppose no light influence. but CZone::retrieve() always return a
|
||||||
* size() == (OrderS/2+1) * (OrderT/2+1).
|
* size() == (OrderS/2+1) * (OrderT/2+1).
|
||||||
*
|
*
|
||||||
* They are stored in line first order, from S=0 to 1, and T=0 to 1.
|
* They are stored in line first order, from S=0 to 1, and T=0 to 1.
|
||||||
|
|
|
@ -2,36 +2,36 @@ SUBDIRS(misc)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
SUBDIRS(3d)
|
SUBDIRS(3d)
|
||||||
ENDIF()
|
ENDIF(WITH_3D)
|
||||||
|
|
||||||
IF(WITH_GUI)
|
IF(WITH_GUI)
|
||||||
ADD_SUBDIRECTORY(gui)
|
ADD_SUBDIRECTORY(gui)
|
||||||
ENDIF()
|
ENDIF(WITH_GUI)
|
||||||
|
|
||||||
IF(WITH_GEORGES)
|
IF(WITH_GEORGES)
|
||||||
SUBDIRS(georges)
|
SUBDIRS(georges)
|
||||||
ENDIF()
|
ENDIF(WITH_GEORGES)
|
||||||
|
|
||||||
IF(WITH_LIGO)
|
IF(WITH_LIGO)
|
||||||
SUBDIRS(ligo)
|
SUBDIRS(ligo)
|
||||||
ENDIF()
|
ENDIF(WITH_LIGO)
|
||||||
|
|
||||||
IF(WITH_LOGIC)
|
IF(WITH_LOGIC)
|
||||||
SUBDIRS(logic)
|
SUBDIRS(logic)
|
||||||
ENDIF()
|
ENDIF(WITH_LOGIC)
|
||||||
|
|
||||||
IF(WITH_NET)
|
IF(WITH_NET)
|
||||||
SUBDIRS(net)
|
SUBDIRS(net)
|
||||||
ENDIF()
|
ENDIF(WITH_NET)
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
SUBDIRS(sound)
|
SUBDIRS(sound)
|
||||||
ENDIF()
|
ENDIF(WITH_SOUND)
|
||||||
|
|
||||||
IF(WITH_PACS)
|
IF(WITH_PACS)
|
||||||
SUBDIRS(pacs)
|
SUBDIRS(pacs)
|
||||||
ENDIF()
|
ENDIF(WITH_PACS)
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
SUBDIRS(cegui)
|
SUBDIRS(cegui)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_CEGUI)
|
||||||
|
|
|
@ -865,7 +865,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
||||||
}
|
}
|
||||||
|
|
||||||
// make sure the CSheetId singleton has been properly initialised
|
// make sure the CSheetId singleton has been properly initialised
|
||||||
NLMISC::CSheetId::init(updatePackedSheet);
|
// NLMISC::CSheetId::init(updatePackedSheet);
|
||||||
|
|
||||||
// load the packed sheet if exists
|
// load the packed sheet if exists
|
||||||
try
|
try
|
||||||
|
|
|
@ -39,6 +39,7 @@ namespace NLGUI
|
||||||
class CGroupParagraph;
|
class CGroupParagraph;
|
||||||
|
|
||||||
extern std::string CurrentCookie;
|
extern std::string CurrentCookie;
|
||||||
|
extern std::string HTTPCurrentDomain;
|
||||||
|
|
||||||
// HTML group
|
// HTML group
|
||||||
/**
|
/**
|
||||||
|
@ -77,7 +78,7 @@ namespace NLGUI
|
||||||
class CStyleParams
|
class CStyleParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CStyleParams () : FontFamily(""), TextColor(255,255,255,255)
|
CStyleParams () : TextColor(255,255,255,255)
|
||||||
{
|
{
|
||||||
FontSize=10;
|
FontSize=10;
|
||||||
FontWeight=400;
|
FontWeight=400;
|
||||||
|
@ -92,7 +93,6 @@ namespace NLGUI
|
||||||
uint FontSize;
|
uint FontSize;
|
||||||
uint FontWeight;
|
uint FontWeight;
|
||||||
bool FontOblique;
|
bool FontOblique;
|
||||||
std::string FontFamily;
|
|
||||||
NLMISC::CRGBA TextColor;
|
NLMISC::CRGBA TextColor;
|
||||||
bool Underlined;
|
bool Underlined;
|
||||||
bool StrikeThrough;
|
bool StrikeThrough;
|
||||||
|
@ -253,7 +253,6 @@ namespace NLGUI
|
||||||
int luaEndElement(CLuaState &ls);
|
int luaEndElement(CLuaState &ls);
|
||||||
int luaShowDiv(CLuaState &ls);
|
int luaShowDiv(CLuaState &ls);
|
||||||
int luaParseHtml(CLuaState &ls);
|
int luaParseHtml(CLuaState &ls);
|
||||||
int luaRenderHtml(CLuaState &ls);
|
|
||||||
|
|
||||||
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText)
|
||||||
REFLECT_LUA_METHOD("browse", luaBrowse)
|
REFLECT_LUA_METHOD("browse", luaBrowse)
|
||||||
|
@ -266,7 +265,6 @@ namespace NLGUI
|
||||||
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
REFLECT_LUA_METHOD("endElement", luaEndElement)
|
||||||
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
REFLECT_LUA_METHOD("showDiv", luaShowDiv)
|
||||||
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
|
REFLECT_LUA_METHOD("parseHtml", luaParseHtml)
|
||||||
REFLECT_LUA_METHOD("renderHtml", luaRenderHtml)
|
|
||||||
REFLECT_STRING("url", getURL, setURL)
|
REFLECT_STRING("url", getURL, setURL)
|
||||||
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
REFLECT_FLOAT("timeout", getTimeout, setTimeout)
|
||||||
REFLECT_EXPORT_END
|
REFLECT_EXPORT_END
|
||||||
|
@ -284,6 +282,9 @@ namespace NLGUI
|
||||||
// A new text block has been parsed
|
// A new text block has been parsed
|
||||||
virtual void addText (const char * buf, int len);
|
virtual void addText (const char * buf, int len);
|
||||||
|
|
||||||
|
// A link has been parsed
|
||||||
|
virtual void addLink (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
||||||
|
|
||||||
// A new begin HTML element has been parsed (<IMG> for exemple)
|
// A new begin HTML element has been parsed (<IMG> for exemple)
|
||||||
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
virtual void beginElement (uint element_number, const std::vector<bool> &present, const std::vector<const char *> &value);
|
||||||
|
|
||||||
|
@ -375,7 +376,6 @@ namespace NLGUI
|
||||||
std::string _URL;
|
std::string _URL;
|
||||||
// Current URL
|
// Current URL
|
||||||
std::string _DocumentUrl;
|
std::string _DocumentUrl;
|
||||||
std::string _DocumentDomain;
|
|
||||||
// Valid base href was found
|
// Valid base href was found
|
||||||
bool _IgnoreBaseUrlTag;
|
bool _IgnoreBaseUrlTag;
|
||||||
// Fragment from loading url
|
// Fragment from loading url
|
||||||
|
@ -511,15 +511,6 @@ namespace NLGUI
|
||||||
return _GlobalColor.back();
|
return _GlobalColor.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Current font name
|
|
||||||
std::vector<std::string> _FontFamily;
|
|
||||||
inline const char* getFontFamily() const
|
|
||||||
{
|
|
||||||
if (_FontFamily.empty())
|
|
||||||
return "";
|
|
||||||
return _FontFamily.back().c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Current font size
|
// Current font size
|
||||||
std::vector<uint> _FontSize;
|
std::vector<uint> _FontSize;
|
||||||
inline uint getFontSize() const
|
inline uint getFontSize() const
|
||||||
|
|
|
@ -51,8 +51,7 @@ namespace NLGUI
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::string scheme;
|
std::string scheme;
|
||||||
std::string authority;
|
std::string domain;
|
||||||
std::string host;
|
|
||||||
std::string path;
|
std::string path;
|
||||||
std::string query;
|
std::string query;
|
||||||
std::string hash;
|
std::string hash;
|
||||||
|
|
|
@ -586,12 +586,8 @@ namespace NLGUI
|
||||||
static NL3D::UDriver *driver;
|
static NL3D::UDriver *driver;
|
||||||
static NL3D::UTextContext *textcontext;
|
static NL3D::UTextContext *textcontext;
|
||||||
|
|
||||||
typedef CHashMap< std::string, NL3D::UTextContext* > TFontsList;
|
|
||||||
static TFontsList fonts;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static NL3D::UTextContext* getTextContext(const std::string &name="");
|
static NL3D::UTextContext* getTextContext(){ return textcontext; }
|
||||||
static bool registerFont(const std::string &name, const std::string &font);
|
|
||||||
|
|
||||||
/// Set of hw cursor images
|
/// Set of hw cursor images
|
||||||
static std::set< std::string > *hwCursors;
|
static std::set< std::string > *hwCursors;
|
||||||
|
|
|
@ -80,7 +80,6 @@ namespace NLGUI
|
||||||
/// Set
|
/// Set
|
||||||
|
|
||||||
void setText (const ucstring &text);
|
void setText (const ucstring &text);
|
||||||
void setFontName (const std::string &name);
|
|
||||||
void setFontSize (sint nFontSize);
|
void setFontSize (sint nFontSize);
|
||||||
void setEmbolden (bool nEmbolden);
|
void setEmbolden (bool nEmbolden);
|
||||||
void setOblique (bool nOblique);
|
void setOblique (bool nOblique);
|
||||||
|
@ -95,7 +94,6 @@ namespace NLGUI
|
||||||
void setMultiLineClipEndSpace (bool state); // use it for multiline edit box for instance
|
void setMultiLineClipEndSpace (bool state); // use it for multiline edit box for instance
|
||||||
void setFirstLineX (uint firstLineX);
|
void setFirstLineX (uint firstLineX);
|
||||||
void setMultiMaxLine(uint l) { _MultiMaxLine = l; }
|
void setMultiMaxLine(uint l) { _MultiMaxLine = l; }
|
||||||
void setMultiMinLine(uint l) { _MultiMinLine = l; }
|
|
||||||
|
|
||||||
// Force only a subset of letter to be displayed. Default is 0/0xFFFFFFFF
|
// Force only a subset of letter to be displayed. Default is 0/0xFFFFFFFF
|
||||||
void enableStringSelection(uint start, uint end);
|
void enableStringSelection(uint start, uint end);
|
||||||
|
@ -105,7 +103,6 @@ namespace NLGUI
|
||||||
|
|
||||||
ucstring getText() const { return _Text; }
|
ucstring getText() const { return _Text; }
|
||||||
sint getFontSize() const;
|
sint getFontSize() const;
|
||||||
std::string getFontName() const { return _FontName; }
|
|
||||||
bool getEmbolden() { return _Embolden; }
|
bool getEmbolden() { return _Embolden; }
|
||||||
bool getOblique() { return _Oblique; }
|
bool getOblique() { return _Oblique; }
|
||||||
NLMISC::CRGBA getColor() { return _Color; }
|
NLMISC::CRGBA getColor() { return _Color; }
|
||||||
|
@ -117,8 +114,6 @@ namespace NLGUI
|
||||||
sint getMultiLineSpace() const { return _MultiLineSpace; }
|
sint getMultiLineSpace() const { return _MultiLineSpace; }
|
||||||
bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; }
|
bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; }
|
||||||
uint32 getMultiMaxLine() const { return _MultiMaxLine; }
|
uint32 getMultiMaxLine() const { return _MultiMaxLine; }
|
||||||
uint32 getMultiMinLine() const { return _MultiMinLine; }
|
|
||||||
uint32 getMultiMinOffsetY() const;
|
|
||||||
|
|
||||||
// get current Hint font width, in pixels
|
// get current Hint font width, in pixels
|
||||||
uint getFontWidth() const;
|
uint getFontWidth() const;
|
||||||
|
@ -229,8 +224,6 @@ namespace NLGUI
|
||||||
uint _Index;
|
uint _Index;
|
||||||
/// info on the computed String associated to this text control
|
/// info on the computed String associated to this text control
|
||||||
NL3D::UTextContext::CStringInfo _Info;
|
NL3D::UTextContext::CStringInfo _Info;
|
||||||
/// Font name to get TextContext
|
|
||||||
std::string _FontName;
|
|
||||||
/// the font size
|
/// the font size
|
||||||
sint _FontSize;
|
sint _FontSize;
|
||||||
bool _Embolden;
|
bool _Embolden;
|
||||||
|
@ -266,7 +259,6 @@ namespace NLGUI
|
||||||
sint _MultiLineSpace;
|
sint _MultiLineSpace;
|
||||||
sint _LastMultiLineMaxW;
|
sint _LastMultiLineMaxW;
|
||||||
uint32 _MultiMaxLine;
|
uint32 _MultiMaxLine;
|
||||||
uint32 _MultiMinLine;
|
|
||||||
|
|
||||||
|
|
||||||
/// FormatTag handling
|
/// FormatTag handling
|
||||||
|
@ -324,7 +316,7 @@ namespace NLGUI
|
||||||
CFormatInfo Format;
|
CFormatInfo Format;
|
||||||
public:
|
public:
|
||||||
// build from a string, using the current text context
|
// build from a string, using the current text context
|
||||||
void build(const ucstring &text, NL3D::UTextContext &textContext, uint numSpaces= 0);
|
void build(const ucstring &text, uint numSpaces= 0);
|
||||||
};
|
};
|
||||||
typedef std::vector<CWord> TWordVect;
|
typedef std::vector<CWord> TWordVect;
|
||||||
|
|
||||||
|
@ -335,9 +327,9 @@ namespace NLGUI
|
||||||
// ctor
|
// ctor
|
||||||
CLine();
|
CLine();
|
||||||
// Clear the line & remove text contexts
|
// Clear the line & remove text contexts
|
||||||
void clear(NL3D::UTextContext &textContext);
|
void clear();
|
||||||
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line
|
||||||
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth, NL3D::UTextContext &textContext);
|
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, uint fontWidth);
|
||||||
void addWord(const CWord &word, uint fontWidth);
|
void addWord(const CWord &word, uint fontWidth);
|
||||||
uint getNumWords() const { return (uint)_Words.size(); }
|
uint getNumWords() const { return (uint)_Words.size(); }
|
||||||
CWord &getWord(uint index) { return _Words[index]; }
|
CWord &getWord(uint index) { return _Words[index]; }
|
||||||
|
|
|
@ -442,7 +442,6 @@ namespace NLGUI
|
||||||
OptionTimeoutMessages,
|
OptionTimeoutMessages,
|
||||||
OptionTimeoutContext,
|
OptionTimeoutContext,
|
||||||
OptionTimeoutContextHtml,
|
OptionTimeoutContextHtml,
|
||||||
OptionMonospaceFont,
|
|
||||||
NumSystemOptions
|
NumSystemOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -375,12 +375,6 @@ public:
|
||||||
void makeOpaque();
|
void makeOpaque();
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make fully transparent pixels (alpha 0) black.
|
|
||||||
*/
|
|
||||||
void makeTransparentPixelsBlack();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if the bitmap has uniform alpha values for all pixels.
|
* Return if the bitmap has uniform alpha values for all pixels.
|
||||||
* \param alpha return the uniform value if return is true
|
* \param alpha return the uniform value if return is true
|
||||||
|
@ -615,7 +609,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Extended version of blit. The destinaion of the blit is 'this' bitmap
|
* Extended version of blit. The destinaion of the blit is 'this' bitmap
|
||||||
* Source and dest rect are clamped as necessary.
|
* Source and dest rect are clamped as necessary.
|
||||||
* For now, only RGBA is supported (an asertion occurs otherwise)
|
* For now, only RGBA is uspported (an asertion occurs otherwise)
|
||||||
* mipmap are not updated.
|
* mipmap are not updated.
|
||||||
* IMPORTANT : copy to self is not handled correctly
|
* IMPORTANT : copy to self is not handled correctly
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -120,9 +120,9 @@ public:
|
||||||
*/
|
*/
|
||||||
std::string toString() const
|
std::string toString() const
|
||||||
{
|
{
|
||||||
if (_Ids.empty()) return std::string("");
|
if (_Ids.size()==0) return std::string("");
|
||||||
std::string str=_Ids[0];
|
std::string str=_Ids[0];
|
||||||
for (uint i=1; i<_Ids.size(); i++)
|
for (unsigned i=1; i<_Ids.size(); i++)
|
||||||
str +=std::string(":")+ _Ids[i];
|
str +=std::string(":")+ _Ids[i];
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
namespace STRING_MANAGER
|
namespace STRING_MANAGER
|
||||||
{
|
{
|
||||||
const ucstring nl("\n");
|
const ucstring nl("\r\n");
|
||||||
|
|
||||||
|
|
||||||
struct TStringInfo
|
struct TStringInfo
|
||||||
|
|
|
@ -144,10 +144,12 @@ public:
|
||||||
* 16 bits encoding can be recognized by the official header :
|
* 16 bits encoding can be recognized by the official header :
|
||||||
* FF, FE, witch can be reversed if the data are MSB first.
|
* FF, FE, witch can be reversed if the data are MSB first.
|
||||||
*
|
*
|
||||||
|
* Optionally, you can force the reader to consider the file as
|
||||||
|
* UTF-8 encoded.
|
||||||
* Optionally, you can ask the reader to interpret #include commands.
|
* Optionally, you can ask the reader to interpret #include commands.
|
||||||
*/
|
*/
|
||||||
static void readTextFile(const std::string &filename,
|
static void readTextFile(const std::string &filename,
|
||||||
ucstring &result,
|
ucstring &result, bool forceUtf8 = false,
|
||||||
bool fileLookup = true,
|
bool fileLookup = true,
|
||||||
bool preprocess = false,
|
bool preprocess = false,
|
||||||
TLineFormat lineFmt = LINE_FMT_NO_CARE,
|
TLineFormat lineFmt = LINE_FMT_NO_CARE,
|
||||||
|
@ -160,8 +162,11 @@ public:
|
||||||
* EF,BB, BF.
|
* EF,BB, BF.
|
||||||
* 16 bits encoding can be recognized by the official header :
|
* 16 bits encoding can be recognized by the official header :
|
||||||
* FF, FE, witch can be reversed if the data are MSB first.
|
* FF, FE, witch can be reversed if the data are MSB first.
|
||||||
|
*
|
||||||
|
* Optionally, you can force the reader to consider the file as
|
||||||
|
* UTF-8 encoded.
|
||||||
*/
|
*/
|
||||||
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result);
|
static void readTextBuffer(uint8 *buffer, uint size, ucstring &result, bool forceUtf8 = false);
|
||||||
|
|
||||||
/** Remove any C style comment from the passed string.
|
/** Remove any C style comment from the passed string.
|
||||||
*/
|
*/
|
||||||
|
@ -257,7 +262,7 @@ private:
|
||||||
|
|
||||||
/// The internal read function, it does the real job of readTextFile
|
/// The internal read function, it does the real job of readTextFile
|
||||||
static void _readTextFile(const std::string &filename,
|
static void _readTextFile(const std::string &filename,
|
||||||
ucstring &result,
|
ucstring &result, bool forceUtf8,
|
||||||
bool fileLookup,
|
bool fileLookup,
|
||||||
bool preprocess,
|
bool preprocess,
|
||||||
TLineFormat lineFmt,
|
TLineFormat lineFmt,
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CPacsClient()
|
CPacsClient()
|
||||||
{
|
{
|
||||||
// No connection
|
// No connexion
|
||||||
_Server=NULL;
|
_Server=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ static TCallbackItem PacsCallbackArray[] =
|
||||||
|
|
||||||
inline bool CPacsClient::connect ()
|
inline bool CPacsClient::connect ()
|
||||||
{
|
{
|
||||||
// Create a connection
|
// Create a connexion
|
||||||
_Server = new CCallbackClient;
|
_Server = new CCallbackClient;
|
||||||
|
|
||||||
// Look up for PACS service
|
// Look up for PACS service
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
static IAudioDecoder *createAudioDecoder(const std::string &type, NLMISC::IStream *stream, bool loop);
|
static IAudioDecoder *createAudioDecoder(const std::string &type, NLMISC::IStream *stream, bool loop);
|
||||||
|
|
||||||
/// Get information on a music file (only artist and title at the moment).
|
/// Get information on a music file (only artist and title at the moment).
|
||||||
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title, float &length);
|
static bool getInfo(const std::string &filepath, std::string &artist, std::string &title);
|
||||||
|
|
||||||
/// Get audio/container extensions that are currently supported by the nel sound library.
|
/// Get audio/container extensions that are currently supported by the nel sound library.
|
||||||
static void getMusicExtensions(std::vector<std::string> &extensions);
|
static void getMusicExtensions(std::vector<std::string> &extensions);
|
||||||
|
|
|
@ -77,7 +77,7 @@ public:
|
||||||
inline sint32 getStreamOffset() { return _StreamOffset; }
|
inline sint32 getStreamOffset() { return _StreamOffset; }
|
||||||
|
|
||||||
/// Get information on a music file (only artist and title at the moment).
|
/// Get information on a music file (only artist and title at the moment).
|
||||||
static bool getInfo(NLMISC::IStream *stream, std::string &artist, std::string &title, float &length);
|
static bool getInfo(NLMISC::IStream *stream, std::string &artist, std::string &title);
|
||||||
|
|
||||||
/// Get how many bytes the music buffer requires for output minimum.
|
/// Get how many bytes the music buffer requires for output minimum.
|
||||||
virtual uint32 getRequiredBytes();
|
virtual uint32 getRequiredBytes();
|
||||||
|
|
|
@ -332,7 +332,7 @@ public:
|
||||||
virtual bool isMusicEnded();
|
virtual bool isMusicEnded();
|
||||||
virtual void setMusicVolume(float gain);
|
virtual void setMusicVolume(float gain);
|
||||||
virtual float getMusicLength();
|
virtual float getMusicLength();
|
||||||
virtual bool getSongTitle(const std::string &filename, std::string &result, float &length);
|
virtual bool getSongTitle(const std::string &filename, std::string &result);
|
||||||
virtual void enableBackgroundMusic(bool enable);
|
virtual void enableBackgroundMusic(bool enable);
|
||||||
virtual void enableBackgroundMusicTimeConstraint(bool enable);
|
virtual void enableBackgroundMusicTimeConstraint(bool enable);
|
||||||
CMusicSoundManager *getBackgroundMusicManager() const {return _BackgroundMusicManager;}
|
CMusicSoundManager *getBackgroundMusicManager() const {return _BackgroundMusicManager;}
|
||||||
|
|
|
@ -192,7 +192,7 @@ public:
|
||||||
* \param artist returns the song artist (empty if not available)
|
* \param artist returns the song artist (empty if not available)
|
||||||
* \param title returns the title (empty if not available)
|
* \param title returns the title (empty if not available)
|
||||||
*/
|
*/
|
||||||
virtual bool getMusicInfo(const std::string &/* filepath */, std::string &artist, std::string &title, float &length) { artist.clear(); title.clear(); length = 0.f; return false; }
|
virtual bool getMusicInfo(const std::string &/* filepath */, std::string &artist, std::string &title) { artist.clear(); title.clear(); return false; }
|
||||||
/// Get audio/container extensions that are supported natively by the driver implementation.
|
/// Get audio/container extensions that are supported natively by the driver implementation.
|
||||||
virtual void getMusicExtensions(std::vector<std::string> &extensions) const = 0;
|
virtual void getMusicExtensions(std::vector<std::string> &extensions) const = 0;
|
||||||
/// Return if a music extension is supported by the driver's music channel.
|
/// Return if a music extension is supported by the driver's music channel.
|
||||||
|
|
|
@ -432,7 +432,7 @@ public:
|
||||||
/** Get the song title. Returns false if the song is not found or the function is not implemented.
|
/** Get the song title. Returns false if the song is not found or the function is not implemented.
|
||||||
* If the song as no name, result is filled with the filename.
|
* If the song as no name, result is filled with the filename.
|
||||||
*/
|
*/
|
||||||
virtual bool getSongTitle(const std::string &filename, std::string &result, float &length) =0;
|
virtual bool getSongTitle(const std::string &filename, std::string &result) =0;
|
||||||
/** enable or disable the background music system. disable it when you want to play your own mp3 for instance
|
/** enable or disable the background music system. disable it when you want to play your own mp3 for instance
|
||||||
*/
|
*/
|
||||||
virtual void enableBackgroundMusic(bool enable) =0;
|
virtual void enableBackgroundMusic(bool enable) =0;
|
||||||
|
|
|
@ -4,8 +4,8 @@ ADD_SUBDIRECTORY(shape_viewer)
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
ADD_SUBDIRECTORY(cegui)
|
ADD_SUBDIRECTORY(cegui)
|
||||||
ENDIF()
|
ENDIF(WITH_NEL_CEGUI)
|
||||||
|
|
||||||
#IF(WITH_QT)
|
#IF(WITH_QT)
|
||||||
# ADD_SUBDIRECTORY(qtnel)
|
# ADD_SUBDIRECTORY(qtnel)
|
||||||
#ENDIF()
|
#ENDIF(WITH_QT)
|
||||||
|
|
|
@ -2,20 +2,20 @@ ADD_SUBDIRECTORY(misc)
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
ADD_SUBDIRECTORY(3d)
|
ADD_SUBDIRECTORY(3d)
|
||||||
ENDIF()
|
ENDIF(WITH_3D)
|
||||||
|
|
||||||
IF(WITH_GEORGES)
|
IF(WITH_GEORGES)
|
||||||
ADD_SUBDIRECTORY(georges)
|
ADD_SUBDIRECTORY(georges)
|
||||||
ENDIF()
|
ENDIF(WITH_GEORGES)
|
||||||
|
|
||||||
IF(WITH_NET)
|
IF(WITH_NET)
|
||||||
ADD_SUBDIRECTORY(net)
|
ADD_SUBDIRECTORY(net)
|
||||||
ENDIF()
|
ENDIF(WITH_NET)
|
||||||
|
|
||||||
IF(WITH_PACS)
|
IF(WITH_PACS)
|
||||||
ADD_SUBDIRECTORY(pacs)
|
ADD_SUBDIRECTORY(pacs)
|
||||||
ENDIF()
|
ENDIF(WITH_PACS)
|
||||||
|
|
||||||
IF(WITH_SOUND)
|
IF(WITH_SOUND)
|
||||||
ADD_SUBDIRECTORY(sound)
|
ADD_SUBDIRECTORY(sound)
|
||||||
ENDIF()
|
ENDIF(WITH_SOUND)
|
||||||
|
|
|
@ -8,7 +8,7 @@ ADD_DEFINITIONS(-DUDP_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/nl_sample_udp/\\"")
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
ADD_DEFINITIONS(-DUSE_3D)
|
ADD_DEFINITIONS(-DUSE_3D)
|
||||||
ENDIF()
|
ENDIF(WITH_3D)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(nl_sample_udpclient nelmisc nelnet nel3d)
|
TARGET_LINK_LIBRARIES(nl_sample_udpclient nelmisc nelnet nel3d)
|
||||||
TARGET_LINK_LIBRARIES(nl_sample_udpserver nelmisc nelnet)
|
TARGET_LINK_LIBRARIES(nl_sample_udpserver nelmisc nelnet)
|
||||||
|
@ -22,4 +22,4 @@ INSTALL(FILES bench_service.cfg client.cfg readme.txt DESTINATION ${NL_SHARE_PRE
|
||||||
|
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
INSTALL(FILES n019003l.pfb DESTINATION ${NL_SHARE_PREFIX}/nl_sample_udp COMPONENT samplesnet)
|
INSTALL(FILES n019003l.pfb DESTINATION ${NL_SHARE_PREFIX}/nl_sample_udp COMPONENT samplesnet)
|
||||||
ENDIF()
|
ENDIF(WITH_3D)
|
||||||
|
|
|
@ -730,12 +730,12 @@ ADD_DEFINITIONS(${LIBVR_DEFINITIONS})
|
||||||
|
|
||||||
IF(WITH_PCH)
|
IF(WITH_PCH)
|
||||||
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
|
ADD_NATIVE_PRECOMPILED_HEADER(nel3d ${CMAKE_CURRENT_SOURCE_DIR}/std3d.h ${CMAKE_CURRENT_SOURCE_DIR}/std3d.cpp)
|
||||||
ENDIF()
|
ENDIF(WITH_PCH)
|
||||||
|
|
||||||
NL_GEN_PC(nel-3d.pc)
|
NL_GEN_PC(nel-3d.pc)
|
||||||
|
|
||||||
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||||
INSTALL(TARGETS nel3d LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
INSTALL(TARGETS nel3d LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries)
|
||||||
ENDIF()
|
ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(driver)
|
ADD_SUBDIRECTORY(driver)
|
||||||
|
|
|
@ -50,14 +50,14 @@ IDriver::~IDriver()
|
||||||
{
|
{
|
||||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||||
nlassert(rTexDrvInfos.empty());
|
nlassert( rTexDrvInfos.size() == 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
nlassert(_TexDrvShares.empty());
|
nlassert(_TexDrvShares.size()==0);
|
||||||
nlassert(_MatDrvInfos.empty());
|
nlassert(_MatDrvInfos.size()==0);
|
||||||
nlassert(_VBDrvInfos.empty());
|
nlassert(_VBDrvInfos.size()==0);
|
||||||
nlassert(_IBDrvInfos.empty());
|
nlassert(_IBDrvInfos.size()==0);
|
||||||
nlassert(_GPUPrgDrvInfos.empty());
|
nlassert(_GPUPrgDrvInfos.size()==0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
IF(WITH_DRIVER_OPENGL)
|
IF(WITH_DRIVER_OPENGL)
|
||||||
ADD_SUBDIRECTORY(opengl)
|
ADD_SUBDIRECTORY(opengl)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENGL)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGLES)
|
IF(WITH_DRIVER_OPENGLES)
|
||||||
ADD_SUBDIRECTORY(opengles)
|
ADD_SUBDIRECTORY(opengles)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_OPENGLES)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(WITH_DRIVER_DIRECT3D)
|
IF(WITH_DRIVER_DIRECT3D)
|
||||||
ADD_SUBDIRECTORY(direct3d)
|
ADD_SUBDIRECTORY(direct3d)
|
||||||
ENDIF()
|
ENDIF(WITH_DRIVER_DIRECT3D)
|
||||||
ENDIF()
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -4,7 +4,7 @@ NL_TARGET_DRIVER(nel_drv_direct3d_win ${SRC})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(BEFORE ${DXSDK_INCLUDE_DIR})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY})
|
TARGET_LINK_LIBRARIES(nel_drv_direct3d_win nel3d nelmisc ${DXSDK_D3DX9_LIBRARY} ${DXSDK_D3D9_LIBRARY} ${DXSDK_DINPUT_LIBRARY} ${DXSDK_GUID_LIBRARY})
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
|
NL_DEFAULT_PROPS(nel_drv_direct3d_win "NeL, Driver, Video: Direct3D")
|
||||||
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
|
NL_ADD_RUNTIME_FLAGS(nel_drv_direct3d_win)
|
||||||
|
|
|
@ -2267,10 +2267,7 @@ bool CDriverD3D::getCurrentScreenMode(GfxMode &gfxMode)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDriverD3D::setWindowTitle(const ucstring &title)
|
void CDriverD3D::setWindowTitle(const ucstring &title)
|
||||||
{
|
{
|
||||||
if (!SetWindowTextW(_HWnd, (WCHAR*)title.c_str()))
|
SetWindowTextW(_HWnd,(WCHAR*)title.c_str());
|
||||||
{
|
|
||||||
nlwarning("SetWindowText failed: %s", formatErrorMessage(getLastError()).c_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -125,7 +125,7 @@ uint8 *CVBDrvInfosD3D::lock (uint begin, uint end, bool readOnly)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlinfo("Buffer %s at %p is Locked", (*it)->VertexBufferPtr->getName().c_str(), *it);
|
nlinfo("Buffer %s at %x is Locked", (*it)->VertexBufferPtr->getName().c_str(), (int) *it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 33061 $ on $Date: 2016-07-14 20:14:13 -0400 (Thu, 14 Jul 2016) $
|
** Khronos $Revision: 32155 $ on $Date: 2015-10-22 23:25:39 -0400 (Thu, 22 Oct 2015) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
@ -53,7 +53,7 @@ extern "C" {
|
||||||
#define GLAPI extern
|
#define GLAPI extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GL_GLEXT_VERSION 20160714
|
#define GL_GLEXT_VERSION 20151022
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: gl
|
* API: gl
|
||||||
|
@ -4657,13 +4657,8 @@ GLAPI void APIENTRY glVertexBlendARB (GLint count);
|
||||||
|
|
||||||
#ifndef GL_ARB_vertex_buffer_object
|
#ifndef GL_ARB_vertex_buffer_object
|
||||||
#define GL_ARB_vertex_buffer_object 1
|
#define GL_ARB_vertex_buffer_object 1
|
||||||
#if defined(__APPLE__)
|
|
||||||
typedef intptr_t GLsizeiptrARB;
|
|
||||||
typedef intptr_t GLintptrARB;
|
|
||||||
#else
|
|
||||||
typedef ptrdiff_t GLsizeiptrARB;
|
typedef ptrdiff_t GLsizeiptrARB;
|
||||||
typedef ptrdiff_t GLintptrARB;
|
typedef ptrdiff_t GLintptrARB;
|
||||||
#endif
|
|
||||||
#define GL_BUFFER_SIZE_ARB 0x8764
|
#define GL_BUFFER_SIZE_ARB 0x8764
|
||||||
#define GL_BUFFER_USAGE_ARB 0x8765
|
#define GL_BUFFER_USAGE_ARB 0x8765
|
||||||
#define GL_ARRAY_BUFFER_ARB 0x8892
|
#define GL_ARRAY_BUFFER_ARB 0x8892
|
||||||
|
@ -5601,10 +5596,6 @@ GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLf
|
||||||
#define GL_AMD_shader_atomic_counter_ops 1
|
#define GL_AMD_shader_atomic_counter_ops 1
|
||||||
#endif /* GL_AMD_shader_atomic_counter_ops */
|
#endif /* GL_AMD_shader_atomic_counter_ops */
|
||||||
|
|
||||||
#ifndef GL_AMD_shader_explicit_vertex_parameter
|
|
||||||
#define GL_AMD_shader_explicit_vertex_parameter 1
|
|
||||||
#endif /* GL_AMD_shader_explicit_vertex_parameter */
|
|
||||||
|
|
||||||
#ifndef GL_AMD_shader_stencil_export
|
#ifndef GL_AMD_shader_stencil_export
|
||||||
#define GL_AMD_shader_stencil_export 1
|
#define GL_AMD_shader_stencil_export 1
|
||||||
#endif /* GL_AMD_shader_stencil_export */
|
#endif /* GL_AMD_shader_stencil_export */
|
||||||
|
@ -8645,20 +8636,6 @@ GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei s
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_EXT_vertex_weighting */
|
#endif /* GL_EXT_vertex_weighting */
|
||||||
|
|
||||||
#ifndef GL_EXT_window_rectangles
|
|
||||||
#define GL_EXT_window_rectangles 1
|
|
||||||
#define GL_INCLUSIVE_EXT 0x8F10
|
|
||||||
#define GL_EXCLUSIVE_EXT 0x8F11
|
|
||||||
#define GL_WINDOW_RECTANGLE_EXT 0x8F12
|
|
||||||
#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
|
|
||||||
#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
|
|
||||||
#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
|
|
||||||
typedef void (APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box);
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box);
|
|
||||||
#endif
|
|
||||||
#endif /* GL_EXT_window_rectangles */
|
|
||||||
|
|
||||||
#ifndef GL_EXT_x11_sync_object
|
#ifndef GL_EXT_x11_sync_object
|
||||||
#define GL_EXT_x11_sync_object 1
|
#define GL_EXT_x11_sync_object 1
|
||||||
#define GL_SYNC_X11_FENCE_EXT 0x90E1
|
#define GL_SYNC_X11_FENCE_EXT 0x90E1
|
||||||
|
@ -8836,11 +8813,6 @@ GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRG
|
||||||
#define GL_INTERLACE_READ_INGR 0x8568
|
#define GL_INTERLACE_READ_INGR 0x8568
|
||||||
#endif /* GL_INGR_interlace_read */
|
#endif /* GL_INGR_interlace_read */
|
||||||
|
|
||||||
#ifndef GL_INTEL_conservative_rasterization
|
|
||||||
#define GL_INTEL_conservative_rasterization 1
|
|
||||||
#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE
|
|
||||||
#endif /* GL_INTEL_conservative_rasterization */
|
|
||||||
|
|
||||||
#ifndef GL_INTEL_fragment_shader_ordering
|
#ifndef GL_INTEL_fragment_shader_ordering
|
||||||
#define GL_INTEL_fragment_shader_ordering 1
|
#define GL_INTEL_fragment_shader_ordering 1
|
||||||
#endif /* GL_INTEL_fragment_shader_ordering */
|
#endif /* GL_INTEL_fragment_shader_ordering */
|
||||||
|
@ -9157,17 +9129,6 @@ GLAPI void APIENTRY glBlendBarrierNV (void);
|
||||||
#define GL_NV_blend_square 1
|
#define GL_NV_blend_square 1
|
||||||
#endif /* GL_NV_blend_square */
|
#endif /* GL_NV_blend_square */
|
||||||
|
|
||||||
#ifndef GL_NV_clip_space_w_scaling
|
|
||||||
#define GL_NV_clip_space_w_scaling 1
|
|
||||||
#define GL_VIEWPORT_POSITION_W_SCALE_NV 0x937C
|
|
||||||
#define GL_VIEWPORT_POSITION_W_SCALE_X_COEFF_NV 0x937D
|
|
||||||
#define GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF_NV 0x937E
|
|
||||||
typedef void (APIENTRYP PFNGLVIEWPORTPOSITIONWSCALENVPROC) (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glViewportPositionWScaleNV (GLuint index, GLfloat xcoeff, GLfloat ycoeff);
|
|
||||||
#endif
|
|
||||||
#endif /* GL_NV_clip_space_w_scaling */
|
|
||||||
|
|
||||||
#ifndef GL_NV_command_list
|
#ifndef GL_NV_command_list
|
||||||
#define GL_NV_command_list 1
|
#define GL_NV_command_list 1
|
||||||
#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
|
#define GL_TERMINATE_SEQUENCE_COMMAND_NV 0x0000
|
||||||
|
@ -9270,17 +9231,6 @@ GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat valu
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_NV_conservative_raster_dilate */
|
#endif /* GL_NV_conservative_raster_dilate */
|
||||||
|
|
||||||
#ifndef GL_NV_conservative_raster_pre_snap_triangles
|
|
||||||
#define GL_NV_conservative_raster_pre_snap_triangles 1
|
|
||||||
#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D
|
|
||||||
#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E
|
|
||||||
#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F
|
|
||||||
typedef void (APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param);
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param);
|
|
||||||
#endif
|
|
||||||
#endif /* GL_NV_conservative_raster_pre_snap_triangles */
|
|
||||||
|
|
||||||
#ifndef GL_NV_copy_depth_to_color
|
#ifndef GL_NV_copy_depth_to_color
|
||||||
#define GL_NV_copy_depth_to_color 1
|
#define GL_NV_copy_depth_to_color 1
|
||||||
#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
|
#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
|
||||||
|
@ -10273,11 +10223,6 @@ GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname,
|
||||||
#endif
|
#endif
|
||||||
#endif /* GL_NV_register_combiners2 */
|
#endif /* GL_NV_register_combiners2 */
|
||||||
|
|
||||||
#ifndef GL_NV_robustness_video_memory_purge
|
|
||||||
#define GL_NV_robustness_video_memory_purge 1
|
|
||||||
#define GL_PURGED_CONTEXT_RESET_NV 0x92BB
|
|
||||||
#endif /* GL_NV_robustness_video_memory_purge */
|
|
||||||
|
|
||||||
#ifndef GL_NV_sample_locations
|
#ifndef GL_NV_sample_locations
|
||||||
#define GL_NV_sample_locations 1
|
#define GL_NV_sample_locations 1
|
||||||
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
|
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
|
||||||
|
@ -10310,10 +10255,6 @@ GLAPI void APIENTRY glResolveDepthValuesNV (void);
|
||||||
#define GL_NV_shader_atomic_float 1
|
#define GL_NV_shader_atomic_float 1
|
||||||
#endif /* GL_NV_shader_atomic_float */
|
#endif /* GL_NV_shader_atomic_float */
|
||||||
|
|
||||||
#ifndef GL_NV_shader_atomic_float64
|
|
||||||
#define GL_NV_shader_atomic_float64 1
|
|
||||||
#endif /* GL_NV_shader_atomic_float64 */
|
|
||||||
|
|
||||||
#ifndef GL_NV_shader_atomic_fp16_vector
|
#ifndef GL_NV_shader_atomic_fp16_vector
|
||||||
#define GL_NV_shader_atomic_fp16_vector 1
|
#define GL_NV_shader_atomic_fp16_vector 1
|
||||||
#endif /* GL_NV_shader_atomic_fp16_vector */
|
#endif /* GL_NV_shader_atomic_fp16_vector */
|
||||||
|
@ -10377,10 +10318,6 @@ GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLs
|
||||||
#define GL_NV_shader_thread_shuffle 1
|
#define GL_NV_shader_thread_shuffle 1
|
||||||
#endif /* GL_NV_shader_thread_shuffle */
|
#endif /* GL_NV_shader_thread_shuffle */
|
||||||
|
|
||||||
#ifndef GL_NV_stereo_view_rendering
|
|
||||||
#define GL_NV_stereo_view_rendering 1
|
|
||||||
#endif /* GL_NV_stereo_view_rendering */
|
|
||||||
|
|
||||||
#ifndef GL_NV_tessellation_program5
|
#ifndef GL_NV_tessellation_program5
|
||||||
#define GL_NV_tessellation_program5 1
|
#define GL_NV_tessellation_program5 1
|
||||||
#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
|
#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8
|
||||||
|
@ -11151,26 +11088,6 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot
|
||||||
#define GL_NV_viewport_array2 1
|
#define GL_NV_viewport_array2 1
|
||||||
#endif /* GL_NV_viewport_array2 */
|
#endif /* GL_NV_viewport_array2 */
|
||||||
|
|
||||||
#ifndef GL_NV_viewport_swizzle
|
|
||||||
#define GL_NV_viewport_swizzle 1
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A
|
|
||||||
#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B
|
|
||||||
typedef void (APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
|
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
|
||||||
GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew);
|
|
||||||
#endif
|
|
||||||
#endif /* GL_NV_viewport_swizzle */
|
|
||||||
|
|
||||||
#ifndef GL_OML_interlace
|
#ifndef GL_OML_interlace
|
||||||
#define GL_OML_interlace 1
|
#define GL_OML_interlace 1
|
||||||
#define GL_INTERLACE_OML 0x8980
|
#define GL_INTERLACE_OML 0x8980
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,10 +33,10 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 32889 $ on $Date: 2016-05-31 07:09:51 -0400 (Tue, 31 May 2016) $
|
** Khronos $Revision: 31597 $ on $Date: 2015-06-25 16:32:35 -0400 (Thu, 25 Jun 2015) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GLX_GLXEXT_VERSION 20160531
|
#define GLX_GLXEXT_VERSION 20150623
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: glx
|
* API: glx
|
||||||
|
@ -317,11 +317,6 @@ void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||||
#endif
|
#endif
|
||||||
#endif /* GLX_EXT_import_context */
|
#endif /* GLX_EXT_import_context */
|
||||||
|
|
||||||
#ifndef GLX_EXT_libglvnd
|
|
||||||
#define GLX_EXT_libglvnd 1
|
|
||||||
#define GLX_VENDOR_NAMES_EXT 0x20F6
|
|
||||||
#endif /* GLX_EXT_libglvnd */
|
|
||||||
|
|
||||||
#ifndef GLX_EXT_stereo_tree
|
#ifndef GLX_EXT_stereo_tree
|
||||||
#define GLX_EXT_stereo_tree 1
|
#define GLX_EXT_stereo_tree 1
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -548,11 +543,6 @@ int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int vi
|
||||||
#endif
|
#endif
|
||||||
#endif /* GLX_NV_present_video */
|
#endif /* GLX_NV_present_video */
|
||||||
|
|
||||||
#ifndef GLX_NV_robustness_video_memory_purge
|
|
||||||
#define GLX_NV_robustness_video_memory_purge 1
|
|
||||||
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
|
|
||||||
#endif /* GLX_NV_robustness_video_memory_purge */
|
|
||||||
|
|
||||||
#ifndef GLX_NV_swap_group
|
#ifndef GLX_NV_swap_group
|
||||||
#define GLX_NV_swap_group 1
|
#define GLX_NV_swap_group 1
|
||||||
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||||
|
|
|
@ -6,7 +6,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||||
**
|
**
|
||||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
** copy of this software and/or associated documentation files (the
|
** copy of this software and/or associated documentation files (the
|
||||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
** used to make the header, and the header can be found at
|
** used to make the header, and the header can be found at
|
||||||
** http://www.opengl.org/registry/
|
** http://www.opengl.org/registry/
|
||||||
**
|
**
|
||||||
** Khronos $Revision: 32686 $ on $Date: 2016-04-19 21:08:44 -0400 (Tue, 19 Apr 2016) $
|
** Khronos $Revision: 31597 $ on $Date: 2015-06-25 16:32:35 -0400 (Thu, 25 Jun 2015) $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||||
|
@ -41,7 +41,7 @@ extern "C" {
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WGL_WGLEXT_VERSION 20160419
|
#define WGL_WGLEXT_VERSION 20150623
|
||||||
|
|
||||||
/* Generated C header for:
|
/* Generated C header for:
|
||||||
* API: wgl
|
* API: wgl
|
||||||
|
|
|
@ -196,6 +196,18 @@ CDriverGL::CDriverGL()
|
||||||
_backBufferHeight = 0;
|
_backBufferHeight = 0;
|
||||||
_backBufferWidth = 0;
|
_backBufferWidth = 0;
|
||||||
|
|
||||||
|
// autorelease pool for memory management
|
||||||
|
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
// init the application object
|
||||||
|
[NSApplication sharedApplication];
|
||||||
|
|
||||||
|
// create the menu in the top screen bar
|
||||||
|
setupApplicationMenu();
|
||||||
|
|
||||||
|
// finish the application launching
|
||||||
|
[NSApp finishLaunching];
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
_dpy = 0;
|
_dpy = 0;
|
||||||
|
@ -361,6 +373,10 @@ CDriverGL::~CDriverGL()
|
||||||
{
|
{
|
||||||
H_AUTO_OGL(CDriverGL_CDriverGLDtor)
|
H_AUTO_OGL(CDriverGL_CDriverGLDtor)
|
||||||
release();
|
release();
|
||||||
|
|
||||||
|
#if defined(NL_OS_MAC)
|
||||||
|
[_autoreleasePool release];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -622,7 +638,7 @@ bool CDriverGL::setupDisplay()
|
||||||
checkForPerPixelLightingSupport();
|
checkForPerPixelLightingSupport();
|
||||||
|
|
||||||
#ifndef USE_OPENGLES
|
#ifndef USE_OPENGLES
|
||||||
// if EXTVertexShader is used, bind the standard GL arrays, and allocate constant
|
// if EXTVertexShader is used, bind the standard GL arrays, and allocate constant
|
||||||
if (!_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram && _Extensions.EXTVertexShader)
|
if (!_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram && _Extensions.EXTVertexShader)
|
||||||
{
|
{
|
||||||
_EVSPositionHandle = nglBindParameterEXT(GL_CURRENT_VERTEX_EXT);
|
_EVSPositionHandle = nglBindParameterEXT(GL_CURRENT_VERTEX_EXT);
|
||||||
|
@ -660,8 +676,8 @@ bool CDriverGL::setupDisplay()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Get initial VBL interval
|
// Reset the vbl interval
|
||||||
_Interval = getSwapVBLInterval();
|
setSwapVBLInterval(_Interval);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -926,6 +942,13 @@ bool CDriverGL::swapBuffers()
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
|
// TODO: maybe do this somewhere else?
|
||||||
|
if(_DestroyWindow)
|
||||||
|
{
|
||||||
|
[_autoreleasePool release];
|
||||||
|
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
[_ctx flushBuffer];
|
[_ctx flushBuffer];
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
@ -2265,22 +2288,16 @@ void CDriverGL::setSwapVBLInterval(uint interval)
|
||||||
H_AUTO_OGL(CDriverGL_setSwapVBLInterval);
|
H_AUTO_OGL(CDriverGL_setSwapVBLInterval);
|
||||||
|
|
||||||
if (!_Initialized)
|
if (!_Initialized)
|
||||||
{
|
|
||||||
nlwarning("OpenGL driver not initialized when calling setSwapVBLInterval");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
|
||||||
// don't try to change VBL if interval didn't change
|
|
||||||
if (_Interval == interval) return;
|
|
||||||
|
|
||||||
#ifdef USE_OPENGLES
|
#ifdef USE_OPENGLES
|
||||||
res = eglSwapInterval(_EglDisplay, interval) == EGL_TRUE;
|
res = eglSwapInterval(_EglDisplay, _Interval) == EGL_TRUE;
|
||||||
#elif defined(NL_OS_WINDOWS)
|
#elif defined(NL_OS_WINDOWS)
|
||||||
if(_Extensions.WGLEXTSwapControl)
|
if(_Extensions.WGLEXTSwapControl)
|
||||||
{
|
{
|
||||||
res = nwglSwapIntervalEXT(interval) == TRUE;
|
res = nwglSwapIntervalEXT(_Interval) == TRUE;
|
||||||
}
|
}
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
[_ctx setValues:(GLint*)&interval forParameter:NSOpenGLCPSwapInterval];
|
[_ctx setValues:(GLint*)&interval forParameter:NSOpenGLCPSwapInterval];
|
||||||
|
|
|
@ -1676,7 +1676,7 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
// Check pixel program
|
// Check pixel program
|
||||||
// Disable feature ???
|
// Disable feature ???
|
||||||
if (!ext.DisableHardwarePixelProgram)
|
if (!ext.DisableHardwarePixelProgram)
|
||||||
{
|
{
|
||||||
ext.ARBFragmentProgram = setupARBFragmentProgram(glext);
|
ext.ARBFragmentProgram = setupARBFragmentProgram(glext);
|
||||||
ext.NVFragmentProgram2 = setupNVFragmentProgram2(glext);
|
ext.NVFragmentProgram2 = setupNVFragmentProgram2(glext);
|
||||||
ext.ARBFragmentShader = setupARBFragmentShader(glext);
|
ext.ARBFragmentShader = setupARBFragmentShader(glext);
|
||||||
|
@ -1685,7 +1685,6 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
{
|
{
|
||||||
ext.ARBFragmentProgram = false;
|
ext.ARBFragmentProgram = false;
|
||||||
ext.NVFragmentProgram2 = false;
|
ext.NVFragmentProgram2 = false;
|
||||||
ext.ARBFragmentShader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.OESDrawTexture = setupOESDrawTexture(glext);
|
ext.OESDrawTexture = setupOESDrawTexture(glext);
|
||||||
|
@ -1992,32 +1991,24 @@ bool registerWGlExtensions(CGlExtensions &ext, HDC hDC)
|
||||||
|
|
||||||
if (ext.WGLNVGPUAffinity)
|
if (ext.WGLNVGPUAffinity)
|
||||||
{
|
{
|
||||||
uint gpuIndex = 0;
|
uint i = 0;
|
||||||
|
|
||||||
HGPUNV hGPU;
|
HGPUNV hGPU;
|
||||||
|
|
||||||
// list all GPUs
|
while(nwglEnumGpusNV(i, &hGPU))
|
||||||
while (nwglEnumGpusNV(gpuIndex, &hGPU))
|
|
||||||
{
|
{
|
||||||
uint j = 0;
|
uint j = 0;
|
||||||
|
|
||||||
_GPU_DEVICE gpuDevice;
|
PGPU_DEVICE lpGpuDevice = NULL;
|
||||||
gpuDevice.cb = sizeof(gpuDevice);
|
|
||||||
|
|
||||||
// list all devices connected to GPU
|
while(nwglEnumGpuDevicesNV(hGPU, j, lpGpuDevice))
|
||||||
while(nwglEnumGpuDevicesNV(hGPU, j, &gpuDevice))
|
|
||||||
{
|
{
|
||||||
nlinfo("Device: %s / %s / flags: %u", gpuDevice.DeviceName, gpuDevice.DeviceString, (uint)gpuDevice.Flags);
|
nlinfo("Device: %s - %s - flags: %u", lpGpuDevice->DeviceName, lpGpuDevice->DeviceString, lpGpuDevice->Flags);
|
||||||
|
|
||||||
if (gpuDevice.Flags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)
|
|
||||||
{
|
|
||||||
nlinfo("Virtual screen: (%d,%d)-(%d,%d)", (sint)gpuDevice.rcVirtualScreen.left, (sint)gpuDevice.rcVirtualScreen.top, (sint)gpuDevice.rcVirtualScreen.right, (sint)gpuDevice.rcVirtualScreen.bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
++j;
|
++j;
|
||||||
}
|
}
|
||||||
|
|
||||||
++gpuIndex;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,14 +343,9 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc)
|
||||||
retrieveATIDriverVersion();
|
retrieveATIDriverVersion();
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
|
// nothing to do
|
||||||
nlunreferenced(windowIcon);
|
nlunreferenced(windowIcon);
|
||||||
|
|
||||||
// autorelease pool for memory management
|
|
||||||
_autoreleasePool = [[NSAutoreleasePool alloc] init];
|
|
||||||
|
|
||||||
// init the application object
|
|
||||||
[NSApplication sharedApplication];
|
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
nlunreferenced(windowIcon);
|
nlunreferenced(windowIcon);
|
||||||
|
@ -490,7 +485,7 @@ bool CDriverGL::unInit()
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
[_autoreleasePool release];
|
// nothing to do
|
||||||
|
|
||||||
#elif defined (NL_OS_UNIX)
|
#elif defined (NL_OS_UNIX)
|
||||||
|
|
||||||
|
@ -1459,7 +1454,7 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
pos = 0;
|
pos = 0;
|
||||||
hwndParent = NULL;
|
hwndParent = NULL;
|
||||||
}
|
}
|
||||||
window = CreateWindowW(L"NLClass", L"NeL Window", dwStyle,
|
window = CreateWindowW(L"NLClass", L"NeL Window", dwStyle,
|
||||||
pos, pos, mode.Width, mode.Height, hwndParent, NULL, GetModuleHandle(NULL), NULL);
|
pos, pos, mode.Width, mode.Height, hwndParent, NULL, GetModuleHandle(NULL), NULL);
|
||||||
|
|
||||||
if (window == EmptyWindow)
|
if (window == EmptyWindow)
|
||||||
|
@ -1471,12 +1466,6 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
// create the menu in the top screen bar
|
|
||||||
setupApplicationMenu();
|
|
||||||
|
|
||||||
// finish the application launching
|
|
||||||
[NSApp finishLaunching];
|
|
||||||
|
|
||||||
// describe how the window should look like and behave
|
// describe how the window should look like and behave
|
||||||
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
||||||
NSMiniaturizableWindowMask | NSResizableWindowMask;
|
NSMiniaturizableWindowMask | NSResizableWindowMask;
|
||||||
|
@ -1497,7 +1486,7 @@ bool CDriverGL::createWindow(const GfxMode &mode)
|
||||||
[[CocoaApplicationDelegate alloc] initWithDriver:this];
|
[[CocoaApplicationDelegate alloc] initWithDriver:this];
|
||||||
|
|
||||||
// set the application delegate, this will handle window/app close events
|
// set the application delegate, this will handle window/app close events
|
||||||
[NSApp setDelegate:(id<NSApplicationDelegate>)appDelegate];
|
[NSApp setDelegate:(id<NSFileManagerDelegate>)appDelegate];
|
||||||
|
|
||||||
// bind the close button of the window to applicationShouldTerminate
|
// bind the close button of the window to applicationShouldTerminate
|
||||||
id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton];
|
id closeButton = [cocoa_window standardWindowButton:NSWindowCloseButton];
|
||||||
|
@ -1653,7 +1642,6 @@ bool CDriverGL::destroyWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
#elif defined(NL_OS_UNIX)
|
#elif defined(NL_OS_UNIX)
|
||||||
|
|
||||||
if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well
|
if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well
|
||||||
|
@ -2311,10 +2299,7 @@ void CDriverGL::setWindowTitle(const ucstring &title)
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
|
|
||||||
if (!SetWindowTextW(_win, (WCHAR*)title.c_str()))
|
SetWindowTextW(_win, (WCHAR*)title.c_str());
|
||||||
{
|
|
||||||
nlwarning("SetWindowText failed: %s", formatErrorMessage(getLastError()).c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
||||||
|
|
|
@ -153,9 +153,9 @@ bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
|
||||||
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
||||||
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
|
NSArray *classArray = [NSArray arrayWithObject:[NSString class]];
|
||||||
NSDictionary *options = [NSDictionary dictionary];
|
NSDictionary *options = [NSDictionary dictionary];
|
||||||
|
|
||||||
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
|
BOOL ok = [pasteboard canReadObjectForClasses:classArray options:options];
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
|
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
|
||||||
NSString *nstext = [objectsToPaste objectAtIndex:0];
|
NSString *nstext = [objectsToPaste objectAtIndex:0];
|
||||||
|
@ -264,8 +264,8 @@ bool CCocoaEventEmitter::processMessage(NSEvent* event, CEventServer* server)
|
||||||
mousePos.y /= (float)viewRect.size.height;
|
mousePos.y /= (float)viewRect.size.height;
|
||||||
|
|
||||||
// if the mouse event was placed outside the view, don't tell NeL :)
|
// if the mouse event was placed outside the view, don't tell NeL :)
|
||||||
if((mousePos.x < 0.0 || mousePos.x > 1.0 ||
|
if((mousePos.x < 0.0 || mousePos.x > 1.0 ||
|
||||||
mousePos.y < 0.0 || mousePos.y > 1.0) &&
|
mousePos.y < 0.0 || mousePos.y > 1.0) &&
|
||||||
event.type != NSKeyDown && event.type != NSKeyUp)
|
event.type != NSKeyDown && event.type != NSKeyUp)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -415,7 +415,7 @@ typedef bool (*cocoaProc)(NL3D::IDriver*, const void* e);
|
||||||
|
|
||||||
void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
||||||
{
|
{
|
||||||
// break if there was no event to handle
|
// break if there was no event to handle
|
||||||
// if running embedded in e.g. qt, _eventLoop will be false
|
// if running embedded in e.g. qt, _eventLoop will be false
|
||||||
while(_eventLoop)
|
while(_eventLoop)
|
||||||
{
|
{
|
||||||
|
@ -442,15 +442,8 @@ void CCocoaEventEmitter::submitEvents(CEventServer& server, bool /* allWins */)
|
||||||
processMessage(event, &server);
|
processMessage(event, &server);
|
||||||
}
|
}
|
||||||
|
|
||||||
@try
|
// forward the event to the cocoa application
|
||||||
{
|
[NSApp sendEvent:event];
|
||||||
// forward the event to the cocoa application
|
|
||||||
[NSApp sendEvent:event];
|
|
||||||
}
|
|
||||||
@catch(NSException *e)
|
|
||||||
{
|
|
||||||
nlwarning("Exception when sending event: %s", [[e reason] UTF8String]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_server = &server;
|
_server = &server;
|
||||||
|
|
|
@ -25,7 +25,7 @@ BEGIN
|
||||||
VALUE "OriginalFilename", "nel_drv_opengl_win_d.dll"
|
VALUE "OriginalFilename", "nel_drv_opengl_win_d.dll"
|
||||||
#else
|
#else
|
||||||
VALUE "OriginalFilename", "nel_drv_opengl_win_r.dll"
|
VALUE "OriginalFilename", "nel_drv_opengl_win_r.dll"
|
||||||
#endif
|
#endif
|
||||||
VALUE "ProductName", "Ryzom Core"
|
VALUE "ProductName", "Ryzom Core"
|
||||||
VALUE "ProductVersion", NL_VERSION
|
VALUE "ProductVersion", NL_VERSION
|
||||||
END
|
END
|
||||||
|
|
|
@ -528,7 +528,7 @@ void CDRU::drawTrianglesUnlit(const NLMISC::CTriangleUV *trilist, sint ntris,
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDRU::drawTrianglesUnlit(const std::vector<NLMISC::CTriangleUV> &trilist, CMaterial &mat, IDriver& driver)
|
void CDRU::drawTrianglesUnlit(const std::vector<NLMISC::CTriangleUV> &trilist, CMaterial &mat, IDriver& driver)
|
||||||
{
|
{
|
||||||
if(trilist.empty())
|
if(trilist.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CDRU::drawTrianglesUnlit( &(*trilist.begin()), (uint)trilist.size(), mat, driver);
|
CDRU::drawTrianglesUnlit( &(*trilist.begin()), (uint)trilist.size(), mat, driver);
|
||||||
|
@ -570,7 +570,7 @@ void CDRU::drawLinesUnlit(const NLMISC::CLine *linelist, sint nlines, CMateria
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CDRU::drawLinesUnlit(const std::vector<NLMISC::CLine> &linelist, CMaterial &mat, IDriver& driver)
|
void CDRU::drawLinesUnlit(const std::vector<NLMISC::CLine> &linelist, CMaterial &mat, IDriver& driver)
|
||||||
{
|
{
|
||||||
if(linelist.empty())
|
if(linelist.size()==0)
|
||||||
return;
|
return;
|
||||||
CDRU::drawLinesUnlit( &(*linelist.begin()), (sint)linelist.size(), mat, driver);
|
CDRU::drawLinesUnlit( &(*linelist.begin()), (sint)linelist.size(), mat, driver);
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,7 +457,7 @@ CFontGenerator::CFontGenerator (const std::string &fontFileName, const std::stri
|
||||||
nlerror ("FT_New_Face() failed with file '%s': %s", fontFileName.c_str(), getFT2Error(error));
|
nlerror ("FT_New_Face() failed with file '%s': %s", fontFileName.c_str(), getFT2Error(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fontExFileName.empty())
|
if (fontExFileName != "")
|
||||||
{
|
{
|
||||||
error = FT_Attach_File (_Face, fontExFileName.c_str ());
|
error = FT_Attach_File (_Face, fontExFileName.c_str ());
|
||||||
if (error)
|
if (error)
|
||||||
|
|
|
@ -1831,9 +1831,9 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
textName= tile->getRelativeFileName(CTile::additive);
|
textName= tile->getRelativeFileName(CTile::additive);
|
||||||
else
|
else
|
||||||
textName.clear();
|
textName= "";
|
||||||
// If no additive for this tile, rdrpass is NULL.
|
// If no additive for this tile, rdrpass is NULL.
|
||||||
if(textName.empty())
|
if(textName=="")
|
||||||
tileInfo->AdditiveRdrPass= NULL;
|
tileInfo->AdditiveRdrPass= NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1844,7 +1844,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
|
|
||||||
// We may have an alpha part for additive.
|
// We may have an alpha part for additive.
|
||||||
textName= tile->getRelativeFileName (CTile::alpha);
|
textName= tile->getRelativeFileName (CTile::alpha);
|
||||||
if(!textName.empty())
|
if(textName!="")
|
||||||
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
||||||
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
||||||
|
|
||||||
|
@ -1866,7 +1866,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
{
|
{
|
||||||
textName= tile->getRelativeFileName(CTile::diffuse);
|
textName= tile->getRelativeFileName(CTile::diffuse);
|
||||||
if(!textName.empty())
|
if(textName!="")
|
||||||
// Avoid using Clamp for diffuse, because of recent NVidia GL drivers Bugs in 77.72
|
// Avoid using Clamp for diffuse, because of recent NVidia GL drivers Bugs in 77.72
|
||||||
pass.TextureDiffuse= findTileTexture(TileBank.getAbsPath()+textName, false);
|
pass.TextureDiffuse= findTileTexture(TileBank.getAbsPath()+textName, false);
|
||||||
else
|
else
|
||||||
|
@ -1880,7 +1880,7 @@ void CLandscape::loadTile(uint16 tileId)
|
||||||
if(tile)
|
if(tile)
|
||||||
{
|
{
|
||||||
textName= tile->getRelativeFileName (CTile::alpha);
|
textName= tile->getRelativeFileName (CTile::alpha);
|
||||||
if(!textName.empty())
|
if(textName!="")
|
||||||
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
// Must Use clamp for alpha (although NVidia drivers are buggy), because the texture doesn't tile at all
|
||||||
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
pass.TextureAlpha= findTileTexture(TileBank.getAbsPath()+textName, true);
|
||||||
}
|
}
|
||||||
|
@ -2859,7 +2859,7 @@ void CLandscape::setupAutomaticLightDir(const CVector &lightDir)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CVector CLandscape::getHeightFieldDeltaZ(float x, float y) const
|
CVector CLandscape::getHeightFieldDeltaZ(float x, float y) const
|
||||||
{
|
{
|
||||||
if(_HeightField.ZPatchs.empty())
|
if(_HeightField.ZPatchs.size()==0)
|
||||||
return CVector::Null;
|
return CVector::Null;
|
||||||
|
|
||||||
// map to _HeightField coordinates.
|
// map to _HeightField coordinates.
|
||||||
|
|
|
@ -213,9 +213,9 @@ void CLandscapeUser::refreshAllZonesAround(const CVector &pos, float radius, std
|
||||||
refreshZonesAround (pos, radius, za, zr);
|
refreshZonesAround (pos, radius, za, zr);
|
||||||
|
|
||||||
// some zone added or removed??
|
// some zone added or removed??
|
||||||
if(!za.empty())
|
if(za != "")
|
||||||
zonesAdded.push_back(za);
|
zonesAdded.push_back(za);
|
||||||
if(!zr.empty())
|
if(zr != "")
|
||||||
zonesRemoved.push_back(zr);
|
zonesRemoved.push_back(zr);
|
||||||
|
|
||||||
_ZoneManager.checkZonesAround ((uint)pos.x, (uint)(-pos.y), (uint)radius);
|
_ZoneManager.checkZonesAround ((uint)pos.x, (uint)(-pos.y), (uint)radius);
|
||||||
|
|
|
@ -174,7 +174,7 @@ UInstanceGroup *CLandscapeIGManager::loadZoneIG(const std::string &name)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LAND_MNGR_LOAD_ZONEIG
|
NL3D_HAUTO_LAND_MNGR_LOAD_ZONEIG
|
||||||
|
|
||||||
if(name.empty())
|
if(name=="")
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -232,7 +232,7 @@ void CLandscapeIGManager::unloadArrayZoneIG(const std::vector<std::string> &name
|
||||||
void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
||||||
{
|
{
|
||||||
NL3D_HAUTO_LAND_MNGR_UNLOAD_ZONEIG
|
NL3D_HAUTO_LAND_MNGR_UNLOAD_ZONEIG
|
||||||
if(name.empty())
|
if(name=="")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -255,7 +255,7 @@ void CLandscapeIGManager::unloadZoneIG(const std::string &name)
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
||||||
{
|
{
|
||||||
if(name.empty())
|
if(name=="")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
@ -272,7 +272,7 @@ bool CLandscapeIGManager::isIGAddedToScene(const std::string &name) const
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
UInstanceGroup *CLandscapeIGManager::getIG(const std::string &name) const
|
UInstanceGroup *CLandscapeIGManager::getIG(const std::string &name) const
|
||||||
{
|
{
|
||||||
if(name.empty())
|
if(name=="")
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// try to find this InstanceGroup.
|
// try to find this InstanceGroup.
|
||||||
|
|
|
@ -134,7 +134,7 @@ void CLandscapeVBAllocator::resetReallocation()
|
||||||
uint CLandscapeVBAllocator::allocateVertex()
|
uint CLandscapeVBAllocator::allocateVertex()
|
||||||
{
|
{
|
||||||
// if no more free, allocate.
|
// if no more free, allocate.
|
||||||
if( _VertexFreeMemory.empty() )
|
if( _VertexFreeMemory.size()==0 )
|
||||||
{
|
{
|
||||||
// enlarge capacity.
|
// enlarge capacity.
|
||||||
uint newResize;
|
uint newResize;
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace NL3D
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(!Vertices.empty());
|
nlassert(Vertices.size());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
||||||
sint i;
|
sint i;
|
||||||
|
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.empty() || m.Faces.empty())
|
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
||||||
{
|
{
|
||||||
_VBuffer.setNumVertices(0);
|
_VBuffer.setNumVertices(0);
|
||||||
_VBuffer.setName("CMeshGeom");
|
_VBuffer.setName("CMeshGeom");
|
||||||
|
@ -436,7 +436,7 @@ void CMeshGeom::build (CMesh::CMeshBuild &m, uint numMaxMaterial)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the vertex buffer preferred memory
|
// Set the vertex buffer preferred memory
|
||||||
bool avoidVBHard= _Skinned || ( _MeshMorpher && !_MeshMorpher->BlendShapes.empty() );
|
bool avoidVBHard= _Skinned || ( _MeshMorpher && _MeshMorpher->BlendShapes.size()>0 );
|
||||||
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
||||||
|
|
||||||
// End!!
|
// End!!
|
||||||
|
@ -638,7 +638,7 @@ void CMeshGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount,
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.empty())
|
if(mBlock.RdrPass.size()==0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Global alpha ?
|
// Global alpha ?
|
||||||
|
@ -790,7 +790,7 @@ void CMeshGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.empty())
|
if(mBlock.RdrPass.size()==0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Render all pass.
|
// Render all pass.
|
||||||
|
@ -840,7 +840,7 @@ void CMeshGeom::renderSimpleWithMaterial(IDriver *drv, const CMatrix &worldMatri
|
||||||
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
for(uint mb=0;mb<_MatrixBlocks.size();mb++)
|
||||||
{
|
{
|
||||||
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
CMatrixBlock &mBlock= _MatrixBlocks[mb];
|
||||||
if(mBlock.RdrPass.empty())
|
if(mBlock.RdrPass.size()==0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Render all pass.
|
// Render all pass.
|
||||||
|
@ -998,10 +998,10 @@ void CMeshGeom::compileRunTime()
|
||||||
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
||||||
|
|
||||||
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
||||||
bool supportMeshBlockRendering= !_Skinned && _MeshMorpher->BlendShapes.empty();
|
bool supportMeshBlockRendering= !_Skinned && _MeshMorpher->BlendShapes.size()==0;
|
||||||
|
|
||||||
// true only if one matrix block, and at least one rdrPass.
|
// true only if one matrix block, and at least one rdrPass.
|
||||||
supportMeshBlockRendering= supportMeshBlockRendering && _MatrixBlocks.size()==1 && !_MatrixBlocks[0].RdrPass.empty();
|
supportMeshBlockRendering= supportMeshBlockRendering && _MatrixBlocks.size()==1 && _MatrixBlocks[0].RdrPass.size()>0;
|
||||||
if (supportMeshBlockRendering && _MeshVertexProgram)
|
if (supportMeshBlockRendering && _MeshVertexProgram)
|
||||||
{
|
{
|
||||||
supportMeshBlockRendering = supportMeshBlockRendering && _MeshVertexProgram->supportMeshBlockRendering();
|
supportMeshBlockRendering = supportMeshBlockRendering && _MeshVertexProgram->supportMeshBlockRendering();
|
||||||
|
@ -1021,7 +1021,7 @@ void CMeshGeom::compileRunTime()
|
||||||
if(supportMBRPerMaterial)
|
if(supportMBRPerMaterial)
|
||||||
_SupportMBRFlags|= MBRSortPerMaterial;
|
_SupportMBRFlags|= MBRSortPerMaterial;
|
||||||
|
|
||||||
bool avoidVBHard= _Skinned || ( _MeshMorpher && !_MeshMorpher->BlendShapes.empty() );
|
bool avoidVBHard= _Skinned || ( _MeshMorpher && _MeshMorpher->BlendShapes.size()>0 );
|
||||||
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
_VBuffer.setPreferredMemory (avoidVBHard?CVertexBuffer::RAMPreferred:CVertexBuffer::StaticPreferred, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,10 +407,9 @@ void CMeshMorpher::updateRawSkin (CVertexBuffer *vbOri,
|
||||||
rFactor*= 0.01f;
|
rFactor*= 0.01f;
|
||||||
uint32 numVertices= (uint32)rBS.VertRefs.size();
|
uint32 numVertices= (uint32)rBS.VertRefs.size();
|
||||||
// don't know why, but cases happen where deltaNorm not empty while deltaPos is
|
// don't know why, but cases happen where deltaNorm not empty while deltaPos is
|
||||||
bool hasPos = !rBS.deltaPos.empty();
|
bool hasPos= rBS.deltaPos.size()>0;
|
||||||
bool hasNorm = !rBS.deltaNorm.empty();
|
bool hasNorm= rBS.deltaNorm.size()>0;
|
||||||
bool hasUV = !rBS.deltaUV.empty();
|
bool hasUV= rBS.deltaUV.size()>0;
|
||||||
|
|
||||||
for (j = 0; j < numVertices; ++j)
|
for (j = 0; j < numVertices; ++j)
|
||||||
{
|
{
|
||||||
// Get the vertex Index in the VBufferFinal
|
// Get the vertex Index in the VBufferFinal
|
||||||
|
|
|
@ -180,7 +180,7 @@ void CMeshMRMGeom::CLod::optimizeTriangleOrder()
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(!Vertices.empty());
|
nlassert(Vertices.size());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +236,7 @@ void CMeshMRMGeom::build(CMesh::CMeshBuild &m, std::vector<CMesh::CMeshBuild*>
|
||||||
uint numMaxMaterial, const CMRMParameters ¶ms)
|
uint numMaxMaterial, const CMRMParameters ¶ms)
|
||||||
{
|
{
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.empty() || m.Faces.empty())
|
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
||||||
{
|
{
|
||||||
_VBufferFinal.setNumVertices(0);
|
_VBufferFinal.setNumVertices(0);
|
||||||
_VBufferFinal.reserve(0);
|
_VBufferFinal.reserve(0);
|
||||||
|
@ -308,7 +308,7 @@ void CMeshMRMGeom::build(CMesh::CMeshBuild &m, std::vector<CMesh::CMeshBuild*>
|
||||||
_LevelDetail.MaxFaceUsed= 0;
|
_LevelDetail.MaxFaceUsed= 0;
|
||||||
_LevelDetail.MinFaceUsed= 0;
|
_LevelDetail.MinFaceUsed= 0;
|
||||||
// Count of primitive block
|
// Count of primitive block
|
||||||
if (!_Lods.empty())
|
if(_Lods.size()>0)
|
||||||
{
|
{
|
||||||
uint pb;
|
uint pb;
|
||||||
// Compute MinFaces.
|
// Compute MinFaces.
|
||||||
|
@ -469,7 +469,7 @@ void CMeshMRMGeom::applyGeomorph(std::vector<CMRMWedgeGeom> &geoms, float alpha
|
||||||
void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod, uint8 *vertexDestPtr)
|
void CMeshMRMGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod, uint8 *vertexDestPtr)
|
||||||
{
|
{
|
||||||
// no geomorphs? quit.
|
// no geomorphs? quit.
|
||||||
if(geoms.empty())
|
if(geoms.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clamp(alphaLod, 0.f, 1.f);
|
clamp(alphaLod, 0.f, 1.f);
|
||||||
|
@ -900,7 +900,7 @@ inline sint CMeshMRMGeom::chooseLod(float alphaMRM, float &alphaLod)
|
||||||
void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
if(_Lods.empty())
|
if(_Lods.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -922,7 +922,7 @@ void CMeshMRMGeom::render(IDriver *drv, CTransformShape *trans, float polygonCou
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.empty())
|
if(lod.RdrPass.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1104,7 +1104,7 @@ void CMeshMRMGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
{
|
{
|
||||||
H_AUTO( NL3D_MeshMRMGeom_renderSkin );
|
H_AUTO( NL3D_MeshMRMGeom_renderSkin );
|
||||||
|
|
||||||
if(_Lods.empty())
|
if(_Lods.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1126,7 +1126,7 @@ void CMeshMRMGeom::renderSkin(CTransformShape *trans, float alphaMRM)
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.empty())
|
if(lod.RdrPass.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ sint CMeshMRMGeom::renderSkinGroupGeom(CMeshMRMInstance *mi, float alphaMRM, uin
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.empty())
|
if(lod.RdrPass.size()==0)
|
||||||
// return no vertices added
|
// return no vertices added
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1942,7 +1942,7 @@ void CMeshMRMGeom::loadFirstLod(NLMISC::IStream &f)
|
||||||
|
|
||||||
|
|
||||||
// If empty MRM, quit.
|
// If empty MRM, quit.
|
||||||
if(_LodInfos.empty())
|
if(_LodInfos.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If the version is <4, then SkinWeights are serialised per Lod.
|
/* If the version is <4, then SkinWeights are serialised per Lod.
|
||||||
|
@ -2431,7 +2431,7 @@ void CMeshMRMGeom::compileRunTime()
|
||||||
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
_PreciseClipping= _BBox.getRadius() >= NL3D_MESH_PRECISE_CLIP_THRESHOLD;
|
||||||
|
|
||||||
// Compute if can support SkinGrouping rendering
|
// Compute if can support SkinGrouping rendering
|
||||||
if(_Lods.empty() || !_Skinned)
|
if(_Lods.size()==0 || !_Skinned)
|
||||||
{
|
{
|
||||||
_SupportSkinGrouping= false;
|
_SupportSkinGrouping= false;
|
||||||
_SupportShadowSkinGrouping= false;
|
_SupportShadowSkinGrouping= false;
|
||||||
|
@ -2451,7 +2451,7 @@ void CMeshMRMGeom::compileRunTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
// Support MeshBlockRendering only if not skinned/meshMorphed.
|
||||||
_SupportMeshBlockRendering= !_Skinned && _MeshMorpher.BlendShapes.empty();
|
_SupportMeshBlockRendering= !_Skinned && _MeshMorpher.BlendShapes.size()==0;
|
||||||
|
|
||||||
// \todo yoyo: support later MeshVertexProgram
|
// \todo yoyo: support later MeshVertexProgram
|
||||||
_SupportMeshBlockRendering= _SupportMeshBlockRendering && _MeshVertexProgram==NULL;
|
_SupportMeshBlockRendering= _SupportMeshBlockRendering && _MeshVertexProgram==NULL;
|
||||||
|
@ -3367,7 +3367,7 @@ void CMeshMRMGeom::updateRawSkinNormal(bool enabled, CMeshMRMInstance *mi, sint
|
||||||
|
|
||||||
// Case of MeshMorpher
|
// Case of MeshMorpher
|
||||||
//========
|
//========
|
||||||
if(!_MeshMorpher.BlendShapes.empty())
|
if(_MeshMorpher.BlendShapes.size()>0)
|
||||||
{
|
{
|
||||||
skinLod.VertexRemap.resize((uint32)vertexFinalRemap.size());
|
skinLod.VertexRemap.resize((uint32)vertexFinalRemap.size());
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace NL3D
|
||||||
void CMeshMRMGeom::applySkin(CLod &lod, const CSkeletonModel *skeleton)
|
void CMeshMRMGeom::applySkin(CLod &lod, const CSkeletonModel *skeleton)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.empty())
|
if(_SkinWeights.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr.
|
// get vertexPtr.
|
||||||
|
|
|
@ -380,7 +380,7 @@ static void applyArraySkinTangentSpaceT(uint numMatrixes, uint32 *infPtr, CMesh:
|
||||||
void CMeshMRMGeom::applySkinWithNormal(CLod &lod, const CSkeletonModel *skeleton)
|
void CMeshMRMGeom::applySkinWithNormal(CLod &lod, const CSkeletonModel *skeleton)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.empty())
|
if(_SkinWeights.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr / normalOff.
|
// get vertexPtr / normalOff.
|
||||||
|
@ -446,7 +446,7 @@ void CMeshMRMGeom::applySkinWithTangentSpace(CLod &lod, const CSkeletonModel *sk
|
||||||
uint tangentSpaceTexCoord)
|
uint tangentSpaceTexCoord)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.empty())
|
if(_SkinWeights.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get vertexPtr / normalOff / tangent space offset.
|
// get vertexPtr / normalOff / tangent space offset.
|
||||||
|
@ -1468,7 +1468,7 @@ void CMeshMRMGeom::applyArrayRawSkinNormal4(CRawVertexNormalSkin4 *src, uint8 *
|
||||||
void CMeshMRMGeom::applyRawSkinWithNormal(CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton, uint8 *vbHard, float alphaLod)
|
void CMeshMRMGeom::applyRawSkinWithNormal(CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton, uint8 *vbHard, float alphaLod)
|
||||||
{
|
{
|
||||||
nlassert(_Skinned);
|
nlassert(_Skinned);
|
||||||
if(_SkinWeights.empty())
|
if(_SkinWeights.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Some assert
|
// Some assert
|
||||||
|
|
|
@ -160,7 +160,7 @@ void CMeshMRMSkinnedGeom::CLod::buildPrimitiveBlock(uint renderPass, const CInde
|
||||||
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
static NLMISC::CAABBoxExt makeBBox(const std::vector<CVector> &Vertices)
|
||||||
{
|
{
|
||||||
NLMISC::CAABBox ret;
|
NLMISC::CAABBox ret;
|
||||||
nlassert(!Vertices.empty());
|
nlassert(Vertices.size());
|
||||||
ret.setCenter(Vertices[0]);
|
ret.setCenter(Vertices[0]);
|
||||||
for(sint i=0;i<(sint)Vertices.size();i++)
|
for(sint i=0;i<(sint)Vertices.size();i++)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +211,7 @@ void CMeshMRMSkinnedGeom::build(CMesh::CMeshBuild &m,
|
||||||
uint numMaxMaterial, const CMRMParameters ¶ms)
|
uint numMaxMaterial, const CMRMParameters ¶ms)
|
||||||
{
|
{
|
||||||
// Empty geometry?
|
// Empty geometry?
|
||||||
if(m.Vertices.empty() || m.Faces.empty())
|
if(m.Vertices.size()==0 || m.Faces.size()==0)
|
||||||
{
|
{
|
||||||
_VBufferFinal.clear();
|
_VBufferFinal.clear();
|
||||||
_Lods.clear();
|
_Lods.clear();
|
||||||
|
@ -261,7 +261,7 @@ void CMeshMRMSkinnedGeom::build(CMesh::CMeshBuild &m,
|
||||||
_LevelDetail.MaxFaceUsed= 0;
|
_LevelDetail.MaxFaceUsed= 0;
|
||||||
_LevelDetail.MinFaceUsed= 0;
|
_LevelDetail.MinFaceUsed= 0;
|
||||||
// Count of primitive block
|
// Count of primitive block
|
||||||
if(!_Lods.empty())
|
if(_Lods.size()>0)
|
||||||
{
|
{
|
||||||
uint pb;
|
uint pb;
|
||||||
// Compute MinFaces.
|
// Compute MinFaces.
|
||||||
|
@ -421,7 +421,7 @@ void CMeshMRMSkinnedGeom::applyGeomorph(std::vector<CMRMWedgeGeom> &geoms, floa
|
||||||
void CMeshMRMSkinnedGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod)
|
void CMeshMRMSkinnedGeom::applyGeomorphWithVBHardPtr(std::vector<CMRMWedgeGeom> &geoms, float alphaLod)
|
||||||
{
|
{
|
||||||
// no geomorphs? quit.
|
// no geomorphs? quit.
|
||||||
if(geoms.empty())
|
if(geoms.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clamp(alphaLod, 0.f, 1.f);
|
clamp(alphaLod, 0.f, 1.f);
|
||||||
|
@ -579,7 +579,7 @@ inline sint CMeshMRMSkinnedGeom::chooseLod(float alphaMRM, float &alphaLod)
|
||||||
void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)
|
||||||
{
|
{
|
||||||
nlassert(drv);
|
nlassert(drv);
|
||||||
if(_Lods.empty())
|
if(_Lods.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ void CMeshMRMSkinnedGeom::render(IDriver *drv, CTransformShape *trans, float pol
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.empty())
|
if(lod.RdrPass.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ sint CMeshMRMSkinnedGeom::renderSkinGroupGeom(CMeshMRMSkinnedInstance *mi, float
|
||||||
|
|
||||||
// Render the choosen Lod.
|
// Render the choosen Lod.
|
||||||
CLod &lod= _Lods[numLod];
|
CLod &lod= _Lods[numLod];
|
||||||
if(lod.RdrPass.empty())
|
if(lod.RdrPass.size()==0)
|
||||||
// return no vertices added
|
// return no vertices added
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -3119,7 +3119,7 @@ bool CMRMBuilder::buildMRMSewingMeshes(const CMesh::CMeshBuild &mbuild, uint nWa
|
||||||
{
|
{
|
||||||
nlassert(nWantedLods>=1);
|
nlassert(nWantedLods>=1);
|
||||||
nlassert(divisor>=1);
|
nlassert(divisor>=1);
|
||||||
if(mbuild.Interfaces.empty())
|
if(mbuild.Interfaces.size()==0)
|
||||||
return false;
|
return false;
|
||||||
// must have same size
|
// must have same size
|
||||||
if(mbuild.InterfaceLinks.size()!=mbuild.Vertices.size())
|
if(mbuild.InterfaceLinks.size()!=mbuild.Vertices.size())
|
||||||
|
|
|
@ -604,8 +604,7 @@ void CPatch::addRefTessBlocks()
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
TessBlockRefCount++;
|
TessBlockRefCount++;
|
||||||
|
if(TessBlocks.size()==0)
|
||||||
if (TessBlocks.empty())
|
|
||||||
{
|
{
|
||||||
// Allocate the tessblocks.
|
// Allocate the tessblocks.
|
||||||
//==========
|
//==========
|
||||||
|
@ -1630,7 +1629,7 @@ void CPatch::serial(NLMISC::IStream &f)
|
||||||
|
|
||||||
// then just copy to TileColors.
|
// then just copy to TileColors.
|
||||||
TileColors.resize(tmpArray.size());
|
TileColors.resize(tmpArray.size());
|
||||||
if(!TileColors.empty())
|
if(TileColors.size()>0)
|
||||||
{
|
{
|
||||||
memcpy(&TileColors[0], &tmpArray[0], TileColors.size()*sizeof(CTileColor));
|
memcpy(&TileColors[0], &tmpArray[0], TileColors.size()*sizeof(CTileColor));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1452,7 +1452,7 @@ void CPatch::computeSoftwareGeomorphAndAlpha()
|
||||||
// Need only to fill CTessVertex, so do it only for FarVertices
|
// Need only to fill CTessVertex, so do it only for FarVertices
|
||||||
// Hence Geomorph is done twice on edges of patches!!.
|
// Hence Geomorph is done twice on edges of patches!!.
|
||||||
// If not too near for precise, fast compute of geomorph.
|
// If not too near for precise, fast compute of geomorph.
|
||||||
if( TessBlocks.empty() )
|
if( TessBlocks.size()==0 )
|
||||||
{
|
{
|
||||||
// Just update all vertices of master block.
|
// Just update all vertices of master block.
|
||||||
computeGeomorphVertexList(MasterBlock.FarVertexList);
|
computeGeomorphVertexList(MasterBlock.FarVertexList);
|
||||||
|
|
|
@ -540,7 +540,7 @@ bool CPatchDLMContext::generate(CPatch *patch, CTextureDLM *textureDLM, CPatch
|
||||||
#ifndef NL_DLM_TILE_RES
|
#ifndef NL_DLM_TILE_RES
|
||||||
|
|
||||||
// retrieve patch tileColor pointer.
|
// retrieve patch tileColor pointer.
|
||||||
nlassert(!_Patch->TileColors.empty());
|
nlassert(_Patch->TileColors.size()>0);
|
||||||
CTileColor *tileColor= &_Patch->TileColors[0];
|
CTileColor *tileColor= &_Patch->TileColors[0];
|
||||||
|
|
||||||
// skip 1 tiles colors per column and per row
|
// skip 1 tiles colors per column and per row
|
||||||
|
@ -898,7 +898,7 @@ void CPatchDLMContext::compileLighting(TCompileType compType, CRGBA modulateCt
|
||||||
if(! (_IsSrcTextureFullBlack && _IsDstTextureFullBlack) )
|
if(! (_IsSrcTextureFullBlack && _IsDstTextureFullBlack) )
|
||||||
{
|
{
|
||||||
// if lightMap allocated
|
// if lightMap allocated
|
||||||
if(!_LightMap.empty() && _DLMTexture)
|
if(_LightMap.size()>0 && _DLMTexture)
|
||||||
{
|
{
|
||||||
// If the srcTexture is full black (ie no pointLight influence touch it),
|
// If the srcTexture is full black (ie no pointLight influence touch it),
|
||||||
if(_IsSrcTextureFullBlack)
|
if(_IsSrcTextureFullBlack)
|
||||||
|
|
|
@ -226,7 +226,7 @@ void CPSFace::step(TPSProcessPass pass)
|
||||||
else if (pass == PSMotion)
|
else if (pass == PSMotion)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// rotate all precomputed basis
|
// rotate all precomputed basis
|
||||||
for (CPSVector< CPlaneBasisPair >::V::iterator it = _PrecompBasis.begin(); it != _PrecompBasis.end(); ++it)
|
for (CPSVector< CPlaneBasisPair >::V::iterator it = _PrecompBasis.begin(); it != _PrecompBasis.end(); ++it)
|
||||||
|
@ -394,7 +394,7 @@ void CPSFace::deleteElement(uint32 index)
|
||||||
NL_PS_FUNC(CPSFace_deleteElement)
|
NL_PS_FUNC(CPSFace_deleteElement)
|
||||||
CPSQuad::deleteElement(index);
|
CPSQuad::deleteElement(index);
|
||||||
deletePlaneBasisElement(index);
|
deletePlaneBasisElement(index);
|
||||||
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// replace ourself by the last element...
|
// replace ourself by the last element...
|
||||||
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
||||||
|
@ -407,7 +407,7 @@ void CPSFace::resize(uint32 size)
|
||||||
NL_PS_FUNC(CPSFace_resize)
|
NL_PS_FUNC(CPSFace_resize)
|
||||||
nlassert(size < (1 << 16));
|
nlassert(size < (1 << 16));
|
||||||
resizePlaneBasis(size);
|
resizePlaneBasis(size);
|
||||||
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
_IndexInPrecompBasis.resize(size);
|
_IndexInPrecompBasis.resize(size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1994,7 +1994,7 @@ void CPSConstraintMesh::deleteElement(uint32 index)
|
||||||
deleteSizeElement(index);
|
deleteSizeElement(index);
|
||||||
deletePlaneBasisElement(index);
|
deletePlaneBasisElement(index);
|
||||||
// TODO : avoid code cuplication with CPSFace ...
|
// TODO : avoid code cuplication with CPSFace ...
|
||||||
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
// replace ourself by the last element...
|
// replace ourself by the last element...
|
||||||
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
_IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
|
||||||
|
@ -2011,7 +2011,7 @@ void CPSConstraintMesh::resize(uint32 size)
|
||||||
resizeSize(size);
|
resizeSize(size);
|
||||||
resizePlaneBasis(size);
|
resizePlaneBasis(size);
|
||||||
// TODO : avoid code cuplication with CPSFace ...
|
// TODO : avoid code cuplication with CPSFace ...
|
||||||
if (!_PrecompBasis.empty()) // do we use precomputed basis ?
|
if (_PrecompBasis.size()) // do we use precomputed basis ?
|
||||||
{
|
{
|
||||||
_IndexInPrecompBasis.resize(size);
|
_IndexInPrecompBasis.resize(size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ void CQuadEffect::processPoly(const TPoint2DVect &poly
|
||||||
static TRasters rDest;
|
static TRasters rDest;
|
||||||
float currY;
|
float currY;
|
||||||
makeRasters(poly, quadWidth, quadHeight, rDest, currY);
|
makeRasters(poly, quadWidth, quadHeight, rDest, currY);
|
||||||
if (!dest.empty())
|
if (dest.size())
|
||||||
{
|
{
|
||||||
TRasters::const_iterator it, endIt = rDest.end();
|
TRasters::const_iterator it, endIt = rDest.end();
|
||||||
for (it = rDest.begin(); it != endIt; ++it)
|
for (it = rDest.begin(); it != endIt; ++it)
|
||||||
|
|
|
@ -451,6 +451,7 @@ void CInstanceGroup::serial (NLMISC::IStream& f)
|
||||||
_PointLightArray.clear();
|
_PointLightArray.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (version >= 2)
|
if (version >= 2)
|
||||||
f.serial(_GlobalPos);
|
f.serial(_GlobalPos);
|
||||||
|
|
||||||
|
@ -573,11 +574,10 @@ bool CInstanceGroup::addToScene (CScene& scene, IDriver *driver, uint selectedTe
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_Instances[i] = scene.createInstance (shapeName);
|
_Instances[i] = scene.createInstance (shapeName);
|
||||||
|
}
|
||||||
if (_Instances[i] == NULL)
|
if( _Instances[i] == NULL )
|
||||||
{
|
{
|
||||||
nlwarning("Not found '%s' file", shapeName.c_str());
|
nlwarning("Not found '%s' file", shapeName.c_str());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1121,7 +1121,7 @@ void CInstanceGroup::setClusterSystemForInstances(CInstanceGroup *pIG)
|
||||||
void CInstanceGroup::getDynamicPortals (std::vector<std::string> &names)
|
void CInstanceGroup::getDynamicPortals (std::vector<std::string> &names)
|
||||||
{
|
{
|
||||||
for (uint32 i = 0; i < _Portals.size(); ++i)
|
for (uint32 i = 0; i < _Portals.size(); ++i)
|
||||||
if (!_Portals[i].getName().empty())
|
if (_Portals[i].getName() != "")
|
||||||
names.push_back (_Portals[i].getName());
|
names.push_back (_Portals[i].getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -705,7 +705,7 @@ void CShadowMapManager::renderProject(CScene *scene)
|
||||||
}
|
}
|
||||||
driver->activeVertexBuffer (CopyQuads);
|
driver->activeVertexBuffer (CopyQuads);
|
||||||
|
|
||||||
if (!_ShadowCasters.empty())
|
if (_ShadowCasters.size()>0)
|
||||||
{
|
{
|
||||||
// get the transform to compute shadow map.
|
// get the transform to compute shadow map.
|
||||||
CTransform *sc= _ShadowCasters[0];
|
CTransform *sc= _ShadowCasters[0];
|
||||||
|
|
|
@ -119,7 +119,7 @@ bool CTextureDLM::canCreateLightMap(uint w, uint h)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// If empty, test if there is an empty block.
|
// If empty, test if there is an empty block.
|
||||||
return !_EmptyBlocks.empty();
|
return _EmptyBlocks.size()>0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ bool CTextureDLM::createLightMap(uint w, uint h, uint &x, uint &y)
|
||||||
if(_FreeBlocks[lMapType]==NULL)
|
if(_FreeBlocks[lMapType]==NULL)
|
||||||
{
|
{
|
||||||
// list is empty => allocate a block from _EmptyBlocks.
|
// list is empty => allocate a block from _EmptyBlocks.
|
||||||
nlassert(!_EmptyBlocks.empty());
|
nlassert(_EmptyBlocks.size()>0);
|
||||||
|
|
||||||
// pop a block from empty list
|
// pop a block from empty list
|
||||||
CBlock *block= &_Blocks[_EmptyBlocks.back()];
|
CBlock *block= &_Blocks[_EmptyBlocks.back()];
|
||||||
|
|
|
@ -108,7 +108,7 @@ void CTileBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
||||||
if (f.isReading())
|
if (f.isReading())
|
||||||
{
|
{
|
||||||
// Checks
|
// Checks
|
||||||
nlassert (!_DisplacementMap.empty());
|
nlassert (_DisplacementMap.size()>0);
|
||||||
|
|
||||||
// Set first empty
|
// Set first empty
|
||||||
_DisplacementMap[0].setEmpty ();
|
_DisplacementMap[0].setEmpty ();
|
||||||
|
@ -264,7 +264,7 @@ sint CTileBank::getNumBitmap (CTile::TBitmap bitmap) const
|
||||||
if (!_TileVector[i].isFree())
|
if (!_TileVector[i].isFree())
|
||||||
{
|
{
|
||||||
const std::string &str=_TileVector[i].getRelativeFileName (bitmap);
|
const std::string &str=_TileVector[i].getRelativeFileName (bitmap);
|
||||||
if (!str.empty())
|
if (str!="")
|
||||||
{
|
{
|
||||||
std::vector<char> vect (str.length()+1);
|
std::vector<char> vect (str.length()+1);
|
||||||
memcpy (&*vect.begin(), str.c_str(), str.length()+1);
|
memcpy (&*vect.begin(), str.c_str(), str.length()+1);
|
||||||
|
@ -543,7 +543,7 @@ CTileNoiseMap *CTileBank::getTileNoiseMap (uint tileNumber, uint tileSubNoise)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_DisplacementMap.empty() || _DisplacementMap[0]._TileNoiseMap)
|
if (_DisplacementMap.size()==0 || _DisplacementMap[0]._TileNoiseMap)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
// Checks
|
// Checks
|
||||||
|
@ -583,7 +583,7 @@ void CTileBank::removeDisplacementMap (uint mapId)
|
||||||
if (mapId==_DisplacementMap.size()-1)
|
if (mapId==_DisplacementMap.size()-1)
|
||||||
{
|
{
|
||||||
// Resize the array ?
|
// Resize the array ?
|
||||||
while ((mapId>0)&&(_DisplacementMap[mapId]._FileName.empty()))
|
while ((mapId>0)&&(_DisplacementMap[mapId]._FileName==""))
|
||||||
_DisplacementMap.resize (mapId--);
|
_DisplacementMap.resize (mapId--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -608,7 +608,7 @@ uint CTileBank::getDisplacementMap (const string &fileName)
|
||||||
for (noiseTile=0; noiseTile<_DisplacementMap.size(); noiseTile++)
|
for (noiseTile=0; noiseTile<_DisplacementMap.size(); noiseTile++)
|
||||||
{
|
{
|
||||||
// Same name ?
|
// Same name ?
|
||||||
if (_DisplacementMap[noiseTile]._FileName.empty())
|
if (_DisplacementMap[noiseTile]._FileName=="")
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (noiseTile==_DisplacementMap.size())
|
if (noiseTile==_DisplacementMap.size())
|
||||||
|
@ -1433,7 +1433,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
while (ite!=_Tile128.end())
|
while (ite!=_Tile128.end())
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (!bank.getTile (*ite)->getRelativeFileName(type).empty())
|
if (bank.getTile (*ite)->getRelativeFileName(type)!="")
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1450,7 +1450,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
while (ite!=_Tile256.end())
|
while (ite!=_Tile256.end())
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (!bank.getTile (*ite)->getRelativeFileName(type).empty())
|
if (bank.getTile (*ite)->getRelativeFileName(type)!="")
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1474,7 +1474,7 @@ void CTileSet::deleteBordersIfLast (const CTileBank& bank, CTile::TBitmap type)
|
||||||
if (nTile!=-1)
|
if (nTile!=-1)
|
||||||
{
|
{
|
||||||
// If the file name is valid
|
// If the file name is valid
|
||||||
if (!bank.getTile (nTile)->getRelativeFileName(type).empty())
|
if (bank.getTile (nTile)->getRelativeFileName(type)!="")
|
||||||
{
|
{
|
||||||
// Don't delete,
|
// Don't delete,
|
||||||
bDelete=false;
|
bDelete=false;
|
||||||
|
@ -1564,7 +1564,7 @@ const CTileVegetableDesc &CTileSet::getTileVegetableDesc() const
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CTileSet::loadTileVegetableDesc()
|
void CTileSet::loadTileVegetableDesc()
|
||||||
{
|
{
|
||||||
if(!_TileVegetableDescFileName.empty())
|
if(_TileVegetableDescFileName!="")
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ void CVegetableBlendLayerModel::render(IDriver *driver)
|
||||||
|
|
||||||
nlassert(VegetableManager);
|
nlassert(VegetableManager);
|
||||||
|
|
||||||
if(SortBlocks.empty())
|
if(SortBlocks.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Setup VegetableManager renderState (like pre-setuped material)
|
// Setup VegetableManager renderState (like pre-setuped material)
|
||||||
|
|
|
@ -1019,12 +1019,12 @@ void CVegetableManager::reserveIgCompile(CVegetableInstanceGroup *ig, const CV
|
||||||
{
|
{
|
||||||
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= ig->_RdrPass[rdrPass];
|
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= ig->_RdrPass[rdrPass];
|
||||||
nlassert(vegetRdrPass.TriangleIndices.getNumIndexes()==0);
|
nlassert(vegetRdrPass.TriangleIndices.getNumIndexes()==0);
|
||||||
nlassert(vegetRdrPass.TriangleLocalIndices.empty());
|
nlassert(vegetRdrPass.TriangleLocalIndices.size()==0);
|
||||||
nlassert(vegetRdrPass.Vertices.empty());
|
nlassert(vegetRdrPass.Vertices.size()==0);
|
||||||
nlassert(vegetRdrPass.LightedInstances.empty());
|
nlassert(vegetRdrPass.LightedInstances.size()==0);
|
||||||
}
|
}
|
||||||
// Do the same for all quadrants of the zsort rdrPass.
|
// Do the same for all quadrants of the zsort rdrPass.
|
||||||
nlassert(ig->_TriangleQuadrantOrderArray.empty());
|
nlassert(ig->_TriangleQuadrantOrderArray.size()==0);
|
||||||
nlassert(ig->_TriangleQuadrantOrderNumTriangles==0);
|
nlassert(ig->_TriangleQuadrantOrderNumTriangles==0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -2553,7 +2553,7 @@ bool CVegetableManager::updateLightingIGPart()
|
||||||
}
|
}
|
||||||
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= _ULRootIg->_RdrPass[_ULCurrentIgRdrPass];
|
CVegetableInstanceGroup::CVegetableRdrPass &vegetRdrPass= _ULRootIg->_RdrPass[_ULCurrentIgRdrPass];
|
||||||
|
|
||||||
// if all instances are processed for this pass (especially if empty() !!)
|
// if all instances are processed for this pass (especially if size()==0 !!)
|
||||||
if(_ULCurrentIgInstance>= vegetRdrPass.LightedInstances.size())
|
if(_ULCurrentIgInstance>= vegetRdrPass.LightedInstances.size())
|
||||||
{
|
{
|
||||||
// skip to the next rdrPass.
|
// skip to the next rdrPass.
|
||||||
|
|
|
@ -186,7 +186,7 @@ bool CVegetableVBAllocator::exceedMaxVertexInBufferHard(uint numAddVerts) cons
|
||||||
uint CVegetableVBAllocator::allocateVertex()
|
uint CVegetableVBAllocator::allocateVertex()
|
||||||
{
|
{
|
||||||
// if no more free, allocate.
|
// if no more free, allocate.
|
||||||
if( _VertexFreeMemory.empty() )
|
if( _VertexFreeMemory.size()==0 )
|
||||||
{
|
{
|
||||||
// enlarge capacity.
|
// enlarge capacity.
|
||||||
uint newResize;
|
uint newResize;
|
||||||
|
|
|
@ -500,7 +500,7 @@ void CWaterModel::traverseRender()
|
||||||
sint startY;
|
sint startY;
|
||||||
projPoly.computeBorders(rasters, startY);
|
projPoly.computeBorders(rasters, startY);
|
||||||
|
|
||||||
if (!rasters.empty())
|
if (rasters.size())
|
||||||
{
|
{
|
||||||
//===========================//
|
//===========================//
|
||||||
// perform Water animation //
|
// perform Water animation //
|
||||||
|
|
|
@ -1126,7 +1126,7 @@ void CZone::refineAll()
|
||||||
{
|
{
|
||||||
nlassert(Compiled);
|
nlassert(Compiled);
|
||||||
|
|
||||||
if(Patchs.empty())
|
if(Patchs.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// DO NOT do a forceNoRenderClip(), to avoid big allocation of Near/Far VB vertices in driver.
|
// DO NOT do a forceNoRenderClip(), to avoid big allocation of Near/Far VB vertices in driver.
|
||||||
|
@ -1150,7 +1150,7 @@ void CZone::averageTesselationVertices()
|
||||||
{
|
{
|
||||||
nlassert(Compiled);
|
nlassert(Compiled);
|
||||||
|
|
||||||
if(Patchs.empty())
|
if(Patchs.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// averageTesselationVertices of ALL patchs.
|
// averageTesselationVertices of ALL patchs.
|
||||||
|
@ -1250,10 +1250,8 @@ void CZone::resetRenderFarAndDeleteVBFV()
|
||||||
void CZone::forceMergeAtTileLevel()
|
void CZone::forceMergeAtTileLevel()
|
||||||
{
|
{
|
||||||
CPatch *pPatch=0;
|
CPatch *pPatch=0;
|
||||||
|
if(Patchs.size()>0)
|
||||||
if (!Patchs.empty())
|
|
||||||
pPatch= &(*Patchs.begin());
|
pPatch= &(*Patchs.begin());
|
||||||
|
|
||||||
for(sint n=(sint)Patchs.size();n>0;n--, pPatch++)
|
for(sint n=(sint)Patchs.size();n>0;n--, pPatch++)
|
||||||
{
|
{
|
||||||
pPatch->forceMergeAtTileLevel();
|
pPatch->forceMergeAtTileLevel();
|
||||||
|
@ -1448,7 +1446,7 @@ void CZone::applyHeightField(const CLandscape &landScape)
|
||||||
vector<CBezierPatch> patchs;
|
vector<CBezierPatch> patchs;
|
||||||
|
|
||||||
// no patch, do nothing.
|
// no patch, do nothing.
|
||||||
if(Patchs.empty())
|
if(Patchs.size()==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// 0. Unpack patchs to Bezier Patchs.
|
// 0. Unpack patchs to Bezier Patchs.
|
||||||
|
|
|
@ -3113,7 +3113,7 @@ void CZoneLighter::addWaterShape(CWaterShape *shape, const NLMISC::CMatrix &MT)
|
||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
void CZoneLighter::makeQuadGridFromWaterShapes(NLMISC::CAABBox zoneBBox)
|
void CZoneLighter::makeQuadGridFromWaterShapes(NLMISC::CAABBox zoneBBox)
|
||||||
{
|
{
|
||||||
if (_WaterShapes.empty()) return;
|
if (!_WaterShapes.size()) return;
|
||||||
|
|
||||||
NLMISC::CAABBox tmpBox;
|
NLMISC::CAABBox tmpBox;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue