Skip to content

Commit

Permalink
Generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Box-Coder committed Nov 6, 2022
1 parent 77f4872 commit 1908cf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/files/🗒️_User_Manual/02-_Using_ssGUI-txt.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@

<a name="🟦_CMake_"></a><a name="Topic1692"></a><div class="CTopic TGroup LTextFile">
<div class="CTitle">🟦 CMake:</div>
<div class="CBody"><div class="CImage"><a href="../../images/CMake_Resized.png" target="_blank" class="ZoomLink"><img src="../../images/CMake_Resized.png" loading="lazy" class="KnownDimensions" width="240" height="120" style="max-width: 240px" alt="CMake_Resized" /></a></div><p>Although CMake is not required, it is strongly recommended as it greatly reduce the effort sorting out compiling and linking</p><p>and also unifies how to generate make files cross platform.</p><p>You can still use Visual Studio by generating a solution file.</p><p>Again, this will cover both scenario <a href="../../index.html#File:🗒️_User_Manual/02._Using_ssGUI.txt:a.Using_ssGUI_in_your_CMake_project" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,1505);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >a. Using ssGUI in your CMake project</a> and <a href="../../index.html#File:🗒️_User_Manual/02._Using_ssGUI.txt:b.Using_ssGUI_as_it_is" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,485);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >b. Using ssGUI as it is</a></p></div>
<div class="CBody"><div class="CImage"><a href="../../images/CMake_Resized.png" target="_blank" class="ZoomLink"><img src="../../images/CMake_Resized.png" loading="lazy" class="KnownDimensions" width="240" height="120" style="max-width: 240px" alt="CMake_Resized" /></a></div><p>Although CMake is not required, it is strongly recommended as it greatly reduce the effort sorting out compiling and linking</p><p>and also unifies how to generate make files cross platform.</p><p>You can still use Visual Studio by generating a solution file.</p><p>Again, this will cover both scenario <a href="../../index.html#File:🗒️_User_Manual/02._Using_ssGUI.txt:a.Using_ssGUI_in_your_CMake_project" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,1441);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >a. Using ssGUI in your CMake project</a> and <a href="../../index.html#File:🗒️_User_Manual/02._Using_ssGUI.txt:b.Using_ssGUI_as_it_is" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,485);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >b. Using ssGUI as it is</a></p></div>
</div>

<a name="a.Using_ssGUI_in_your_CMake_project"></a><a name="Topic1505"></a><div class="CTopic TInformation LTextFile">
<a name="a.Using_ssGUI_in_your_CMake_project"></a><a name="Topic1441"></a><div class="CTopic TInformation LTextFile">
<div class="CTitle">a. Using ssGUI in your CMake project</div>
<div class="CBody"><ul><li><p><b>1.</b> First, you need to git clone recursive ssGUI to the directory you like.</p><ul><li><p><b>a.</b> Go to the directory you like ssGUI to be in.</p></li><li><p><b>b.</b> To use latest stable release, Run</p></li></ul></li></ul><pre class="CText">git clone -b v0.93.00.a --recursive --single-branch https://github.com/Neko-Box-Coder/ssGUI.git</pre><ul><li><p>Alternatively, if you want main branch, do</p></li></ul><pre class="CText">git clone --recursive https://github.com/Neko-Box-Coder/ssGUI.git</pre><p></p><ul><li><p><b>2.</b> Add <u>ssGUI</u> to your <u>CMakeLists.txt</u> with</p></li></ul><pre class="CText">add_subdirectory(&quot;${CMAKE_CURRENT_SOURCE_DIR}/directory/to/ssGUI&quot;)</pre><ul><li><p>Note that the above line <b>MUST</b> be after adding SFML packages, so after the line below in your <u>CMakeLists.txt</u>:</p></li></ul><pre class="CText">find_package(SFML 3 COMPONENTS System Window Graphics Network Audio REQUIRED)</pre><ul><li><p>This is because ssGUI will automatically link SFML package.</p></li></ul><p></p><ul><li><p><b>3.</b> After adding ssGUI to your CMake project, you will have to link ssGUI to your project.</p><p>So if your project target name is <u>example</u>, then this should work.</p></li></ul><pre class="CText">target_link_libraries(example PUBLIC ssGUI)</pre><ul><li><p>So your CMakeLists.txt might look something like this:</p></li></ul><pre class="CCode">cmake_minimum_required(VERSION <span class="SHNumber">3.14</span>)<br /><br /><span class="SHComment"># set the project name</span><br />project(example)<br /><br /><span class="SHComment"># add the executable</span><br />add_executable(example <span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/main.cpp&quot;</span>)<br /><br /><span class="SHComment"># Set the SFML directory</span><br /><span class="SHKeyword">set</span>(SFML_DIR <span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/Directory/To/SFML/lib/cmake/SFML&quot;</span>)<br /><br /><span class="SHComment"># If you are not sure if it is set correctly, you can print it</span><br /><span class="SHComment"># message(&quot;${SFML_DIR}&quot;)</span><br /><br /><span class="SHComment"># Import SFML</span><br />find_package(SFML <span class="SHNumber">3</span> COMPONENTS System Window Graphics Network Audio REQUIRED)<br /><br /><span class="SHComment"># Import ssGUI</span><br />add_subdirectory(<span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/directory/to/ssGUI&quot;</span>)<br /><br /><span class="SHComment"># Link ssGUI to executable</span><br />target_link_libraries(example PUBLIC ssGUI)</pre><ul><li><p><b>4.</b> After finishing your <u>CMakeLists.txt</u>, you will need to re-configure it in order to show the ssGUI CMake options.</p></li></ul></div>
<div class="CBody"><ul><li><p><b>1.</b> First, you need to git clone recursive ssGUI to the directory you like.</p><ul><li><p><b>a.</b> Go to the directory you like ssGUI to be in.</p></li><li><p><b>b.</b> To use latest stable release, Run</p></li></ul></li></ul><pre class="CText">git clone -b v0.93.00.b --recursive https://github.com/Neko-Box-Coder/ssGUI.git</pre><ul><li><p>Alternatively, if you want main branch, do</p></li></ul><pre class="CText">git clone --recursive https://github.com/Neko-Box-Coder/ssGUI.git</pre><p></p><ul><li><p><b>2.</b> Add <u>ssGUI</u> to your <u>CMakeLists.txt</u> with</p></li></ul><pre class="CText">add_subdirectory(&quot;${CMAKE_CURRENT_SOURCE_DIR}/directory/to/ssGUI&quot;)</pre><ul><li><p>Note that the above line <b>MUST</b> be after adding SFML packages, so after the line below in your <u>CMakeLists.txt</u>:</p></li></ul><pre class="CText">find_package(SFML 3 COMPONENTS System Window Graphics Network Audio REQUIRED)</pre><ul><li><p>This is because ssGUI will automatically link SFML package.</p></li></ul><p></p><ul><li><p><b>3.</b> After adding ssGUI to your CMake project, you will have to link ssGUI to your project.</p><p>So if your project target name is <u>example</u>, then this should work.</p></li></ul><pre class="CText">target_link_libraries(example PUBLIC ssGUI)</pre><ul><li><p>So your CMakeLists.txt might look something like this:</p></li></ul><pre class="CCode">cmake_minimum_required(VERSION <span class="SHNumber">3.14</span>)<br /><br /><span class="SHComment"># set the project name</span><br />project(example)<br /><br /><span class="SHComment"># add the executable</span><br />add_executable(example <span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/main.cpp&quot;</span>)<br /><br /><span class="SHComment"># Set the SFML directory</span><br /><span class="SHKeyword">set</span>(SFML_DIR <span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/Directory/To/SFML/lib/cmake/SFML&quot;</span>)<br /><br /><span class="SHComment"># If you are not sure if it is set correctly, you can print it</span><br /><span class="SHComment"># message(&quot;${SFML_DIR}&quot;)</span><br /><br /><span class="SHComment"># Import SFML</span><br />find_package(SFML <span class="SHNumber">3</span> COMPONENTS System Window Graphics Network Audio REQUIRED)<br /><br /><span class="SHComment"># Import ssGUI</span><br />add_subdirectory(<span class="SHString">&quot;${CMAKE_CURRENT_SOURCE_DIR}/directory/to/ssGUI&quot;</span>)<br /><br /><span class="SHComment"># Link ssGUI to executable</span><br />target_link_libraries(example PUBLIC ssGUI)</pre><ul><li><p><b>4.</b> After finishing your <u>CMakeLists.txt</u>, you will need to re-configure it in order to show the ssGUI CMake options.</p></li></ul></div>
</div>

<a name="b.Using_ssGUI_as_it_is"></a><a name="Topic485"></a><div class="CTopic TInformation LTextFile">
Expand Down

0 comments on commit 1908cf7

Please sign in to comment.