Skip to content

Commit

Permalink
Adds: header only configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmpavelski committed Jan 1, 2021
1 parent 54502df commit 4a26be3
Showing 1 changed file with 14 additions and 24 deletions.
38 changes: 14 additions & 24 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,25 @@
class FspEvalConan(ConanFile):
name = "fsp-eval"
version = "0.1"
license = "<Put the package license here>"
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
license = "LICENCE"
author = "Lucas Marcondes Pavelski <[email protected]>"
url = ""
description = "Flowshop evaluation methods"
topics = ("flowshop", "permutation", "optimization")
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
exports_sources = "src/*", "cmake/*", "CMakeLists.txt", "test/*"

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

# No settings/options are necessary, this is header only
exports_sources = "src/*"
no_copy_source = True

def build(self):
pass

line_to_replace = 'include(cmake/StandardProjectSettings.cmake)'
tools.replace_in_file("CMakeLists.txt", line_to_replace,
'''{}
include("{}/conanbuildinfo.cmake")
conan_basic_setup()'''.format(line_to_replace, self.install_folder.replace("\\", "/")))

cmake = CMake(self)
cmake.definitions["ENABLE_TESTING"] = "OFF"
cmake.configure(source_folder=".")
cmake.build()

def package(self):
self.copy("*.h", dst="include", src="src")
self.copy("*.hpp", dst="include", src="src")

def package_info(self):
self.cpp_info.libs = ["fsp-eval"]
def package_id(self):
self.info.header_only()

def package_info(self):
self.cpp_info.name = "fsp-eval"
self.cpp_info.includedirs = ['include']

0 comments on commit 4a26be3

Please sign in to comment.