Skip to content

Commit

Permalink
- update conan new to latest guidelines
Browse files Browse the repository at this point in the history
Signed-off-by: SSE4 <tomskside@gmail.com>
  • Loading branch information
SSE4 committed Nov 25, 2020
1 parent 6e25cc8 commit 6d46b12
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions conans/client/cmd/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ class {package_name}Conan(ConanFile):
description = "<Description of {package_name} here>"
topics = ("<Put some tag here>", "<here>", "<and here>")
settings = "os", "compiler", "build_type", "arch"
options = {{"shared": [True, False]}}
default_options = {{"shared": False}}
options = {{"shared": [True, False], "fPIC": [True, False]}}
default_options = {{"shared": False, "fPIC": True}}
generators = "cmake"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def source(self):
self.run("git clone https://github.com/conan-io/hello.git")
# This small hack might be useful to guarantee proper /MT /MD linkage
Expand Down Expand Up @@ -91,11 +95,15 @@ class {package_name}Conan(ConanFile):
description = "<Description of {package_name} here>"
topics = ("<Put some tag here>", "<here>", "<and here>")
settings = "os", "compiler", "build_type", "arch"
options = {{"shared": [True, False]}}
default_options = {{"shared": False}}
options = {{"shared": [True, False], "fPIC": [True, False]}}
default_options = {{"shared": False, "fPIC": True}}
generators = "cmake"
exports_sources = "src/*"
{configure}
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def build(self):
cmake = CMake(self)
cmake.configure(source_folder="src")
Expand Down Expand Up @@ -145,6 +153,9 @@ def source(self):
def package(self):
self.copy("*.h", "include")
def package_id(self):
self.info.header_only()
"""


Expand Down

0 comments on commit 6d46b12

Please sign in to comment.