Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
dsview
Commits
b301fe56
Commit
b301fe56
authored
7 years ago
by
DreamSourceLab
Browse files
Options
Download
Email Patches
Plain Diff
Add libzip cmake find
parent
9a97c35d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
DSView/CMake/Findlibzip.cmake
DSView/CMake/Findlibzip.cmake
+37
-0
No files found.
DSView/CMake/Findlibzip.cmake
0 → 100644
View file @
b301fe56
# Finds libzip.
#
# This module defines:
# LIBZIP_INCLUDE_DIR_ZIP
# LIBZIP_INCLUDE_DIR_ZIPCONF
# LIBZIP_LIBRARY
#
find_package
(
PkgConfig
)
pkg_check_modules
(
PC_LIBZIP QUIET libzip
)
find_path
(
LIBZIP_INCLUDE_DIR_ZIP
NAMES zip.h
HINTS
${
PC_LIBZIP_INCLUDE_DIRS
}
)
find_path
(
LIBZIP_INCLUDE_DIR_ZIPCONF
NAMES zipconf.h
HINTS
${
PC_LIBZIP_INCLUDE_DIRS
}
)
find_library
(
LIBZIP_LIBRARY
NAMES zip
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
LIBZIP DEFAULT_MSG
LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF
)
set
(
LIBZIP_VERSION 0
)
if
(
LIBZIP_INCLUDE_DIR_ZIPCONF
)
FILE
(
READ
"
${
LIBZIP_INCLUDE_DIR_ZIPCONF
}
/zipconf.h"
_LIBZIP_VERSION_CONTENTS
)
if
(
_LIBZIP_VERSION_CONTENTS
)
STRING
(
REGEX REPLACE
".*#define LIBZIP_VERSION
\"
([0-9.]+)
\"
.*"
"
\\
1"
LIBZIP_VERSION
"
${
_LIBZIP_VERSION_CONTENTS
}
"
)
endif
()
endif
()
set
(
LIBZIP_VERSION
${
LIBZIP_VERSION
}
CACHE STRING
"Version number of libzip"
)
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment