Theolizer
Version.1.2.0
serializer for C++ / Do you want to update your classes easily ?
4.project.h
[詳解]
1
//############################################################################
2
/*!
3
@brief ドキュメント・ファイル-プログラム開発方法詳細
4
@ingroup Documents
5
@file 4.project.h
6
@author Yoshinori Tahara
7
@date 2016/11/01 Created
8
*/
9
/*
10
© 2016 Theoride Technology (http://theolizer.com/) All Rights Reserved.
11
"Theolizer" is a registered trademark of Theoride Technology.
12
13
"Theolizer" License
14
In the case where you are in possession of a valid “Theolizer” License,
15
you may use this file in accordance with the terms and conditions of
16
the use license determined by Theoride Technology.
17
18
General Public License Version 3 ("GPLv3")
19
You may use this file in accordance with the terms and conditions of
20
GPLv3 published by Free Software Foundation.
21
Please confirm the contents of GPLv3 at https://www.gnu.org/licenses/gpl.txt .
22
A copy of GPLv3 is also saved in a LICENSE.TXT file.
23
24
商用ライセンス
25
あなたが有効なTheolizer商用ライセンスを保持している場合、
26
セオライド テクノロジーの定める使用許諾書の条件に従って、
27
このファイルを取り扱うことができます。
28
29
General Public License Version 3(以下GPLv3)
30
Free Software Foundationが公表するGPLv3の使用条件に従って、
31
あなたはこのファイルを取り扱うことができます。
32
GPLv3の内容を https://www.gnu.org/licenses/gpl.txt にて確認して下さい。
33
またGPLv3のコピーをLICENSE.TXTファイルにおいてます。
34
*/
35
//############################################################################
36
37
/*!
38
@page HowToMakeProject Theolizerの組み込み方とファイル構成
39
40
<br>
41
//############################################################################
42
@section Selecting 1.Theolizerライブラリの選択
43
//############################################################################
44
45
---
46
Theolizerは下記ライブラリを用意しています。
47
48
| リンク種別名 | Theolizer | boost | 標準<br>ランタイム |お薦めの選択|
49
|--------------|-----------|-------|----------------|------------|
50
|StaticWithBoost|静的リンク|静的リンク(同梱)|動的リンク|あなたのプログラムが[boost](https://ja.wikipedia.org/wiki/Boost)を使っていない時|
51
|Static|静的リンク|静的リンク(非同梱)|動的リンク|あなたのプログラムが[boost](https://ja.wikipedia.org/wiki/Boost)を使っている時 <b>(*1)</b> |
52
|Shared|動的リンク|静的リンク|動的リンク|あなたのプログラムが[boost](https://ja.wikipedia.org/wiki/Boost)を使っていて<br>Theolizerライブラリのビルドを避けたい時 <b>(*2)</b> |
53
<b>(*1)</b> お使いの[boost](https://ja.wikipedia.org/wiki/Boost)のバージョンがTholizerの[boost](https://ja.wikipedia.org/wiki/Boost)のバージョンと異なる場合、[Theolizerライブラリのビルド](_how_to_build_theolizer.html#HowToBuildLibrary)が必要になります。<br>
54
<b>(*2)</b> Theolizerの動的リンク・ライブラリをパスの通ったフォルダへ置いて下さい
55
56
StaticとSharedは、それぞれ通常の静的リンク・ライブラリ、動的リンク・ライブラリです。
57
58
<div style="padding: 10px; margin-bottom: 10px; border: 1px solid #333333; border-radius: 10px; background-color: #d0d0d0;">
59
Theolizerは[boost](https://ja.wikipedia.org/wiki/Boost)のsystemとfilesystemを用いているため、Theolizerを静的リンクする場合は、これらのライブラリをあなたのプロジェクトでリンクする必要が有ります。[boost](https://ja.wikipedia.org/wiki/Boost)を既にお使いの方ならばあまり問題はないと思いますが、そうでない方にとってはboostのインストールと一部のビルドが新たに必要となります。<br>
60
その手間を省くため、プリビルド版の静的リンク・ライブラリとして[boost](https://ja.wikipedia.org/wiki/Boost)を同梱したライブラリも用意しました。それがStaticWithBoostです。
61
</div>
62
63
<br>
64
//############################################################################
65
@section CMake 2.CMakeを使う場合
66
//############################################################################
67
68
---
69
あなたのプロジェクトのCMakeLists.txtに下記を追加して下さい。
70
71
project(<あなたのプロジェクト名>)
72
:
73
find_package(THEOLIZER)
74
:
75
add_executable(<ターゲット名>)
76
or
77
add_library(<ターゲット名>)
78
:
79
setup_theolizer(<ターゲット名> <リンク種別>)
80
81
`<ターゲット名>`はTheolizerライブラリをリンクするあなたのプログラムを指定します。
82
add_executable()やadd_library()のターゲット名です。
83
84
`<リンク種別>`はリンクするTheolizerライブラリの種別を指定します。
85
StaticWithBoost、Static、Sharedのどれかを指定して下さい。
86
87
CMakeLists.txt作成後、THEOLIZER_DIRに <b>Theolizerルート・フォルダ</b> を設定し、CMakeでプロジェクトを生成して下さい。<br>
88
89
<br>
90
//############################################################################
91
@section Example 3.exampleのビルド例(CMake使用)
92
//############################################################################
93
94
---
95
96
TheolizerのGitHubリポジトリのトップ・ページにあるexampleのソース・コードとCMakeLists.txtを <b>source/samples/example</b> に置いています。これは「2.CMakeを使う場合」のサンプルとなります。<br>
97
適切なビルド・フォルダを作成して、そこで下記コマンドを実行することで、プロジェクト生成→ビルド→テスト実行が行われます。<br>
98
99
全てsource/samples/exampleフォルダで作業して下さい。<br>
100
なお、下記は全てReleaseビルドの例です。Debugビルドする時は、Releaseの代わりにDebugを指定して下さい。<br>
101
102
#### Visual Studio 2015(32bits版)の場合
103
104
mkdir msvc32
105
cd msvc32
106
cmake -G "Visual Studio 14" .. -DTHEOLIZER_DIR=<Theolizerルート・フォルダ>
107
cmake --build . --config Release --target BuildTest
108
109
#### Visual Studio 2015(64bits版)の場合
110
111
mkdir msvc64
112
cd msvc64
113
cmake -G "Visual Studio 14 Win64" .. -DTHEOLIZER_DIR=<Theolizerルート・フォルダ>
114
cmake --build . --config Release --target BuildTest
115
116
#### MiGWの場合(事前にMinGWへのパスを設定下さい)
117
118
mkdir mingw
119
cd mingw
120
cmake -G "MinGW Makefiles" .. -DTHEOLIZER_DIR=<Theolizerルート・フォルダ> -DCMAKE_BUILD_TYPE=Release
121
make BuildTest
122
123
#### gcc(Linux)の場合
124
125
mkdir gcc
126
cd gcc
127
cmake -G "Unix Makefiles" .. -DTHEOLIZER_DIR=<Theolizerルート・フォルダ> -DCMAKE_BUILD_TYPE=Release
128
make BuildTest
129
130
<br>
131
//############################################################################
132
@section NonCMake 4.CMakeを使わない場合
133
//############################################################################
134
135
---
136
「@ref Mechanism43 」にて仕組み記述しています。また「@ref FileStructure 」に`<Theolizerルート・フォルダ>`からのフォルダ構成を記載しています。これらを参考に下記をビルド・プロジェクトへ設定下さい。
137
138
|コンパイラ・オプション|指定内容|
139
|----------------------|--------|
140
|コンパイラ|Theolizerルート・フォルダ/bin/TheolizerDriver|
141
|インクルード・パス|Theolizerルート・フォルダ/include|
142
|ライブラリ・パス|Theolizerルート・フォルダ/lib|
143
|ライブラリ・ファイル|「@ref Selecting 」で選択したライブラリ。<br>ファイル名は「@ref FileStructure 」参照。|
144
|マクロ定義|THEOLIZER_DO_PROCESS|
145
|マクロ定義(Visual C++の場合)|`theolizer_original_compiler=<元コンパイラのパス>`|
146
|オプション指定(その他の場合)|`--theolizer_original_compiler=<元コンパイラのパス>`|
147
|Sharedの場合は追加マクロ定義|THEOLIZER_DYN_LINK|
148
149
<br>
150
//############################################################################
151
@section FileStructure 5.ファイル構成
152
//############################################################################
153
154
---
155
<b>Theolizerルート・フォルダ</b>からの相対パスにて各ファイルが存在する場所を示します。
156
157
#### Visual Studio C++
158
159
|相対パス|ファイル種別|ファイル名|
160
|-------|----------|--------|
161
|ルート|cmakeのfind_package用<br>Theolizerのライセンス(GPLv3)|THEOLIZERConfig.cmake,theolizer.props.in<br>LICENSE.TXT|
162
|bin|Theolizerドライパ|TheolizerDriver.exe|
163
|include/theolizer|ヘッダ・ファイル群|`*.h`, `*.inc`|
164
|lib|StaticWithBoost(Release)ライブラリ|TheolizerLibStaticWithBoost.lib|
165
||Static(Release)ライブラリ|TheolizerLibStatic.lib|
166
||Shared(Release)ライブラリ|TheolizerLibShared.dll|
167
||StaticWithBoost(Debug)ライブラリ|TheolizerLibStaticWithBoostd.lib|
168
||Static(Debug)ライブラリ|TheolizerLibStaticd.lib|
169
||Shared(Debug)ライブラリ|TheolizerLibSharedd.dll|
170
|msbuild-bin|Theolizerドライパをリネームしたファイル|cl.exe|
171
|other_licenses|Theolizerにリンクしている他プロジェクトのライセンス|LICENSE-*.txt|
172
173
注)インクルード・パスは、include/theolizerではなく、includeを指定して下さい。
174
175
下記は各種補助ファイル群です。
176
177
|相対パス|ファイル種別|ファイル名|
178
|-------|----------|--------|
179
|doc/ja|詳細ドキュメント|index.html, html/\*.\*|
180
|lib|StaticWithBoost(Release)テスト用ライブラリ|TheolizerTestStaticWithBoost.lib|
181
||Static(Release)テスト用ライブラリ|TheolizerTestStatic.lib|
182
||Shared(Release)テスト用ライブラリ|TheolizerTestShared.dll|
183
||StaticWithBoost(Debug)テスト用ライブラリ|TheolizerTestStaticWithBoostd.lib|
184
||Static(Debug)テスト用ライブラリ|TheolizerTestStaticd.lib|
185
||Shared(Debug)テスト用ライブラリ|TheolizerTestSharedd.dll|
186
|samples|サンプル・プログラム|CMakeLists.txt, *.cpp, *.h|
187
188
注)テスト用ライブラリは、Theolizerの自動テストで使用しているライブラリです。
189
190
#### MinGWとgcc
191
192
|相対パス|ファイル種別|ファイル名|
193
|-------|----------|--------|
194
|ルート|cmakeのfind_package用<br>Theolizerのライセンス(GPLv3)|THEOLIZERConfig.cmake<br>LICENSE.TXT|
195
|bin|Theolizerドライパ|TheolizerDriver.exe|
196
|include/theolizer|ヘッダ・ファイル群|`*.h`, `*.inc`|
197
|lib/Relase|StaticWithBoost(Release)ライブラリ|libTheolizerLibStaticWithBoost.a|
198
||Static(Release)ライブラリ|libTheolizerLibStatic.a|
199
||Shared(Release)ライブラリ|libTheolizerLibShared.so|
200
|lib/Debug|StaticWithBoost(Debug)ライブラリ|libTheolizerLibStaticWithBoost.a|
201
||Static(Debug)ライブラリ|libTheolizerLibStatic.a|
202
||Shared(Debug)ライブラリ|libTheolizerLibShared.so|
203
|other_licenses|Theolizerにリンクしている他プロジェクトのライセンス|LICENSE-*.txt|
204
205
注)インクルード・パスは、include/theolizerではなく、includeを指定して下さい。
206
207
下記は各種補助ファイル群です。
208
209
|相対パス|ファイル種別|ファイル名|
210
|-------|----------|--------|
211
|doc/ja|詳細ドキュメント|index.html, html/\*.\*|
212
|lib/Relase|StaticWithBoost(Release)テスト用ライブラリ|libTheolizerTestStaticWithBoost.a|
213
||Static(Release)テスト用ライブラリ|libTheolizerTestStatic.a|
214
||Shared(Release)テスト用ライブラリ|libTheolizerTestShared.so|
215
|lib/Debug|StaticWithBoost(Debug)テスト用ライブラリ|libTheolizerTestStaticWithBoost.a|
216
||Static(Debug)テスト用ライブラリ|libTheolizerTestStatic.a|
217
||Shared(Debug)テスト用ライブラリ|libTheolizerTestShared.so|
218
|samples|サンプル・プログラム|CMakeLists.txt, *.cpp, *.h|
219
220
注)テスト用ライブラリは、Theolizerの自動テストで使用しているライブラリです。
221
222
*/
Theolizer
source
document
ja
4.project.h
© 2016
Theoride Technology
All Rights Reserved. "Theolizer" is a registered trademark of Theoride Technology.
構築:
1.8.12