Skip to content

Commit 485d3c7

Browse files
committed
docs: MinGW / Win32 quickstart
Added a section into the INSTALL.md for how to get started in windows using MSYS.
1 parent 60fcf65 commit 485d3c7

1 file changed

Lines changed: 49 additions & 5 deletions

File tree

INSTALL.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Install Ulfius
22

3-
- [Distribution packages](#distribution-packages)
4-
- [Manual install](#manual-install)
5-
- [Prerequisites](#prerequisites)
6-
- [CMake - Multi architecture](#cmake---multi-architecture)
7-
- [Good ol' Makefile](#good-ol-makefile)
3+
- [Install Ulfius](#install-ulfius)
4+
- [Distribution packages](#distribution-packages)
5+
- [Manual install](#manual-install)
6+
- [Prerequisites](#prerequisites)
7+
- [CMake - Multi architecture](#cmake---multi-architecture)
8+
- [CMake / Win32 / MinGW Quickstart](#cmake--win32--mingw-quickstart)
89

910
## Distribution packages
1011

@@ -184,3 +185,46 @@ The available options for CMake are:
184185
- `-DBUILD_DEB=[on|off]` (default `off`): Build DEB package when running `make package`
185186
- `-DBUILD_RPM=[on|off]` (default `off`): Build RPM package when running `make package`
186187
- `-DCMAKE_BUILD_TYPE=[Debug|Release]` (default `Release`): Compile with debugging symbols or not
188+
189+
#### CMake / Win32 / MinGW Quickstart
190+
191+
1. Install [MSYS2](https://www.msys2.org/) and start your preferred environment (ucrt64.exe is suggested and used in this example)
192+
2. Install the required libraries
193+
194+
```shell
195+
pacman -S mingw-w64-ucrt-x86_64-gcc
196+
pacman -S mingw-w64-ucrt-x86_64-libmicrohttpd
197+
pacman -S mingw-w64-ucrt-x86_64-curl
198+
pacman -S mingw-w64-ucrt-x86_64-jansson
199+
```
200+
201+
3. Build and install orcania into your MSYS environment:
202+
203+
```shell
204+
git clone https://github.com/babelouest/orcania.git
205+
cmake -G Ninja -DCMAKE_C_COMPILER=C:/msys64/ucrt64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/ucrt64/bin/g++.exe -DBUILD_STATIC=ON -DBUILD_BASE64URL=OFF -DCMAKE_INSTALL_PREFIX=C:/msys64/ucrt64/ -B ./orcania/build orcania
206+
cmake --build ./orcania/build
207+
cmake --install ./orcania/build
208+
```
209+
210+
4. Build and install yder into your MSYS environment:
211+
212+
```shell
213+
git clone https://github.com/babelouest/yder.git
214+
cmake -G Ninja -DCMAKE_C_COMPILER=C:/msys64/ucrt64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/ucrt64/bin/g++.exe -DBUILD_STATIC=ON -DCMAKE_INSTALL_PREFIX=C:/msys64/ucrt64/ -B ./yder/build yder
215+
cmake --build ./yder/build
216+
cmake --install ./yder/build
217+
```
218+
219+
5. Add ulfius to your application CMakeLists.txt, make sure to replace YOUR_ULFIUS_SRC_PATH
220+
221+
```CMake
222+
# Adjust these and other option flags as you desire
223+
option(BUILD_STATIC "..." ON)
224+
option(BUILD_SHARED "..." OFF)
225+
option(BUILD_UWSC "..." OFF)
226+
add_subdirectory(../extra/ulfius ulfius)
227+
target_link_libraries(app PRIVATE ulfius_static)
228+
target_link_libraries(app PRIVATE ${MHD_LIBRARY})
229+
target_link_libraries(app PRIVATE ws2_32)
230+
```

0 commit comments

Comments
 (0)