Skip to content
Snippets Groups Projects
Verified Commit abf848db authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: conan

parent e8edefd0
Branches
Tags
No related merge requests found
Pipeline #9658 passed
Pipeline: caosdb-cppinttest

#9659

    ......@@ -14,13 +14,12 @@ class LibcaosdbConan(ConanFile):
    default_options = {"shared": False, "fPIC": True}
    generators = "cmake"
    requires = [("boost/1.76.0"), ("gtest/1.11.0"), ("grpc/1.38.0")]
    exports = "*.cpp", "*h"
    exports = "*.cpp", "*h", "*.cmake", "*CMakeLists.txt", "*.in", "*.proto"
    exports_sources = "src", "doc", "include", "test", "cmake", "proto"
    def config_options(self):
    if self.settings.os == "Windows":
    del self.options.fPIC
    elif self.settings.get_safe("compiler.libcxx") is not None:
    self.settings.compiler.libcxx = "libstdc++11"
    def source(self):
    self.run("git clone https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git")
    ......@@ -31,7 +30,7 @@ class LibcaosdbConan(ConanFile):
    def build(self):
    cmake = CMake(self)
    cmake.configure(source_folder="src")
    cmake.configure(source_folder="")
    cmake.build()
    # Explicit way:
    ......@@ -41,7 +40,6 @@ class LibcaosdbConan(ConanFile):
    def package(self):
    self.copy("*.h", dst="include", src="include")
    self.copy("*hello.lib", dst="lib", keep_path=False)
    self.copy("*.dll", dst="bin", keep_path=False)
    self.copy("*.so", dst="lib", keep_path=False)
    self.copy("*.dylib", dst="lib", keep_path=False)
    ......
    #include "hello.h"
    #include <iostream>
    #include "caosdb/connection.h"
    int main() {
    hello();
    caosdb::connection::InsecureCaosDBConnectionConfig config("localhost", 8443);
    std::cout << config << "\n";
    }
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment