From 4b72513a8930ec4147dab76c079afa1186e335cd Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 10 May 2013 14:59:04 -0700 Subject: Added CMake variables to customize builds to match Debian package configurations * -DLIBUHD_PKG=ON installs with libuhd003 configuration * -DLIBUHDDEV_PKG=ON installs with libuhd-dev configuration * -DUHDHOST_PKG=ON installs with uhd-host configuration --- host/lib/CMakeLists.txt | 20 ++++++++++++-------- host/lib/uhd.rc.in | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'host/lib') diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index d8ff66a96..a37a8ab85 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2010-2011 Ettus Research LLC +# Copyright 2010-2011,2013 Ettus Research LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -111,14 +111,18 @@ ENDIF(MSVC) ADD_LIBRARY(uhd SHARED ${libuhd_sources}) TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES} ${libuhd_libs}) SET_TARGET_PROPERTIES(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS") -SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}") -SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}") +IF(NOT LIBUHDDEV_PKG) + SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION "${UHD_VERSION_MAJOR}") + SET_TARGET_PROPERTIES(uhd PROPERTIES VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}") +ENDIF(NOT LIBUHDDEV_PKG) IF(DEFINED LIBUHD_OUTPUT_NAME) SET_TARGET_PROPERTIES(uhd PROPERTIES OUTPUT_NAME ${LIBUHD_OUTPUT_NAME}) ENDIF(DEFINED LIBUHD_OUTPUT_NAME) -INSTALL(TARGETS uhd - LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file - ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file - RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT libraries # .dll file -) +IF(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL + INSTALL(TARGETS uhd + LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file + ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .lib file + RUNTIME DESTINATION ${RUNTIME_DIR} COMPONENT libraries # .dll file + ) +ENDIF(NOT UHDHOST_PKG) diff --git a/host/lib/uhd.rc.in b/host/lib/uhd.rc.in index 01a5e07f5..feb006bd3 100644 --- a/host/lib/uhd.rc.in +++ b/host/lib/uhd.rc.in @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION @RC_VERSION_MAJOR@,@RC_VERSION_MINOR@,@RC_VERSION_PATCH@,@UHD_GIT_COUNT@ - PRODUCTVERSION @RC_VERSION_MAJOR@,@RC_VERSION_MINOR@,@RC_VERSION_PATCH@,@UHD_GIT_COUNT@ + FILEVERSION @TRIMMED_VERSION_MAJOR@,@TRIMMED_VERSION_MINOR@,@TRIMMED_VERSION_PATCH@,@UHD_GIT_COUNT@ + PRODUCTVERSION @TRIMMED_VERSION_MAJOR@,@TRIMMED_VERSION_MINOR@,@TRIMMED_VERSION_PATCH@,@UHD_GIT_COUNT@ FILEFLAGSMASK 0x3fL #ifndef NDEBUG FILEFLAGS 0x0L -- cgit v1.2.3