Skip to content

Commit

Permalink
cmake: clean up a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Morman <[email protected]>
  • Loading branch information
mormj committed Dec 3, 2021
1 parent a11d852 commit edc1d84
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 47 deletions.
15 changes: 0 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,3 @@ if(ENABLE_PYTHON)
else(ENABLE_PYTHON)
message(STATUS "PYTHON and GRC components are disabled")
endif(ENABLE_PYTHON)

########################################################################
# Install cmake search helper for this library
########################################################################

install(FILES cmake/Modules/gnuradio-cudaConfig.cmake
DESTINATION ${GR_CMAKE_DIR}
)

include(CMakePackageConfigHelpers)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/targetConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/Modules/${target}Config.cmake
INSTALL_DESTINATION ${GR_CMAKE_DIR}
)
32 changes: 0 additions & 32 deletions cmake/Modules/gnuradio-cudaConfig.cmake

This file was deleted.

33 changes: 33 additions & 0 deletions cmake/Modules/targetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#

if(NOT PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
endif()
PKG_CHECK_MODULES(PC_@TARGET@ gnuradio-cuda)

FIND_PATH(
@TARGET@_INCLUDE_DIRS
NAMES gnuradio/cuda/api.h
HINTS $ENV{@TARGET@_DIR}/include
${PC_@TARGET@_INCLUDEDIR}
PATHS ${CMAKE_INSTALL_PREFIX}/include
/usr/local/include
/usr/include
)

FIND_LIBRARY(
@TARGET@_LIBRARIES
NAMES gnuradio-cuda
HINTS $ENV{@TARGET@_DIR}/lib
${PC_@TARGET@_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(@TARGET@ DEFAULT_MSG @TARGET@_LIBRARIES @TARGET@_INCLUDE_DIRS)
MARK_AS_ADVANCED(@TARGET@_LIBRARIES @TARGET@_INCLUDE_DIRS)


include(CMakeFindDependencyMacro)

set(target_deps "@TARGET_DEPENDENCIES@")
Expand Down

0 comments on commit edc1d84

Please sign in to comment.