-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathEp021-Dependencies-FetchContent.drawio
55 lines (55 loc) · 7.93 KB
/
Ep021-Dependencies-FetchContent.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<mxfile host="Electron" modified="2023-12-18T06:59:15.698Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="t5Gzg-QnsiTpxzbfkqi-" version="21.2.8" type="device">
<diagram name="Page-1" id="wdU2vlvLfLhHSGHgqa0V">
<mxGraphModel dx="4718" dy="868" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3300" pageHeight="4681" background="#999999" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="eCz0pDOJpor3ejvm-4k_-3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1e1e1e;" parent="1" vertex="1">
<mxGeometry x="1410" y="210" width="1130" height="610" as="geometry" />
</mxCell>
<mxCell id="08-NsosBbDU-mmR43x8U-6" value="<font style="font-size: 18px;" color="#ffffcc">CMakeLists.txt</font>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="700" y="140" width="150" height="30" as="geometry" />
</mxCell>
<mxCell id="08-NsosBbDU-mmR43x8U-7" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#1e1e1e;" parent="1" vertex="1">
<mxGeometry x="520" y="180" width="760" height="320" as="geometry" />
</mxCell>
<mxCell id="08-NsosBbDU-mmR43x8U-31" value="<span style="font-size: 70px;">Dependencies: FetchContent</span>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="-670" y="77.5" width="1077" height="382.5" as="geometry" />
</mxCell>
<mxCell id="MFZtFx-qUxBc-n4n6ePM-2" value="<font style="font-size: 33px;">Getting the dependencies</font>" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="110" width="510" height="60" as="geometry" />
</mxCell>
<mxCell id="MFZtFx-qUxBc-n4n6ePM-10" value="<font style="font-size: 33px;">Link against targets in the dependency</font>" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="1640" y="130" width="620" height="60" as="geometry" />
</mxCell>
<mxCell id="eCz0pDOJpor3ejvm-4k_-1" value="<div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 24px; line-height: 32px;"><div><span style="color: #569cd6;">include</span><span style="color: #d4d4d4;">(FetchContent)</span></div><div><span style="color: #d4d4d4;">FetchContent_Declare(</span></div><div><span style="color: #d4d4d4;">&nbsp; fmt</span></div><div><span style="color: #d4d4d4;">&nbsp; GIT_REPOSITORY https://github.com/fmtlib/fmt.git</span></div><div><span style="color: #d4d4d4;">&nbsp; GIT_TAG 10.1.1</span></div><div><span style="color: #d4d4d4;">)</span></div><br><div><span style="color: #d4d4d4;">FetchContent_MakeAvailable(fmt)</span></div></div>" style="text;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="580" y="190" width="680" height="270" as="geometry" />
</mxCell>
<mxCell id="eCz0pDOJpor3ejvm-4k_-2" value="<div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, &quot;Courier New&quot;, monospace; font-weight: normal; font-size: 24px; line-height: 32px;"><div><span style="color: #569cd6;">cmake_minimum_required</span><span style="color: #d4d4d4;">(VERSION 3.21)</span></div><div><span style="color: #569cd6;">project</span><span style="color: #d4d4d4;">(CustomTargets)</span></div><br><div><span style="color: #569cd6;">list</span><span style="color: #d4d4d4;">(APPEND CMAKE_MODULE_PATH </span><span style="color: #ce9178;">"${CMAKE_SOURCE_DIR}/cmake"</span><span style="color: #d4d4d4;">)</span></div><br><div><span style="color: #569cd6;">set</span><span style="color: #d4d4d4;">(CMAKE_CXX_STANDARD 23)</span></div><div><span style="color: #569cd6;">set</span><span style="color: #d4d4d4;">(CMAKE_CXX_STANDARD_REQUIRED </span><span style="color: #569cd6;">ON</span><span style="color: #d4d4d4;">)</span></div><br><div><span style="color: #569cd6;">include</span><span style="color: #d4d4d4;">(AddFmt)</span></div><br><div><span style="color: #569cd6;">add_executable</span><span style="color: #d4d4d4;">(rooster main.cpp person.cpp)</span></div><div><span style="color: #569cd6;">target_include_directories</span><span style="color: #d4d4d4;">(rooster PRIVATE </span><span style="color: #569cd6;">${CMAKE_CURRENT_SOURCE_DIR}</span><span style="color: #d4d4d4;">)</span></div><div><span style="color: #569cd6;">target_link_libraries</span><span style="color: #d4d4d4;">(rooster PRIVATE fmt::fmt)</span></div><br><div><span style="color: #569cd6;">include</span><span style="color: #d4d4d4;">(ClangFormat)</span></div><div><span style="color: #d4d4d4;">add_clang_format_target(format-code </span><span style="color: #569cd6;">${PROJECT_SOURCE_DIR}</span><span style="color: #d4d4d4;">)</span></div></div>" style="text;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="1530" y="220" width="940" height="550" as="geometry" />
</mxCell>
<mxCell id="3YVHrWgA-lgqnzn3ETmD-2" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="-60" y="460" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3YVHrWgA-lgqnzn3ETmD-3" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="-10" y="670" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3YVHrWgA-lgqnzn3ETmD-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="90" y="530" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3YVHrWgA-lgqnzn3ETmD-5" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="40" y="530" as="sourcePoint" />
<mxPoint x="40" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3YVHrWgA-lgqnzn3ETmD-6" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="109" y="590" as="sourcePoint" />
<mxPoint x="109" y="660" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>