documentation updated
[occt.git] / dox / dev_guides / building / code_blocks.md
1 Building with Code::Blocks on Mac OS X {#dev_guides__building__code_blocks}
2 ======================================
3
4 This file describes steps to build OCCT libraries from complete source package
5 on Mac OS X with Code::Blocks.
6
7 If you are building OCCT from bare sources (as in Git repository), or do some 
8 changes affecting CDL files, you need to use WOK to re-generate header files
9 and build scripts / projects. See \ref dev_guides__building__wok for instructions.
10
11 Before building OCCT, you need to install required third-party libraries; see
12 OCCT_Build3rdParty_OSX.pdf for details.
13
14 1. Add paths to the mandatory 3rd-party products (Tcl/Tk and FreeType) in file 
15    custom.sh located in \<OCCT_ROOT_DIR\>. For this:
16
17    1.1. Add paths to the includes in variable "CSF_OPT_INC";
18
19    1.2. Add paths to the binary libraries in variable  "CSF_OPT_LIB64";
20    
21    All paths should be separated by ":" symbol. 
22
23 2. Add paths to the optional 3rd-party libraries (TBB, gl2ps and FreeImage) 
24    in the aforementioned environment variables "CSF_OPT_INC" and 
25    "CSF_OPT_LIB64" from file custom.sh.
26
27    If you want to build OCCT without the optional libraries perform the 
28    following steps:
29
30    2.1 Disable unnecessary library in custom.sh by setting the corresponding 
31        variable HAVE_\<LIBRARY_NAME\> to "false". 
32
33        export HAVE_GL2PS=false
34
35    2.2 Remove this library from Linker settings in Code::Blocks for each project 
36        that uses it: right click on the required project, choose "Build options", 
37        go to "Linker settings" tab in the opened window , select unnecessary 
38        libraries and click "Delete" button.
39
40 3. Open Terminal application
41
42 4. Enter \<OCCT_ROOT_DIR\>:
43
44    cd \<OCCT_ROOT_DIR\>
45
46 5. To start Code::Blocks, run the command /codeblocks.sh
47
48 6. To build all toolkits, click "Build->Build workspace" in the menu bar.
49
50
51 To start DRAWEXE, which has been built with Code::Blocks on Mac OS X, perform 
52 the following steps:
53
54 1. Open Terminal application
55
56 2. Enter \<OCCT_ROOT_DIR\>:
57
58    cd \<OCCT_ROOT_DIR\>
59
60 3. Run script
61
62    ./draw_cbp.sh cbp [d]
63
64    Option "d" is used if OCCT has been built in Debug mode.