TOC
- Software needed
- Download the source code
- Rapid overview of the steps needed for the creation of the generator files
- Linux and MacOSX
- Windows - Visual Studio
- Windows - MinGW command line
- Generating the documentation
- More help
This sofware is known to compile and run under the following OS/compilers :
- Windows XP/Vista : g++ (MinGW), MSVC.
- Linux : g++, clang
- MacOSX : clang
To build this software you need cmake which is freely available for all platforms at : http://www.cmake.org
You will need at least CMake 2.4.6 or newer release of this software in order to generate the build generation files.
The source code is hosted on GitHub https://github.com/cstb/ifc-sdk
- you can either download an archive (zip or tar.gz) of a tagged release : https://github.com/cstb/ifc-sdk/releases
- or checkout the source code :
git clone git://github.com/cstb/ifc-sdk.git
- Install CMake
- Launch CMake
- Specify where is the source code: "Where is the source code": ....../ifc-sdk
- Specify where to build the binaries: "where to build the binaries": ....../ifc-sdk
- Click on "Configure"
- Select the generator If you select visual Studio 8 2005, sometimes CMake doesn't find the cmd.exe and you have to add in your system path the path to you windows\system32
- Click on "Configure" until the "OK" button becomes enable
- Click on "Ok"
The generator has created in ....../ifc-sdk/build the required files to build the project
-
make sure you have CMake installed and available on your path
-
install package :
- ubuntu :
~ $ apt-get install cmake uuid-dev
- homebrew :
~ $ brew install cmake
-
or download CMake from http://cmake.org
-
-
inside the ifc-sdk folder create a sub-folder called build (it can be any name and can even outside this ifc-sdk folder).
-
from this directory call CMake to generate the makefiles using the following command:
build $ cmake ..
or
build $ cmake path_to_ifc-sdk_folder
Note : Solaris needs an additional flag to compile (at least with SunStudio 11) you will need to issue the following command :
build $ cmake -D CMAKE_CXX_FLAGS:STRING=-library=stlport4 ..
- You now should have a `
Makefile
in this folder - launch
make
from this folder to perform the build - on successfull build you should have the libraries and the binaries located in your ifc-sdk/build folder
From the command line :
ifc-sdk $ mkdir build
ifc-sdk $ cd build
build $ cmake ..
[...]
build $ make
[...]
build $ make install
[...]
or a one liner :
ifc-sdk $ mkdir build && cd build && cmake .. && make && make
[...]
CMake comes under unices with a text based configuration utility called ccmake (note the two c's) launching 'ccmake ..' will bring up a configuration utility where you can specify :
- The build type : Debug, Release, etc.
- The installation prefix : default to /usr/local ('make install' to install the headers and libraries)
- If you want to enable the static build of the sdk
- Where you want your executables and libraries generated
- If you want to enable the tests (run them by calling
make test
)
- make sure you have CMake installed or else download CMake from http://cmake.org
- Launch CMake, This should open a window.
- You can now specify :
- where the source code is (the ifc-sdk folder)
- and where to build the binaries. It is usual to put them in a sub-folder of the source code called
build
- Hit the 'Configure' button. this should popup a window asking to choose a generator (select your visual studio version here and hit 'ok').
- Hit the 'Configure' once again and click 'Ok' to close the application.
- You now should now have a
ifc2x3_sdk.sln
Visual Studio solution file inside your binary directory. - open this solution from Visual Studio and generate the solution
- on successfull build you should have the libraries and the binaries located in your
ifc-sdk/build
folder. With the Visual Studio Generator from CMake the binaries are located in a sub-folder depending on the type of compilation requested (Debug, Release, etc.).
The CMake application has more configuration possibilities. Launch it again and you can specify :
- The installation prefix : default to
C:/Program Files/ifc-sdk
(Generate the Project 'INSTALL' from Visual Studio to install the headers and libraries). - If you want to enable the static build of the sdk
- Where you want your executables and libraries generated
- If you want to enable the tests (run them by generating the Project
RUN_TESTS
from the Visual Studio)
It's basiccaly a mix of the two precedent parts.
Follow 5.1 up to step 4 but choosing 'MinGW - Makefiles' obviously. Then follow 4.1 from step 6 using 'mingw32-make.exe' instead of 'make'.
The CMake application has more configuration possibilities. Launch it again and you can specify :
- The build type : Debug, Release, etc.
- The installation prefix : default to
C:/Program Files/ifc-sdk
(mingw32-make.exe install
to install the headers and libraries). - If you want to enable the static build of the sdk
- Where you want your executables and libraries generated
- If you want to enable the tests (run them by calling
mingw32-make.exe test
)
There is a special target that CMake will create called Documentation
that will generate the documention provided you have installed the tool called doxygen. It can be downloaded from http://doxygen.org. Documentation will be generated into the ifc-sdk/build/doc/html directory and the entry point is the 'index.html' file.
- make Documentation, or
- migw32-make.exe Documentation
- Generate the 'Documentation' project
For more information on CMake: http://www.cmake.org