diff options
author | Martin Braun <martin.braun@ettus.com> | 2014-10-31 13:45:22 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-10-31 13:45:22 +0100 |
commit | cdafa9bf22f64962df1d122a0cdc277de7bbb116 (patch) | |
tree | ee35d8fbe723993fdd37564874b78581f5a0407e /host | |
parent | 62b267412ebe63ae0794af386e94d05647f1e5ad (diff) | |
download | uhd-cdafa9bf22f64962df1d122a0cdc277de7bbb116.tar.gz uhd-cdafa9bf22f64962df1d122a0cdc277de7bbb116.tar.bz2 uhd-cdafa9bf22f64962df1d122a0cdc277de7bbb116.zip |
cmake: Fixed duplicate installation of cmake files
Diffstat (limited to 'host')
-rw-r--r-- | host/CMakeLists.txt | 43 | ||||
-rw-r--r-- | host/cmake/Modules/UHDComponent.cmake | 4 |
2 files changed, 25 insertions, 22 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 4fc27c239..42351d118 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -291,18 +291,16 @@ IF(CMAKE_CROSSCOMPILING) SET(UHD_PC_LIBS) ENDIF(CMAKE_CROSSCOMPILING) -IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) - CONFIGURE_FILE( - ${CMAKE_CURRENT_SOURCE_DIR}/uhd.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc - @ONLY) - - INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc - DESTINATION ${LIBRARY_DIR}/pkgconfig - COMPONENT libraries - ) -ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/uhd.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc +@ONLY) + +UHD_INSTALL( + FILES ${CMAKE_CURRENT_BINARY_DIR}/uhd.pc + DESTINATION ${LIBRARY_DIR}/pkgconfig + COMPONENT "devel" +) ######################################################################## # Create and Install UHD cmake files @@ -311,20 +309,21 @@ IF(NOT CMAKE_MODULES_DIR) SET(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) ENDIF(NOT CMAKE_MODULES_DIR) -configure_file( - ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfigVersion.cmake.in - ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake -@ONLY) +CONFIGURE_FILE( + ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfigVersion.cmake.in + ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake + @ONLY +) SET(cmake_configs - ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfig.cmake - ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake + ${CMAKE_SOURCE_DIR}/cmake/Modules/UHDConfig.cmake + ${CMAKE_BINARY_DIR}/cmake/Modules/UHDConfigVersion.cmake ) -INSTALL( - FILES ${cmake_configs} - DESTINATION ${CMAKE_MODULES_DIR}/uhd - COMPONENT library +UHD_INSTALL( + FILES ${cmake_configs} + DESTINATION ${CMAKE_MODULES_DIR}/uhd + COMPONENT "devel" ) ######################################################################## diff --git a/host/cmake/Modules/UHDComponent.cmake b/host/cmake/Modules/UHDComponent.cmake index a041762b2..bf4a50e33 100644 --- a/host/cmake/Modules/UHDComponent.cmake +++ b/host/cmake/Modules/UHDComponent.cmake @@ -72,6 +72,10 @@ FUNCTION(UHD_INSTALL) IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) INSTALL(${ARGN}) ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) + ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "devel") + IF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) + INSTALL(${ARGN}) + ENDIF(NOT LIBUHD_PKG AND NOT UHDHOST_PKG) ELSEIF(UHD_INSTALL_COMPONENT STREQUAL "examples") IF(NOT LIBUHD_PKG AND NOT LIBUHDDEV_PKG) INSTALL(${ARGN}) |