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

Add CMake project config files #418

Closed
jynik opened this issue Aug 15, 2015 · 4 comments
Closed

Add CMake project config files #418

jynik opened this issue Aug 15, 2015 · 4 comments
Labels
Issue: Enhancement Missing functionality, or a new feature request

Comments

@jynik
Copy link
Contributor

jynik commented Aug 15, 2015

CMake project config files help users of libbladeRF to locate it at configuration time via CMake.

We should be neighborly and provide these.

Examples from the SoapySDR Project:

@jynik jynik self-assigned this Aug 15, 2015
@polygon
Copy link

polygon commented Aug 24, 2015

I made something like that a while ago. Maybe it helps as a starter. https://gist.github.com/polygon/61e33a0fccecaf4ecf7a

Usage as normal via

find_package(LibbladeRF)
if (NOT LIBBLADERF_FOUND)
  message("libbladeRF not found")
else ()
  message(STATUS "Using libbladeRF from " ${LIBBLADERF_INCLUDE_DIRS})
  include_directories(${LIBBLADERF_INCLUDE_DIRS})
endif ()

@jynik jynik added the Issue: Enhancement Missing functionality, or a new feature request label Dec 29, 2015
@jynik
Copy link
Contributor Author

jynik commented May 25, 2016

@guruofquality At a minimum, I'd like to install a FindLibbladeRF.cmake, if you'd allow for me to pull that into the project from SoapyBladeRF -- as you noted way back when, these are things we should really be providing to library users.

@guruofquality
Copy link
Contributor

@jynik sure you can knab the file https://github.com/pothosware/SoapyBladeRF/blob/master/FindLibbladeRF.cmake

But if you are going to do the cmake project files, we can totally drop the FindLibbladeRF.cmake and having people copy it into their projects. I might suggest a more cut-down project to copy from than SoapySDR:

muparserx:

spuce:

Theres usually more than one way to do this, but the above stuff is pretty formulaic, 2 short files, and its worked so far across a wide range of cmakes going back to whatever is on 12.04 ubuntu.

@cwozny
Copy link

cwozny commented Jan 11, 2024

Any ability for Nuand to add this capability? Seems like a light enough lift. Would love to just be able to have CMake find the package for me.

rthomp10 added a commit that referenced this issue Jan 18, 2024
rthomp10 added a commit that referenced this issue Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Enhancement Missing functionality, or a new feature request
Projects
None yet
Development

No branches or pull requests

4 participants