summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt16
-rw-r--r--config.h.in30
2 files changed, 46 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()
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000000..325cb838ef
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GNURADIO_CONFIG_H
+#define GNURADIO_CONFIG_H
+
+#cmakedefine TRY_SHM_VMCIRCBUF
+#cmakedefine GR_PERFORMANCE_COUNTERS
+#cmakedefine ENABLE_GR_LOG
+#cmakedefine HAVE_LOG4CXX
+
+#endif /* GNURADIO_CONFIG_H */