-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ upa-url/upa@29dd10f 🚀
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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=<ICU directory></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> | ||
|
@@ -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("gh:upa-url/[email protected].0")</div> | ||
<div class="fragment"><div class="line">CPMAddPackage("gh:upa-url/[email protected].1")</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> | ||
|
@@ -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& ex) {</div> | ||
<div class="line"> std::cerr << <span class="stringliteral">"Error: "</span> << ex.what() << <span class="charliteral">'\n'</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">"http://host/"</span>))) {</div> | ||
<div class="line"> url.<a class="code hl_function" href="classupa_1_1url.html#aefff2a396c60bb736c6af7c94e67e834">protocol</a>(<span class="stringliteral">"https:"</span>);</div> | ||
<div class="line"> url.<a class="code hl_function" href="classupa_1_1url.html#a9596575079d483f7fd33527f61cc2a6b">host</a>(<span class="stringliteral">"example.com:443"</span>);</div> | ||
|