Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conan Support #22

Open
SpyrosMourelatos opened this issue Sep 15, 2020 · 3 comments
Open

Conan Support #22

SpyrosMourelatos opened this issue Sep 15, 2020 · 3 comments
Assignees
Labels
devops To do with devops (test, CI/CD, gitops etc) feature Feature roadmapped for implementation

Comments

@SpyrosMourelatos
Copy link

As I see your project uses conan as a package manager I would like to ask if you are planning to upload a conan package on bintray or conan-center?or if you would allow me to do it

@thclark
Copy link
Owner

thclark commented Sep 15, 2020

HI @drunkenmastah yes, I've been preparing a PR for that, it's taken them a little while to give me the required privileges (their process for open submission of packages is still quite new so I think they've been shaking down a few things).

Issue #6 is where I'm tracking this through to completion, and mentions progress with getting onto their EAP, so I'll close this one as a duplicate and you can follow along there.

In the meantime hopefully it's not too bad to download and install, let me know how you get on :)

@thclark thclark closed this as completed Sep 15, 2020
@SpyrosMourelatos
Copy link
Author

SpyrosMourelatos commented Sep 22, 2020

Actually I made a recipe that works locally :)


from conans import ConanFile, CMake, tools
import os
import glob

class DreadBoxTemplatePackage(ConanFile):
    name = "cpplot"
    homepage = "https://github.com/thclark/cpplot"
    url = "http:/nouri/nowhere"
    version="0.1"
    exports_sources = "CMakeLists.txt","cmake/*","include/*"
    description= "First try to package something with conan"
    generators = "cmake_paths", "cmake_find_package", "cmake"
    settings = "os", "arch", "compiler" 



    def requirements(self):
        self.requires("eigen/3.3.7")
        self.requires("nlohmann_json/3.8.0")
        self.requires("boost/1.73.0")
        self.requires("glog/0.4.0")
        self.requires("gtest/1.10.0")
        self.requires("tbb/2020.1")

    def _configure_cmake(self):
        cmake = CMake(self)
        cmake.configure(source_folder = "cpplot-master")
        return cmake

    def source(self):
        tools.get("https://github.com/thclark/cpplot/archive/master.zip")

    def package(self):
        cmake = self._configure_cmake()
        cmake.install()
        self.copy("*.h", dst="include",src= "cpplot-master/source" )



my CMakeLists looks like :

find_package(cpplot REQUIRED)
add_executable(test src/main.cpp)
target_link_libraries(test PRIVATE cpplot::cpplot )#

Don't forget to add the includes on your install command on your CmakeLists , this line seems a bit hacky
self.copy("*.h", dst="include",src= "cpplot-master/source" )

@thclark thclark reopened this Sep 24, 2020
@thclark
Copy link
Owner

thclark commented Sep 24, 2020

That's helpful @drunkenmastah - appreciate it!
I have a flood of work on right now but am quite committed to this project, so will be progressing on this issue over the next month or 6 weeks.

@thclark thclark self-assigned this May 5, 2021
@thclark thclark added devops To do with devops (test, CI/CD, gitops etc) feature Feature roadmapped for implementation labels May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops To do with devops (test, CI/CD, gitops etc) feature Feature roadmapped for implementation
Projects
None yet
Development

No branches or pull requests

2 participants