Difference between revisions of "User:Michelle2 Zenovka/cmake-flags"

From Second Life Wiki
Jump to navigation Jump to search
m (Added to Category:Compiling viewer: page might be relevant for build instructions overhaul. See https://lists.secondlife.com/pipermail/opensource-dev/2010-May/thread.html#2064)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
back to: [[User:Michelle2_Zenovka/cmake]]
==Intro==
==Intro==


Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develo.py but calls cmake directly.
Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.


The typical invocation of cmake will look like the following :-
The typical invocation of cmake will look like the following :-


  cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra
  cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra
Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-
develop.py configure -DMYVARIABLE:BOOL=TRUE


==Generators==
==Generators==
Line 17: Line 23:
* VC90 (VS2008)  
* VC90 (VS2008)  


[[Category:Compiling viewer]]
Linuxoids
Linuxoids
* Unix Makefiles (default)
* Unix Makefiles (default)
Line 22: Line 29:


Mac
Mac
* Xcode (default)
* Xcode
* Unix Makefiles
* Unix Makefiles (default) (WARNING: you '''probably''' don't want makefiles, and need to specify -G Xcode to avoid them!)
 
==Variables==
==Variables==


Line 35: Line 43:


value FALSE
value FALSE
There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more) Most of the others are automaticly generated based on trying to find locations of required libraries. The full list of setable ones can be seen in indra/CMakeCache.txt after running cmake for the first time
* CMakeCache.txt location may differ: for Linux, looks like it's indra/viewer-linux-i686-relwithdebinfo/CMakeCache.txt


{| border="1" cellpadding="20" cellspacing="0"
{| border="1" cellpadding="20" cellspacing="0"
Line 43: Line 55:
|INSTALL||BOOL||Enable Unix install target
|INSTALL||BOOL||Enable Unix install target
|-
|-
|INSTALL_PREFIX||STRING||(Unix install target) Installation directory for read-only shared files
|APP_BINARY_DIR||STRING||(Unix install target) Installation directory for the main secondlife-bin
|-
|-
|INSTALL_LIBRARY_DIR||STRING||(Unix install target) Installation directory for binaries
|APP_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files
|-
|-
|INSTALL_SHARE_DIR||STRING||(Unix install target) Installation directory for read-only data files
|BINARY_NAME||STRING|| Replacement name for secondlife-bin executable
|-
|-
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree
|FMOD_SDK_DIR||STRING||Set location of FMOD API files to save copying into build tree
|-
|MOZLIB||BOOL||Enable embedded web browsing and html content in world (if you are building standalone and using a llmozlib2 package this needs enabling as its excluded in a standalone build otherwise)
|-
|OPENAL||BOOL||Enable OpenAL for sound, only works with openAL patch from jira
|-
|CMAKE_BUILD_TYPE||STRING||'No help, variable specified on the command line' (build type?)
|-
|-
|}
|}
== The Debian Way ==
The debian rules Makefile, invokes cmake as :-
cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \
        -DCMAKE_BUILD_TYPE:STRING=Release-DSERVER:BOOL=FALSE \
        -DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \
        -DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \
        -DAPP_BINARY_DIR:STRING=/usr/games/ \
        -DCMAKE_INSTALL_PREFIX:STRING=debian/ \
        -DBINARY_NAME:STRING=omvviewer \
        -DOPENAL:BOOL=TRUE \

Latest revision as of 08:58, 10 May 2010

back to: User:Michelle2_Zenovka/cmake

Intro

Normaly develop.py will bootstrap the actual cmake process for you, but you may wish to override certain operations. The Debian build for example does not use develop.py but calls cmake directly.

The typical invocation of cmake will look like the following :-

cmake -G "Visual Studio 7 .NET 2003" -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=FALSE "" "c:\\secondlife\\Release\\release\\indra

Its also possible to specify variables to be set when calling develop.py with the configure parameter eg :-

develop.py configure -DMYVARIABLE:BOOL=TRUE

Generators

The -G option of cmake specifies the generator to be used (the target to build project file for). The Secondlife viewer cmake currently supports the following targets :-

Windows

  • VC71
  • VC2003 (default)
  • VC80 (VS2005)
  • VC90 (VS2008)

Linuxoids

  • Unix Makefiles (default)
  • KDevelop3

Mac

  • Xcode
  • Unix Makefiles (default) (WARNING: you probably don't want makefiles, and need to specify -G Xcode to avoid them!)

Variables

cmake variables are passed on the command line with the -D option, followed by the variable name, a seperation colon, the type of variable then =value for example :-

-DSTANDALONE:BOOL=FALSE

Variable name STANDALONE

Type BOOL

value FALSE

There are a whole bunch of useful variables that can be set to control the cmake building process, some of these are listed below (feel free to add more) Most of the others are automaticly generated based on trying to find locations of required libraries. The full list of setable ones can be seen in indra/CMakeCache.txt after running cmake for the first time

  • CMakeCache.txt location may differ: for Linux, looks like it's indra/viewer-linux-i686-relwithdebinfo/CMakeCache.txt


STANDALONE BOOL Sets the build to standalone mode, if enabled the build will try to use system provided libraries instead of the ones from the libs tarball.
UNATTENDED BOOL Normally set to false, Internal option for Linden Labs building???
INSTALL BOOL Enable Unix install target
APP_BINARY_DIR STRING (Unix install target) Installation directory for the main secondlife-bin
APP_SHARE_DIR STRING (Unix install target) Installation directory for read-only data files
BINARY_NAME STRING Replacement name for secondlife-bin executable
FMOD_SDK_DIR STRING Set location of FMOD API files to save copying into build tree
MOZLIB BOOL Enable embedded web browsing and html content in world (if you are building standalone and using a llmozlib2 package this needs enabling as its excluded in a standalone build otherwise)
OPENAL BOOL Enable OpenAL for sound, only works with openAL patch from jira
CMAKE_BUILD_TYPE STRING 'No help, variable specified on the command line' (build type?)

The Debian Way

The debian rules Makefile, invokes cmake as :-

cmake -DUNATTENDED:BOOl=FALSE -DSTANDALONE:BOOL=TRUE \
       -DCMAKE_BUILD_TYPE:STRING=Release-DSERVER:BOOL=FALSE \
       -DVIEWER:BOOL=TRUE -DMOZLIB:BOOL=true -DINSTALL:BOOL=TRUE \
       -DAPP_SHARE_DIR:STRING=/usr/share/omvviewer/ \
       -DAPP_BINARY_DIR:STRING=/usr/games/ \
       -DCMAKE_INSTALL_PREFIX:STRING=debian/ \
       -DBINARY_NAME:STRING=omvviewer \
       -DOPENAL:BOOL=TRUE \