Skip to content

Commit

Permalink
Merge pull request #3 from uilianries/zziplib/0.13.71
Browse files Browse the repository at this point in the history
Improve CMake usage
  • Loading branch information
intelligide authored Aug 10, 2020
2 parents 6e729db + 6a19eaa commit e68c551
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion recipes/zziplib/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.12)
project(cmake_wrapper)

include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
include("conanbuildinfo.cmake")
conan_basic_setup()

if(MSVC AND BUILD_SHARED_LIBS)
Expand Down
22 changes: 11 additions & 11 deletions recipes/zziplib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class ZziplibConan(ConanFile):
name = "zziplib"
description = "The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access."
description = "The ZZIPlib provides read access on ZIP-archives and unpacked data"
topics = ("conan", "zip", "archive", "decompression")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/gdraheim/zziplib"
Expand Down Expand Up @@ -50,20 +50,21 @@ def source(self):
os.rename(extracted_dir, self._source_subfolder)

def _configure_cmake(self):
cmake = CMake(self)
if not self._cmake:
self._cmake = CMake(self)

cmake.definitions["BUILD_STATIC_LIBS"] = not self.options.shared
self._cmake.definitions["BUILD_STATIC_LIBS"] = not self.options.shared

cmake.definitions["ZZIPCOMPAT"] = not tools.os_info.is_windows
self._cmake.definitions["ZZIPCOMPAT"] = not tools.os_info.is_windows

cmake.definitions["ZZIPSDL"] = False
cmake.definitions["ZZIPBINS"] = False
cmake.definitions["ZZIPTEST"] = False
cmake.definitions["ZZIPDOCS"] = False
self._cmake.definitions["ZZIPSDL"] = False
self._cmake.definitions["ZZIPBINS"] = False
self._cmake.definitions["ZZIPTEST"] = False
self._cmake.definitions["ZZIPDOCS"] = False

cmake.configure()
self._cmake.configure(build_folder=self._build_subfolder)

return cmake
return self._cmake

def build(self):
for patch in self.conan_data.get("patches", {}).get(self.version, []):
Expand All @@ -76,7 +77,6 @@ def package(self):
cmake.install()

self.copy(pattern="COPYING.LIB", dst="licenses", src=self._source_subfolder)
os.rename(os.path.join(self.package_folder, "licenses", "COPYING.LIB"), os.path.join(self.package_folder, "licenses", "License.txt"))
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))

def package_info(self):
Expand Down

0 comments on commit e68c551

Please sign in to comment.