-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export target as libdxfrw::libdxfrw to keep consistency with Conan pa…
…ckages
- Loading branch information
Showing
4 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
get_filename_component(DXFRW_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
|
||
if(NOT TARGET libdxfrw::libdxfrw) | ||
include("${DXFRW_CMAKE_DIR}/libdxfrwTargets.cmake") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from conans import ConanFile, CMake | ||
|
||
|
||
class LibdxfrwConan(ConanFile): | ||
name = "libdxfrw" | ||
version = "1.0.0" | ||
license = "GPL2" | ||
url = "https://github.com/LibreCAD/libdxfrw" | ||
description = "C++ library to read/write DXF files in binary and ascii form and to read DWG from r14 to v2015" | ||
topics = ("dxf", "dwg") | ||
settings = "os", "compiler", "build_type", "arch" | ||
options = {"shared": [True, False]} | ||
default_options = {"shared": False} | ||
generators = "cmake" | ||
|
||
def source(self): | ||
self.run("git clone --branch " + self.version + " https://github.com/LibreCAD/libdxfrw.git") | ||
|
||
def build(self): | ||
cmake = self._configure_cmake() | ||
cmake.build() | ||
|
||
def package(self): | ||
cmake = self._configure_cmake() | ||
cmake.install() | ||
|
||
def _configure_cmake(self): | ||
cmake = CMake(self) | ||
cmake.configure(source_folder="libdxfrw") | ||
return cmake | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = ["dxfrw"] |