aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2016-06-15 09:44:54 -0700
committerMartin Braun <martin.braun@ettus.com>2016-06-16 10:50:09 -0700
commitd53fd56c70531aa1cc7feaa5a3dffdb130bb2e95 (patch)
treef4c6a03cad9e98d4df036095d9155da5a878ee12 /host/lib/utils
parentf86c263682c8250b206abfe8e439e95bef947636 (diff)
downloaduhd-d53fd56c70531aa1cc7feaa5a3dffdb130bb2e95.tar.gz
uhd-d53fd56c70531aa1cc7feaa5a3dffdb130bb2e95.tar.bz2
uhd-d53fd56c70531aa1cc7feaa5a3dffdb130bb2e95.zip
cmake: allow UHD library and utilities to be in separate lib directories
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt
index 72e2f3f50..790ef72ad 100644
--- a/host/lib/utils/CMakeLists.txt
+++ b/host/lib/utils/CMakeLists.txt
@@ -119,11 +119,18 @@ SET_SOURCE_FILES_PROPERTIES(
FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX} UHD_PKG_PATH)
STRING(REPLACE "\\" "\\\\" UHD_PKG_PATH ${UHD_PKG_PATH})
+STRING(REGEX MATCH ".*/.*" SLASH "${LIB_SUFFIX}")
+IF(SLASH STREQUAL "")
+ SET(UHD_LIB_DIR "lib${LIB_SUFFIX}")
+ELSE()
+ SET(UHD_LIB_DIR "lib")
+ENDIF(SLASH STREQUAL "")
+
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_SOURCE_DIR}/paths.cpp
${CMAKE_CURRENT_SOURCE_DIR}/images.cpp
PROPERTIES COMPILE_DEFINITIONS
- "UHD_PKG_PATH=\"${UHD_PKG_PATH}\";UHD_LIB_DIR=\"lib${LIB_SUFFIX}\""
+ "UHD_PKG_PATH=\"${UHD_PKG_PATH}\";UHD_LIB_DIR=\"${UHD_LIB_DIR}\""
)
########################################################################