diff --git a/.drone.yml b/.drone.yml index ad86657..88b9a8d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,7 +36,8 @@ steps: CONAN_PASSWORD: from_secret: conan_password commands: - - conan create . $DRONE_COMMIT@creaturelib/$DRONE_BRANCH + - cmake -DCMAKE_BUILD_TYPE=Release . -B build-release + - conan export-pkg . creaturelib/$DRONE_COMMIT@creaturelib/$DRONE_BRANCH --build-folder build-release - conan remote add epsilon-public https://packages.p-epsilon.com/artifactory/api/conan/epsilon-public - conan user -p -r=epsilon-public - conan upload CreatureLib/$DRONE_COMMIT@creaturelib/$DRONE_BRANCH --all -r=epsilon-public diff --git a/CMakeLists.txt b/CMakeLists.txt index 575c25f..f819eee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,3 +51,10 @@ endif (WINDOWS) target_compile_definitions(CreatureLibTests PRIVATE TESTS_BUILD) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") + +if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + conan_basic_setup() +else () + message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first") +endif () diff --git a/conanfile.py b/conanfile.py index dd7cd13..926149a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,7 +1,7 @@ from conans import ConanFile, CMake -class HelloConan(ConanFile): +class CreatureLibConan(ConanFile): name = "CreatureLib" license = "TODO" url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib" @@ -14,7 +14,7 @@ class HelloConan(ConanFile): def build(self): cmake = CMake(self) - cmake.configure(source_folder=".") + cmake.configure() cmake.build() # Explicit way: