0027237: genproj file does not take into account any arguments
[occt.git] / dox / dev_guides / building / code_blocks.md
CommitLineData
72c37458 1Building with Code::Blocks {#occt_dev_guides__building_code_blocks}
2==========================
72b7576f 3
72c37458 4@tableofcontents
72b7576f 5
72c37458 6@section build_codeblocks_intro General
72b7576f 7
72c37458 8This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**.
944d808c 9It can be used as an alternative to CMake build system (see @ref occt_dev_guides__building_cmake) for all supported platforms.
72b7576f 10
72c37458 11@section build_codeblocks_3rdparty Third-party libraries
72b7576f 12
72c37458 13Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref occt_dev_guides__building.
72b7576f 14
72c37458 15@section build_codeblocks_conf Configuration
72b7576f 16
72c37458 17Before building it is necessary to set up build environment.
72b7576f 18
72c37458 19The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly:
72b7576f 20
72c37458 21* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*.
22* Add paths to their binary libraries in variable *CSF_OPT_LIB64*.
23* Set variable *SHORTCUT_HEADERS* to "true" to have folder *inc* populated by short-cut files pointing to actual headers located in *src*; otherwise, header files will be copied to *inc*.
24* For optional third-party libraries, set corresponding environment variable <i>HAVE_<LIBRARY_NAME></i> to either *false*, e.g.:
25~~~~~
26 export HAVE_GL2PS=false
576f8b11 27~~~~~
72b7576f 28
72c37458 29Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively:
72b7576f 30
72c37458 31@figure{/dev_guides/building/3rdparty/images/genconf_linux.png}
72b7576f 32
72c37458 33Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file.
34
35@section build_codeblocks_gen Projects generation
36
944d808c 37Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files:
72b7576f 38
576f8b11 39~~~~~
72c37458 40 $ cd /dev/OCCT/opencascade-7.0.0
944d808c 41 $ ./genproj cbp
576f8b11 42~~~~~
72b7576f 43
72c37458 44The generated Code::Blocks project are placed into subfolder *adm/&lt;OS&gt;/cbp*.
72b7576f 45
72c37458 46@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH.
72b7576f 47
72c37458 48@section build_codeblocks_build Building
72b7576f 49
72c37458 50To start **Code::Blocks**, launch script *codeblocks.sh*.
72b7576f 51
72c37458 52To build all toolkits, click **Build->Build workspace** in the menu bar.
72b7576f 53
72c37458 54To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script
576f8b11 55~~~~~
72b7576f 56 ./draw_cbp.sh cbp [d]
576f8b11 57~~~~~
72c37458 58Option *d* is used if OCCT has been built in **Debug** mode.