Skip to content

Commit

Permalink
Adjustments for using opusfile on win32.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoehermann committed Mar 12, 2023
1 parent 8e1b5ad commit ce37148
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,17 @@ Additional dependencies:
* [go 1.18 or newer (32 bit)](https://go.dev/dl/go1.18.9.windows-386.msi)
* [gcc (32 bit)](https://osdn.net/projects/mingw/)

go and gcc must be in `%PATH%`.
go and gcc must be in `%PATH%`.

MSYS make and CMake generator "MSYS Makefiles" are recommended.
This is know to work with MSYS make and CMake generator "MSYS Makefiles".
The project can be opened using Microsoft Visual Studio 2022.
Compiling with MSVC results in an unusable binary. NOT recommended.

For sending opus in ogg audio files as voice messages, add a static win32 build of opusfile to the prefix path:

vcpkg.exe install opusfile:x86-mingw-static
cmake -G "MSYS Makefiles" -DCMAKE_PREFIX_PATH=wherever/vcpkg/installed/x86-mingw-static ..

### Installation

* Place the binary in your Pidgin's plugin directory (`~/.purple/plugins` on Linux).
Expand Down
21 changes: 20 additions & 1 deletion dependencies/win32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,23 @@ set(PIXBUF_INCLUDE_DIRS
set(PIXBUF_LIBRARIES
${PIXBUF_LIB}
PARENT_SCOPE
)
)

find_path(OPUSFILE_INCLUDE_DIR opusfile.h PATH_SUFFIXES opus)
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
set(OPUSFILE_INCLUDE_DIRS
${OPUSFILE_INCLUDE_DIR}
${OPUSFILE_INCLUDE_DIR}/opus
${OGG_INCLUDE_DIR}
PARENT_SCOPE
)

find_library(OPUSFILE_LIB opusfile)
find_library(OPUS_LIB opus)
find_library(OGG_LIB ogg)
set(OPUSFILE_LIBRARIES
${OPUSFILE_LIB}
${OPUS_LIB}
${OGG_LIB}
PARENT_SCOPE
)

0 comments on commit ce37148

Please sign in to comment.