blob: ebc4f7da133be628f39cf29605ffa39bb8e319f3 [file] [log] [blame] [view]
Pascal Bachd5f87e12014-12-12 15:59:17 +01001# Apache Thrift - CMake build
2
3## Goal
4Extend Apache Thrift's *make cross* approach to the build system.
5
6Due to growing the field of operating system support, a proper executable
7and library detection mechanism running on as much platforms as possible
8becomes required. The other aspect to simplify the release process and
9package generation process.
10
11As nice side benefit of CMake is the generation of development environment
12specific soultion files. => No solution files within source tree.
13
14
15## Usage
16just do this:
17
Roger Meiera6b66332015-05-15 15:21:50 +020018 mkdir cmake-build && cd cmake-build
19 cmake ..
Pascal Bachd5f87e12014-12-12 15:59:17 +010020
21if you use a specific toolchain pass it to cmake, the same for options:
22
Roger Meier4ead5202015-05-15 16:21:41 +020023 cmake -DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake ..
Roger Meiera6b66332015-05-15 15:21:50 +020024 cmake -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5 ..
25 cmake -DTHRIFT_COMPILER_HS=OFF ..
26 cmake -DWITH_ZLIB=ON ..
27
28or on Windows
29
30 cmake -G "Visual Studio 12 2013 Win64" \
31 -DBOOST_ROOT=C:/3rdparty/boost_1_58_0 \
32 -DZLIB_ROOT=C:/3rdparty/zlib128-dll \
33 -DWITH_SHARED_LIB=off -DWITH_BOOSTTHREADS=ON ..
Pascal Bachd5f87e12014-12-12 15:59:17 +010034
35and open the development environment you like with the solution or do this:
36
37 make
38 make check
39 make cross
40 make dist
41
42to generate an installer and distribution package do this:
43
44 cpack
45
46## TODO
47* git hash or tag based versioning depending on source state
48* build tutorial
49* build test
50* with/without language lib/<lang>/
51* enable/disable
Pascal Bachd5f87e12014-12-12 15:59:17 +010052* make cross
53* make dist (create an alias to make package_source)
54* make doc
55* cpack (C++ and make dist only ?)
56 * thrift-compiler
57 * libthrift
58 * tutorial
59 * test
60* merge into /README.md