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 package #7

Closed
mjako78 opened this issue Jan 21, 2020 · 5 comments
Closed

Conan package #7

mjako78 opened this issue Jan 21, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@mjako78
Copy link

mjako78 commented Jan 21, 2020

Hi, I'm trying to use your lib inside my project which is based on conan package manager.

Are you planning to release your work to the conan package center?

I have some difficulties to use embed cwalk downloaded directly via CMakeLists ExternalProject

@likle
Copy link
Owner

likle commented Jan 22, 2020

Hi @mjako78, sounds interesting - I will have a look at that!

@likle likle self-assigned this Jan 22, 2020
@likle likle added the enhancement New feature or request label Jan 22, 2020
@mjako78
Copy link
Author

mjako78 commented Jan 22, 2020

Let me known if I can help.

@likle
Copy link
Owner

likle commented Jan 27, 2020

Hi @mjako78,

I have requested access to be able to add a package and was told it would take 1-2 weeks.
Since you were trying to use CMake's ExternalProject, FetchContent might be a workaround for you in the meantime.

Here's an example for CMake 3.16+:

cmake_minimum_required(VERSION 3.16)
project(myproject)
include(FetchContent)
FetchContent_Declare(cwalk
  GIT_REPOSITORY git@github.com:likle/cwalk.git
  GIT_TAG v1.2.2
)
FetchContent_MakeAvailable(cwalk)
add_executable(myproject myproject.c)
target_link_libraries(myproject cwalk)

or if you want to support CMake 3.11+:

cmake_minimum_required(VERSION 3.11)
project(myproject)
include(FetchContent)
FetchContent_Declare(cwalk
  GIT_REPOSITORY git@github.com:likle/cwalk.git
  GIT_TAG v1.2.2
)
FetchContent_GetProperties(cwalk)
if(NOT cwalk_POPULATED)
  FetchContent_Populate(cwalk)
  add_subdirectory(${cwalk_SOURCE_DIR} ${cwalk_BINARY_DIR})
endif()
add_executable(myproject myproject.c)
target_link_libraries(myproject cwalk)

And then you should be able to include and use cwalk without any further steps.

@mjako78
Copy link
Author

mjako78 commented Jan 27, 2020

Hi @likle,

thanks for your reply.
I'm trying with a CMake module taken from here, named DownloadProject.
I will try also the solution that you provided.

@likle
Copy link
Owner

likle commented Feb 6, 2020

cwalk is now in the conan center index: https://conan.io/center/cwalk/1.2.2/

@likle likle closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants