Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Ark
Commits
722809e8
Commit
722809e8
authored
Mar 15, 2021
by
Nicolas Fella
Browse files
Use imported targets for libzip and zlib
parent
cb214389
Changes
2
Hide whitespace changes
Inline
Side-by-side
cmake/modules/FindLibZip.cmake
View file @
722809e8
...
...
@@ -33,4 +33,12 @@ find_package_handle_standard_args(LibZip
REQUIRED_VARS LibZip_LIBRARIES LibZip_INCLUDE_DIR LibZip_INCLUDE_CONF_DIR
VERSION_VAR LibZip_VERSION
)
if
(
LibZip_FOUND AND NOT TARGET LibZip::LibZip
)
add_library
(
LibZip::LibZip UNKNOWN IMPORTED
)
set_target_properties
(
LibZip::LibZip PROPERTIES
IMPORTED_LOCATION
"
${
LibZip_LIBRARIES
}
"
INTERFACE_INCLUDE_DIRECTORIES
"
${
LibZip_INCLUDE_DIRS
}
"
)
endif
()
mark_as_advanced
(
LibZip_INCLUDE_DIR LibZip_INCLUDE_CONF_DIR
)
plugins/libzipplugin/CMakeLists.txt
View file @
722809e8
include
(
CheckSymbolExists
)
include_directories
(
${
LibZip_INCLUDE_DIRS
}
)
set
(
SUPPORTED_LIBZIP_MIMETYPES
"application/zip;"
)
set
(
INSTALLED_LIBZIP_PLUGINS
""
)
...
...
@@ -35,7 +33,7 @@ configure_file(
kerfuffle_add_plugin
(
kerfuffle_libzip
${
kerfuffle_libzip_SRCS
}
)
target_link_libraries
(
kerfuffle_libzip KF5::KIOCore
${
LibZip
_LIBRARIES
}
${
ZLIB_LIBRARIES
}
)
target_link_libraries
(
kerfuffle_libzip KF5::KIOCore LibZip
::LibZip ZLIB::ZLIB
)
set
(
INSTALLED_LIBZIP_PLUGINS
"
${
INSTALLED_LIBZIP_PLUGINS
}
kerfuffle_libzip;"
)
...
...
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