質問するログイン新規登録

回答編集履歴

3

修正

2020/07/24 15:24

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -1,4 +1,4 @@
1
- include_directories() に [ToruNiina/toml11: TOML for Modern C++](https://github.com/ToruNiina/toml11) からダウンロードした `toml11` ファイルのパスを指定すれば、`#include <toml.hpp>` で include できます。
1
+ include_directories() に [ToruNiina/toml11: TOML for Modern C++](https://github.com/ToruNiina/toml11) からダウンロードした `toml11` ディレクトリのパスを指定すれば、`#include <toml.hpp>` で include できます。
2
2
 
3
3
  ## 例
4
4
 
@@ -6,11 +6,22 @@
6
6
  include_directories() を相対パスで指定する場合は、基点となるディレクトリは CMakeLists.txt があるパスになります。
7
7
 
8
8
  ```
9
- ├─CMakeLists.txt
9
+ CMakeLists.txt
10
10
  ├─src
11
11
  │ └─main.cpp
12
-
13
- └─toml11 ← ダウンロードしたフォルダごと置
12
+ └─toml11 ← git clone したディレクトリごと
13
+ │ .gitignore
14
+ │ .travis.yml
15
+ │ appveyor.yml
16
+ │ CMakeLists.txt
17
+ │ LICENSE
18
+ │ README.md
19
+ │ toml.hpp
20
+ ├─.circleci
21
+ ├─.github
22
+ ├─cmake
23
+ ├─tests
24
+ └─toml
14
25
  ```
15
26
 
16
27
 

2

修正

2020/07/24 15:23

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## 例
4
4
 
5
+ toml11 を置いた場所に応じて適宜変更してください
6
+ include_directories() を相対パスで指定する場合は、基点となるディレクトリは CMakeLists.txt があるパスになります。
7
+
5
8
  ```
6
9
  ├─CMakeLists.txt
7
10
  ├─src

1

修正

2020/07/24 09:56

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -7,7 +7,7 @@
7
7
  ├─src
8
8
  │ └─main.cpp
9
9
 
10
- └─toml11
10
+ └─toml11 ← ダウンロードしたフォルダごと置く
11
11
  ```
12
12
 
13
13