summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-03-05 11:20:42 -0500
committerTom Rondeau <trondeau@vt.edu>2013-03-05 12:13:35 -0500
commit9297c84dfdae3002677f759ef2b38a877d2edc2c (patch)
treedda3ea912e953e257b4f1528377e86bb9b8c5248 /CMakeLists.txt
parentb4e87c06e00a5ab40bf6fa343af724d76f49d00d (diff)
build: create and install a config.h so external projects can know what we built with.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0e2ce5a45..b640c1faa0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,8 +120,10 @@ set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d)
OPTION(ENABLE_PERFORMANCE_COUNTERS "Enable block performance counters" OFF)
if(ENABLE_PERFORMANCE_COUNTERS)
message(STATUS "ADDING PERF COUNTERS")
+ SET(GR_PERFORMANCE_COUNTERS True)
add_definitions(-DGR_PERFORMANCE_COUNTERS)
else(ENABLE_PERFORMANCE_COUNTERS)
+ SET(GR_PERFORMANCE_COUNTERS False)
message(STATUS "NO PERF COUNTERS")
endif(ENABLE_PERFORMANCE_COUNTERS)
@@ -278,6 +280,20 @@ add_subdirectory(gr-wavelet)
add_subdirectory(gr-wxgui)
add_subdirectory(gr-blocks)
+# Create a config.h with some definitions to export to other projects.
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
+
+# Install config.h in include/gnuradio
+install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "core_devel"
+)
+
#finalize cpack after subdirs processed
include(GrPackage)
CPACK_FINALIZE()