Editing Building from SVN

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 15: Line 15:
  
  
== Configure the build system with CMake ==  
+
== Obtain CMake ==  
  
 
BRL-CAD also requires the build tool CMake.  Again, most Linux/BSD/UNIX distributions will provide a package for CMake - for platforms that do not, CMake is available from http://www.cmake.org
 
BRL-CAD also requires the build tool CMake.  Again, most Linux/BSD/UNIX distributions will provide a package for CMake - for platforms that do not, CMake is available from http://www.cmake.org
  
For Linux/Mac/BSD, create a build directory and run cmake:
+
== Configure the build system ==
 
+
 
  cd brlcad
 
  cd brlcad
 
  mkdir build
 
  mkdir build
Line 27: Line 26:
 
  cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)
 
  cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)
  
For Windows, you can use the CMake GUI where you specify build and source directories:[[File:Running_cmake_on_windows.png|200px|thumb|right|Running CMake GUI on Windows]]
 
 
 
When building for multiuser file servers it is often useful to make the install_dir reflect the version and/or architecture of the compile.  An example would be "-DCMAKE_INSTALL_PREFIX=/usr/brlcad/rel-7.20.2" to install into a /usr/brlcad/rel-7.20.2 directory.  (When CMAKE_BUILD_TYPE is set to Release, the installation directory automatically is assigned the appropriate directory and the user doesn't have to do so manually.)  This way a single system can have multiple versions of BRL-CAD installed or multiple binary formats for various architectures if installing on a network file system.  Symbolic links are then usually added to point to the "current" or "main" version that is preferable to provide so that users only need to add /usr/brlcad/bin to their path. Examples include:
 
When building for multiuser file servers it is often useful to make the install_dir reflect the version and/or architecture of the compile.  An example would be "-DCMAKE_INSTALL_PREFIX=/usr/brlcad/rel-7.20.2" to install into a /usr/brlcad/rel-7.20.2 directory.  (When CMAKE_BUILD_TYPE is set to Release, the installation directory automatically is assigned the appropriate directory and the user doesn't have to do so manually.)  This way a single system can have multiple versions of BRL-CAD installed or multiple binary formats for various architectures if installing on a network file system.  Symbolic links are then usually added to point to the "current" or "main" version that is preferable to provide so that users only need to add /usr/brlcad/bin to their path. Examples include:
  
Line 46: Line 43:
  
 
IMPORTANT!!! - Because BRL-CAD has such a long development history, it predates some library naming conventions in modern operating systems. This means an attempt to configure for an install in the "/usr" path on Linux (for example) will stand a good chance of damaging important system libraries - e.g. BRL-CAD libraries put in "/usr/lib" may overwrite system libraries with the same names. Using "/usr/brlcad" or "/opt/brlcad" means all installed files will be safely contained in the brlcad directory.
 
IMPORTANT!!! - Because BRL-CAD has such a long development history, it predates some library naming conventions in modern operating systems. This means an attempt to configure for an install in the "/usr" path on Linux (for example) will stand a good chance of damaging important system libraries - e.g. BRL-CAD libraries put in "/usr/lib" may overwrite system libraries with the same names. Using "/usr/brlcad" or "/opt/brlcad" means all installed files will be safely contained in the brlcad directory.
 
  
 
== Compile and test your build ==
 
== Compile and test your build ==
 
On Linux/Mac/BSD, run this in your build directory:
 
 
 
  make
 
  make
  
Line 60: Line 53:
  
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
 
On Windows, open the BRLCAD solution and Compile.
 
 
  
 
== Install ==
 
== Install ==
 
On Linux/Mac/BSD, run this in your build directory:
 
 
 
  make install
 
  make install
  
Line 89: Line 76:
  
 
''Future versions of BRL-CAD may provide this symbolic link operation for you as a CMake configuration option.''
 
''Future versions of BRL-CAD may provide this symbolic link operation for you as a CMake configuration option.''
 
On Windows:
 
 
You can run directly from the build directory.  Browse to the "bin" directory from the GUI or from cmd.exe and run applications (e.g., mged).
 
 
  
 
== Setup environment (optional) ==
 
== Setup environment (optional) ==
 
 
At this point, everything should be ready for use. If the default prefix of /usr/brlcad was used or if the corresponding symbolic links were created, users should only need to add /usr/brlcad/bin to their PATH in order to find binaries for the package (optionally setting their MANPATH as well):
 
At this point, everything should be ready for use. If the default prefix of /usr/brlcad was used or if the corresponding symbolic links were created, users should only need to add /usr/brlcad/bin to their PATH in order to find binaries for the package (optionally setting their MANPATH as well):
  
Line 111: Line 92:
  
 
If users do not want to modify their PATH, they can get by providing the full path to the binaries (e.g. /usr/brlcad/bin/mged). To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man".
 
If users do not want to modify their PATH, they can get by providing the full path to the binaries (e.g. /usr/brlcad/bin/mged). To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man".
 
  
 
== Test installation ==
 
== Test installation ==
 
 
If everything went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. A quick test of functionality (and performance) is to run the BRL-CAD benchmark again, which is installed as the benchmark tool:
 
If everything went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. A quick test of functionality (and performance) is to run the BRL-CAD benchmark again, which is installed as the benchmark tool:
  

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)