aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-19 16:58:12 -0700
committerJosh Blum <josh@joshknows.com>2011-04-19 16:58:12 -0700
commit00bc8d50d5a2528704441ef5532fea13106a8d30 (patch)
tree0803774f3d0d73ab1be97aecb39f2e3996fe5e19 /host/lib/CMakeLists.txt
parent06e10b5f469b8b06af33a8a95a6302a1e365b396 (diff)
downloaduhd-00bc8d50d5a2528704441ef5532fea13106a8d30.tar.gz
uhd-00bc8d50d5a2528704441ef5532fea13106a8d30.tar.bz2
uhd-00bc8d50d5a2528704441ef5532fea13106a8d30.zip
uhd: removed constants.hpp.in, replaced w/ per source compile defines
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt17
1 files changed, 6 insertions, 11 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 618e33608..fca4730d8 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -79,23 +79,18 @@ INCLUDE_SUBDIRECTORY(usrp)
INCLUDE_SUBDIRECTORY(utils)
########################################################################
-# Setup compiled-in constants for data directories
+# Setup UHD_VERSION_STRING for version.cpp
########################################################################
-FILE(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${PKG_DATA_DIR} UHD_PKG_DATA_PATH)
-STRING(REPLACE "\\" "\\\\" UHD_PKG_DATA_PATH ${UHD_PKG_DATA_PATH})
-MESSAGE(STATUS "Full package data directory: ${UHD_PKG_DATA_PATH}")
-
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/constants.hpp.in
- ${CMAKE_CURRENT_BINARY_DIR}/constants.hpp
-@ONLY)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+SET_SOURCE_FILES_PROPERTIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp
+ PROPERTIES COMPILE_DEFINITIONS
+ "UHD_VERSION_STRING=\"${UHD_VERSION}-${UHD_BUILD_INFO}\""
+)
########################################################################
# Append to the list of sources for lib uhd
########################################################################
LIBUHD_APPEND_SOURCES(
- ${CMAKE_CURRENT_BINARY_DIR}/constants.hpp
${CMAKE_CURRENT_SOURCE_DIR}/device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/exception.cpp
${CMAKE_CURRENT_SOURCE_DIR}/version.cpp