Skip to content

Commit 9ded670

Browse files
committed
Trying to cleanup app_build
1 parent 1d49e99 commit 9ded670

File tree

1 file changed

+37
-65
lines changed

1 file changed

+37
-65
lines changed

docs/dev/app_build.rst

+37-65
Original file line numberDiff line numberDiff line change
@@ -17,71 +17,43 @@ the specific application build instructions first.
1717
1. Make sure you have a working :doc:`build_env`.
1818

1919
2. Get the source code for your application.
20-
- If you are creating a new C++ application to add support for a device,
21-
generate a project from the `AppTemplate_cpp_qt <https://github.com/labstreaminglayer/AppTemplate_cpp_qt/generate>`__
22-
- git clone the application.
20+
* If you are creating a new C++ application to add support for a device then generate a project from the `AppTemplate_cpp_qt <https://github.com/labstreaminglayer/AppTemplate_cpp_qt/generate>`__
21+
* git clone the application
2322

2423
3. Create the build directory
25-
26-
- You can use a GUI file manager to do this part or you can do it by
27-
command line as below.
28-
- Open a terminal/shell/command prompt and change to the
29-
repository directory.
30-
31-
- If the build directory is already there then delete it
32-
33-
- Windows: :cmd:`rmdir /S build`; Others: :cmd:`rm -Rf build`
24+
* You can use a GUI file manager to do this part or you can do it by command line as below.
25+
* Open a terminal/shell/command prompt and change to the repository directory.
26+
* If the build directory is already there then delete it
27+
* Windows: :cmd:`rmdir /S build`; Others: :cmd:`rm -Rf build`
3428

3529
4. Configure the project using :ref:`lslbuildenv` cmake.
36-
37-
- Option 1 - Visual Studio 2017 or later
38-
39-
- Open the :file:`CMakeLists.txt` file in Visual Studio
40-
(:guilabel:`File->Open->CMake`)
41-
- Change CMake settings via :guilabel:`CMake->Change CMake Settings`
42-
43-
- See `Common CMake Settings <#common-cmake-options>`__ below
44-
45-
- Change the selected project from the drop-down menu (:guilabel:`x64-Debug`,
46-
:guilabel:`x64-Release`).
47-
This will trigger a CMake re-configure with the new variables.
48-
49-
- Option 2 - Using commandline.
50-
51-
- Open a Terminal window or, on Windows, a ``x64 Native Tools Command Prompt
52-
for VS2017`` (or VS2019, as needed).
53-
- Run cmake with appropriate `commandline options <#common-cmake-options>`__.
54-
55-
- Option 3 - Using the GUI
56-
57-
- Open a terminal/shell/command prompt and change to the
58-
repository directory (:cmd:`cmake-gui -S . -B build`)
59-
- Do an initial :guilabel:`Configure`.
60-
Agree to create the directory if asked.
61-
- Select your compiler and click Finish.
62-
- Use the interface to set or add options/paths (:guilabel:`Add Entry`).
63-
64-
- :ref:`Qt5` if the guessed path is not right
65-
- :ref:`Boost` if the default was not correct
66-
- A path where redistributable binaries get copied
67-
(``CMAKE_INSTALL_PREFIX``)
68-
- Build type (``CMAKE_BUILD_TYPE``, either ``Release`` or
69-
``Debug``). You can change this in Visual Studio later.
70-
- Click on :guilabel:`Configure` again to confirm changes.
71-
72-
- Click on :guilabel:`Generate` to create the build files / Visual Studio
73-
Solution file
30+
* Option 1 - Visual Studio 2017 or later
31+
* Open the :file:`CMakeLists.txt` file in Visual Studio (:guilabel:`File->Open->CMake`)
32+
* Change CMake settings via :guilabel:`CMake->Change CMake Settings`
33+
* See `Common CMake Settings <#common-cmake-options>`__ below
34+
* Change the selected project from the drop-down menu (:guilabel:`x64-Debug`, :guilabel:`x64-Release`). This will trigger a CMake re-configure with the new variables.
35+
* Option 2 - Using commandline.
36+
* Open a Terminal window or, on Windows, a ``x64 Native Tools Command Prompt for VS2017`` (or VS2019, as needed).
37+
* Run cmake with appropriate `commandline options <#common-cmake-options>`__.
38+
* Option 3 - Using the GUI
39+
* Open a terminal/shell/command prompt and change to the repository directory.
40+
* Run :cmd:`cmake-gui -S . -B build`
41+
* Do an initial :guilabel:`Configure`. Agree to create the directory if asked.
42+
* Select your compiler and click Finish.
43+
* Use the interface to set or add options/paths (:guilabel:`Add Entry`).
44+
* :ref:`Qt5` if the guessed path is not right
45+
* :ref:`Boost` if the default was not correct
46+
* A path where redistributable binaries get copied (``CMAKE_INSTALL_PREFIX``)
47+
* Build type (``CMAKE_BUILD_TYPE``, either ``Release`` or ``Debug``). You can change this in Visual Studio later.
48+
* Click on :guilabel:`Configure` again to confirm changes.
49+
* Click on :guilabel:`Generate` to create the build files / Visual Studio Solution file
7450

7551
5. Build the project
76-
- If using command line
77-
78-
- Start the build process
79-
(:cmd:`cmake --build . --config Release --target install`
80-
(see also :ref:`cmakeinstalltarget`)
81-
82-
- If using Visual Studio >=2017 built-in CMake utilities
83-
84-
- Use the CMake menu > Install > ApplicationName
52+
* If using command line
53+
* Start the build process (:cmd:`cmake --build . --config Release --target install`)
54+
* (see also :ref:`cmakeinstalltarget`)
55+
* If using Visual Studio >=2017 built-in CMake utilities
56+
* Use the CMake menu > Install > ApplicationName
8557

8658
This will create a distribution tree in the folder specified by
8759
:ref:`CMAKE_INSTALL_PREFIX <cmakeinstalltarget>` similar to this:
@@ -148,15 +120,15 @@ Apps, then you will have to provide some optional arguments to the cmake
148120
command.
149121

150122
- `Generator <https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#cmake-generators>`__:
151-
``-G <generator name>``.
123+
``-G <generator name>``.
152124

153125
- App dependencies (required by some apps). See :ref:`lslbuildenv` for more info.
126+
- ``-DVendor_ROOT=<path/to/vendor/sdk>``
127+
- ``-DQt5_DIR=<path/to/qt/binaries>/lib/cmake/Qt5``
128+
- On MacOS the path can be learned from homebrew: ``-DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5``
129+
- ``-DBOOST_ROOT=<path/to/boost>``
154130

155-
- ``-DVendor_ROOT=<path/to/vendor/sdk>``
156-
- ``-DQt5_DIR=<path/to/qt/binaries>/lib/cmake/Qt5``
157-
- ``-DBOOST_ROOT=<path/to/boost>``
158-
159-
- Location of liblsl (see :doc:`LSL_INSTALL_ROOT`)
131+
- Location of liblsl (see :doc:`LSL_INSTALL_ROOT`)
160132

161133
- Use ``-DLSL_UNIXFOLDERS=0`` on MacOS if your application is not bundled with its dylib.
162134

0 commit comments

Comments
 (0)