Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mtxclient
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
mtxclient
Commits
e9525a71
Commit
e9525a71
authored
6 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Add script to find libolm if installed without cmake support
parent
96fd35e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/FindOlm.cmake
+40
-0
40 additions, 0 deletions
cmake/FindOlm.cmake
with
40 additions
and
0 deletions
cmake/FindOlm.cmake
0 → 100644
+
40
−
0
View file @
e9525a71
#
# CMake module to search for the olm library
#
# On success, the macro sets the following variables:
# OLM_FOUND = if the library found
# OLM_LIBRARY = full path to the library
# OLM_INCLUDE_DIR = where to find the library headers
#
find_path
(
OLM_INCLUDE_DIR
NAMES olm/olm.h
PATHS /usr/include
/usr/local/include
$ENV{LIB_DIR}/include
$ENV{LIB_DIR}/include/olm
)
find_library
(
OLM_LIBRARY
NAMES olm
PATHS /usr/lib /usr/local/lib $ENV{LIB_DIR}/lib
)
if
(
OLM_FOUND
)
set
(
OLM_INCLUDE_DIRS
${
OLM_INCLUDE_DIR
}
)
if
(
NOT OLM_LIBRARIES
)
set
(
OLM_LIBRARIES
${
OLM_LIBRARY
}
)
endif
()
endif
()
if
(
NOT TARGET Olm::Olm
)
add_library
(
Olm::Olm UNKNOWN IMPORTED
)
set_target_properties
(
Olm::Olm
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${
OLM_INCLUDE_DIR
}
)
set_property
(
TARGET Olm::Olm APPEND PROPERTY IMPORTED_LOCATION
${
OLM_LIBRARY
}
)
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
OLM DEFAULT_MSG OLM_INCLUDE_DIR OLM_LIBRARY
)
mark_as_advanced
(
OLM_LIBRARY OLM_INCLUDE_DIR
)
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