Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,11 @@ add_subdirectory(python)
add_subdirectory(grc)
add_subdirectory(apps)
add_subdirectory(volk_fecapi)

########################################################################
# Install cmake search helper for this library
########################################################################
install(FILES cmake/Modules/fecapiConfig.cmake
DESTINATION lib/cmake/fecapi
)

30 changes: 30 additions & 0 deletions cmake/Modules/fecapiConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_FECAPI fecapi)

FIND_PATH(
FECAPI_INCLUDE_DIRS
NAMES fec/fec_api.h
HINTS $ENV{FECAPI_DIR}/include
${PC_FECAPI_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREEFIX}/include
/usr/local/include
/usr/include
)

FIND_LIBRARY(
FECAPI_LIBRARIES
NAMES fec
HINTS $ENV{FECAPI_DIR}/lib
${PC_FECAPI_LIBDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FECAPI DEFAULT_MSG FECAPI_LIBRARIES FECAPI_INCLUDE_DIRS)
MARK_AS_ADVANCED(FECAPI_LIBRARIES FECAPI_INCLUDE_DIRS)

2 changes: 2 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ install(FILES
fec_interleave.h
fec_deinterleave.h
cc_encoder.h
cc_decoder.h
cc_common.h
DESTINATION include/fec
)