Skip to content

Commit

Permalink
Deploying to gh-pages from @ upa-url/upa@29dd10f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Aug 26, 2024
1 parent 5cb4362 commit 654c88b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1><a class="anchor" id="installation"></a>
<p>The simplest way is to use two amalgamated files: <code><a class="el" href="url_8h.html">url.h</a></code> and <code>url.cpp</code>. You can download them from <a href="https://github.com/upa-url/upa/releases">releases page</a>, or if you have installed Python, then generate them by running <code>tools/amalgamate.sh</code> script (<code>tools/amalgamate.bat</code> on Windows). The files will be created in the <code>single_include/upa</code> directory.</p>
<h2><a class="anchor" id="cmake"></a>
CMake</h2>
<p>The library can be built and installed using CMake 3.13 or later. To build and install to default directory (usualy <code>/usr/local</code> on Linux) run following commands: </p><div class="fragment"><div class="line">cmake -B build -DUPA_BUILD_TESTS=OFF</div>
<p>The library can be built and installed using CMake 3.13 or later. To build and install to default directory (usually <code>/usr/local</code> on Linux) run following commands: </p><div class="fragment"><div class="line">cmake -B build -DUPA_BUILD_TESTS=OFF</div>
<div class="line">cmake --build build</div>
<div class="line">cmake --install build</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>If ICU is installed in a non-default directory, then specify <code>-DICU_ROOT=&lt;ICU directory&gt;</code> parameter in the first command. If you are building for Windows 10 version 1903 or later, ICU bundled with Windows can be used: specify the <code>-DUPA_USE_WINDOWS_ICU=ON</code> parameter in the first command.</dd></dl>
Expand All @@ -160,15 +160,15 @@ <h2><a class="anchor" id="cmake"></a>
<div class="line">FetchContent_Declare(upa</div>
<div class="line"> GIT_REPOSITORY https://github.com/upa-url/upa.git</div>
<div class="line"> GIT_SHALLOW TRUE</div>
<div class="line"> GIT_TAG v0.4.0</div>
<div class="line"> GIT_TAG v0.4.1</div>
<div class="line">)</div>
<div class="line">FetchContent_MakeAvailable(upa)</div>
<div class="line">...</div>
<div class="line">target_link_libraries(exe-target PRIVATE upa::url)</div>
</div><!-- fragment --><h3><a class="anchor" id="embedding-with-cpmcmake-script"></a>
Embedding with CPM.cmake script</h3>
<p>If you are using the <a href="https://github.com/cpm-cmake/CPM.cmake">CPM.cmake script</a> and have included it in your <code>CMakeLists.txt</code>, then:</p>
<div class="fragment"><div class="line">CPMAddPackage(&quot;gh:upa-url/[email protected].0&quot;)</div>
<div class="fragment"><div class="line">CPMAddPackage(&quot;gh:upa-url/[email protected].1&quot;)</div>
<div class="line">...</div>
<div class="line">target_link_libraries(exe-target PRIVATE upa::url)</div>
</div><!-- fragment --><h1><a class="anchor" id="usage"></a>
Expand Down Expand Up @@ -224,7 +224,7 @@ <h2><a class="anchor" id="examples"></a>
<div class="line"><span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; ex) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Error: &quot;</span> &lt;&lt; ex.what() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Use setters of the url class: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classupa_1_1url.html">upa::url</a> url;</div>
</div><!-- fragment --><p>Use setters of the <code>url</code> class: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classupa_1_1url.html">upa::url</a> url;</div>
<div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="namespaceupa.html#a05a9cf5ac0b5dafa3ed684f3a17f4710">upa::success</a>(url.<a class="code hl_function" href="classupa_1_1url.html#ac453ab48b67747219bcfc95462f61c53">parse</a>(<span class="stringliteral">&quot;http://host/&quot;</span>))) {</div>
<div class="line"> url.<a class="code hl_function" href="classupa_1_1url.html#aefff2a396c60bb736c6af7c94e67e834">protocol</a>(<span class="stringliteral">&quot;https:&quot;</span>);</div>
<div class="line"> url.<a class="code hl_function" href="classupa_1_1url.html#a9596575079d483f7fd33527f61cc2a6b">host</a>(<span class="stringliteral">&quot;example.com:443&quot;</span>);</div>
Expand Down

0 comments on commit 654c88b

Please sign in to comment.