Merge pull request #520 from Nheko-Reborn/openssl-fixes

Disable bundled OpenSSL by default, even with hunter
This commit is contained in:
DeepBlueV7.X 2021-03-13 22:42:42 +00:00 committed by GitHub
commit df797175ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View file

@ -37,7 +37,7 @@ build-gcc7:
- cmake -GNinja -H. -Bbuild
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT=".hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
-DCI_BUILD=ON
- cmake --build build

View file

@ -33,7 +33,7 @@ option(USE_BUNDLED_CMARK "Use the bundled version of cmark."
option(USE_BUNDLED_JSON "Use the bundled version of nlohmann json."
${HUNTER_ENABLED})
option(USE_BUNDLED_OPENSSL "Use the bundled version of OpenSSL."
${HUNTER_ENABLED})
OFF)
option(USE_BUNDLED_MTXCLIENT "Use the bundled version of the Matrix Client library." ${HUNTER_ENABLED})
option(USE_BUNDLED_LMDB "Use the bundled version of lmdb."
${HUNTER_ENABLED})
@ -359,7 +359,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare(
MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG ace7fa2d89a64de7b84c77d1fa1bc80486408831
GIT_TAG b1b1ef9ad088f9666582f46d81b75a80c6b2b1c0
)
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")

View file

@ -142,7 +142,7 @@ brew install --cask nheko
Nheko can use bundled version for most of those libraries automatically, if the versions in your distro are too old.
To use them, you can enable the hunter integration by passing `-DHUNTER_ENABLED=ON`.
It is probably wise to link those dependencies statically by passing `-DBUILD_SHARED_LIBS=OFF`
You can select which bundled dependencies you want to use by passing various `-DUSE_BUNDLED_*` flags. By default all dependencies are bundled *if* you enable hunter.
You can select which bundled dependencies you want to use by passing various `-DUSE_BUNDLED_*` flags. By default all dependencies are bundled *if* you enable hunter. (The exception to that is OpenSSL, which is always disabled by default.)
If you experience build issues and you are trying to link `mtxclient` library without hunter, make sure the library version(commit) as mentioned in the `CMakeList.txt` is used. Sometimes we have to make breaking changes in `mtxclient` and for that period the master branch of both repos may not be compatible.
The bundle flags are currently:
@ -159,6 +159,8 @@ The bundle flags are currently:
- USE_BUNDLED_LMDBXX
- USE_BUNDLED_TWEENY
A note on bundled OpenSSL: You need to explicitly enable it and it will not be using your system certificate directory by default, if you enable it. You need to override that at runtime with the SSL_CERT_FILE variable. On Windows it will still be using your system certificates though, since it loads them from the system store instead of the OpenSSL directory.
#### Linux
If you don't want to install any external dependencies, you can generate an AppImage locally using docker. It is not that well maintained though...

View file

@ -48,7 +48,7 @@ build_script:
# Build nheko
- cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
-DHUNTER_ROOT="C:\hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
- cmake --build build --config Release

View file

@ -220,7 +220,7 @@
"name": "mtxclient",
"sources": [
{
"commit": "ace7fa2d89a64de7b84c77d1fa1bc80486408831",
"commit": "b1b1ef9ad088f9666582f46d81b75a80c6b2b1c0",
"type": "git",
"url": "https://github.com/Nheko-Reborn/mtxclient.git"
}