From d53fd56c70531aa1cc7feaa5a3dffdb130bb2e95 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Wed, 15 Jun 2016 09:44:54 -0700 Subject: cmake: allow UHD library and utilities to be in separate lib directories --- host/lib/utils/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'host') 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}\"" ) ######################################################################## -- cgit v1.2.3