Skip to content

Commit 44a0798

Browse files
royshilumireon
andauthored
Add Fedora build instructions (#8)
* Add Fedora build instructions * Update docs/BUILD-FEDORA.md Co-authored-by: Kaito Udagawa <umireon@gmail.com> * Update submodule URL in .gitmodules file * Disable shadowing warnings in inja build * Disable conversion errors on Linux * Remove -Wshadow option from gcc compiler configuration --------- Co-authored-by: Kaito Udagawa <umireon@gmail.com>
1 parent f716b57 commit 44a0798

File tree

5 files changed

+38
-2
lines changed

5 files changed

+38
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
!README.md
1818
!/vendor
1919
!/vendor/inja
20+
!/docs
2021

2122
# Exclude lock files
2223
*.lock.json

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "vendor/inja"]
22
path = vendor/inja
3-
url = git@github.com:pantor/inja.git
3+
url = https://github.com/pantor/inja.git

cmake/BuildInja.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ set(BUILD_BENCHMARK OFF)
77
set(COVERALLS OFF)
88
# inja uses a lot of shadowing
99
add_compile_options(-Wno-shadow)
10+
add_compile_options(-Wno-error=shadow)
1011
add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/inja ${CMAKE_BINARY_DIR}/inja EXCLUDE_FROM_ALL)
12+
13+
# on linux, disable conversion errors
14+
if(UNIX AND NOT APPLE)
15+
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
16+
add_compile_options(-Wno-error -Wno-conversion -Wno-shadow -Wno-unused-parameter)
17+
endif()

cmake/linux/compilerconfig.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ set(_obs_gcc_c_options
3232
-Wno-unused-function
3333
-Wno-unused-label
3434
-Wparentheses
35-
-Wshadow
3635
-Wuninitialized
3736
-Wunreachable-code
3837
-Wunused-parameter

docs/BUILD-FEDORA.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Instructions for building the plugin on Fedora
2+
3+
First, you have to install the development tools:
4+
```
5+
sudo dnf groupinstall "Development Tools"
6+
```
7+
8+
Then, make sure you have the dependencies of this plugin installed:
9+
10+
```
11+
sudo dnf install cmake gcc-c++ ninja-build obs-studio-devel opencv-devel qt6-qtbase-devel zsh curl-devel tesseract-devel leptonica-devel
12+
```
13+
14+
Clone the repository and set up the submodules:
15+
```
16+
git clone https://github.com/occ-ai/obs-ocr.git
17+
cd obs-ocr
18+
git submodule update --init
19+
```
20+
21+
Run the following command to compile the plugin:
22+
```
23+
.github/scripts/build-linux --skip-deps
24+
```
25+
26+
Finally, install the necessary files into the system directories, by issuing this command:
27+
```
28+
sudo cmake --install build_x86_64 --prefix /usr
29+
```

0 commit comments

Comments
 (0)