Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
6f59f190
Verified
Commit
6f59f190
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Fix hunter messing with pkg-config
parent
eb3ff097
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2100
failed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+56
-8
56 additions, 8 deletions
CMakeLists.txt
with
56 additions
and
8 deletions
CMakeLists.txt
+
56
−
8
View file @
6f59f190
...
...
@@ -23,6 +23,23 @@ HunterGate(
LOCAL
)
macro
(
hunter_add_package_safe
)
set
(
pkg_temp_backup_libdir
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
pkg_temp_backup_path
"$ENV{PKG_CONFIG_PATH}"
)
hunter_add_package
(
${
ARGV
}
)
if
(
"
${
pkg_temp_backup_path
}
"
STREQUAL
""
)
unset
(
ENV{PKG_CONFIG_PATH}
)
else
()
set
(
ENV{PKG_CONFIG_PATH}
"
${
pkg_temp_backup_path
}
"
)
endif
()
if
(
"
${
pkg_temp_backup_libdir
}
"
STREQUAL
""
)
unset
(
ENV{PKG_CONFIG_LIBDIR}
)
else
()
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup_libdir
}
"
)
endif
()
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endmacro
()
option
(
USE_BUNDLED_SPDLOG
"Use the bundled version of spdlog."
${
HUNTER_ENABLED
}
)
option
(
USE_BUNDLED_OLM
"Use the bundled version of libolm."
${
HUNTER_ENABLED
}
)
option
(
USE_BUNDLED_GTEST
"Use the bundled version of Google Test."
${
HUNTER_ENABLED
}
)
...
...
@@ -120,10 +137,16 @@ endif()
#
## Need to repeat all libevent deps?!?
if
(
USE_BUNDLED_LIBEVENT
)
hunter_add_package
(
Libevent
)
hunter_add_package
_safe
(
Libevent
)
find_package
(
Libevent CONFIG REQUIRED
)
else
()
find_package
(
PkgConfig REQUIRED
)
if
(
HUNTER_ENABLED
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
set
(
ENV{PKG_CONFIG_PATH}
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup
}
"
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endif
()
pkg_check_modules
(
libevent_core REQUIRED IMPORTED_TARGET libevent_core
)
if
(
WIN32
)
pkg_check_modules
(
libevent_windows REQUIRED IMPORTED_TARGET libevent_windows
)
...
...
@@ -135,16 +158,22 @@ endif()
# curl
if
(
USE_BUNDLED_LIBCURL
)
hunter_add_package
(
CURL
)
hunter_add_package
_safe
(
CURL
)
find_package
(
CURL CONFIG REQUIRED
)
else
()
find_package
(
PkgConfig REQUIRED
)
if
(
HUNTER_ENABLED
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
set
(
ENV{PKG_CONFIG_PATH}
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup
}
"
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endif
()
pkg_check_modules
(
libcurl REQUIRED IMPORTED_TARGET libcurl
)
endif
()
# spdlog
if
(
USE_BUNDLED_SPDLOG
)
hunter_add_package
(
spdlog
)
hunter_add_package
_safe
(
spdlog
)
endif
()
find_package
(
spdlog 1.0.0 CONFIG REQUIRED
)
...
...
@@ -153,7 +182,7 @@ find_package(spdlog 1.0.0 CONFIG REQUIRED)
#
#include(LMDB)
if
(
USE_BUNDLED_LMDB
)
hunter_add_package
(
lmdb
)
hunter_add_package
_safe
(
lmdb
)
find_package
(
liblmdb CONFIG REQUIRED
)
target_include_directories
(
liblmdb::lmdb INTERFACE
...
...
@@ -170,6 +199,12 @@ find_package(Qt5QuickCompiler)
find_package
(
Qt5DBus
)
if
(
USE_BUNDLED_QTKEYCHAIN
)
if
(
HUNTER_ENABLED
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
set
(
ENV{PKG_CONFIG_PATH}
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup
}
"
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endif
()
include
(
FetchContent
)
FetchContent_Declare
(
qt5keychain
...
...
@@ -380,7 +415,7 @@ include(FeatureSummary)
if
(
USE_BUNDLED_OPENSSL
)
hunter_add_package
(
OpenSSL
)
hunter_add_package
_safe
(
OpenSSL
)
endif
()
find_package
(
OpenSSL 1.1.0 REQUIRED
)
if
(
USE_BUNDLED_MTXCLIENT
)
...
...
@@ -414,7 +449,7 @@ else()
)
endif
()
if
(
USE_BUNDLED_SPDLOG
)
hunter_add_package
(
spdlog
)
hunter_add_package
_safe
(
spdlog
)
endif
()
find_package
(
spdlog 1.0.0 CONFIG REQUIRED
)
...
...
@@ -437,7 +472,7 @@ else()
endif
()
if
(
USE_BUNDLED_JSON
)
hunter_add_package
(
nlohmann_json
)
hunter_add_package
_safe
(
nlohmann_json
)
endif
()
find_package
(
nlohmann_json 3.2.0
)
set_package_properties
(
nlohmann_json PROPERTIES
...
...
@@ -474,8 +509,15 @@ else()
add_library
(
lmdbxx::lmdbxx ALIAS lmdbxx
)
endif
()
if
(
HUNTER_ENABLED
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
set
(
ENV{PKG_CONFIG_PATH}
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup
}
"
)
unset
(
ENV{PKG_CONFIG_LIBDIR}
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endif
()
include
(
FindPkgConfig
)
pkg_check_modules
(
GSTREAMER IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18
)
pkg_check_modules
(
GSTREAMER
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH
IMPORTED_TARGET gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18
)
if
(
TARGET PkgConfig::GSTREAMER
)
add_feature_info
(
voip ON
"GStreamer found. Call support is enabled automatically."
)
pkg_check_modules
(
XCB IMPORTED_TARGET xcb xcb-ewmh
)
...
...
@@ -700,6 +742,12 @@ elseif(coeurl_DIR)
target_link_libraries
(
nheko PUBLIC coeurl::coeurl
)
else
()
find_package
(
PkgConfig REQUIRED
)
if
(
HUNTER_ENABLED
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
set
(
ENV{PKG_CONFIG_PATH}
"$ENV{PKG_CONFIG_LIBDIR}"
)
set
(
ENV{PKG_CONFIG_LIBDIR}
"
${
pkg_temp_backup
}
"
)
message
(
"pkg_conf_path: '$ENV{PKG_CONFIG_PATH}', pkg_conf_libdir: '$ENV{PKG_CONFIG_LIBDIR}'"
)
endif
()
pkg_check_modules
(
coeurl REQUIRED IMPORTED_TARGET coeurl
)
target_link_libraries
(
nheko PUBLIC PkgConfig::coeurl
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment