From bf939355f0be048ea1d16d8b40e78052c4e17565 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <tom@trondeau.com>
Date: Tue, 24 Sep 2013 13:17:28 -0400
Subject: cmake: improve OOT projects find the installed GNU Radio.

1. Do not install FindGnuradio.cmake; everything is done through GnuradioConfig.cmake.

2. Fix a small bug with finding the PMT library if pkg-config is used.

3. Updated the documentation for how to use these tools in the OOT project.
---
 docs/doxygen/other/main_page.dox | 50 ++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 15 deletions(-)

(limited to 'docs/doxygen/other')

diff --git a/docs/doxygen/other/main_page.dox b/docs/doxygen/other/main_page.dox
index d6cc269f40..f96492c5cc 100644
--- a/docs/doxygen/other/main_page.dox
+++ b/docs/doxygen/other/main_page.dox
@@ -419,8 +419,8 @@ New as of 3.6.5.
 
 Using gr_modtool, each package comes with the ability to easily locate
 the gnuradio-runtime library using the 'find_package(GnuradioRuntime)'
-cmake command. This only locates that the library and include
-directories exist, which is enough for most simple projects.
+cmake command. This only locates the gnuradio-runtime library and
+include directory, which is enough for most simple projects.
 
 As projects become more complicated and start needing to rely on other
 GNU Radio components like gnuradio-blocks or gnuradio-filter, for
@@ -456,18 +456,38 @@ part of GNU Radio, the configuration will also fail.
 
 \subsection oot_config_path_page Install Path
 
-Cmake has to know where to find these configuration files. They are
-installed into $prefix/lib/cmake/gnuradio. If $prefix is '/usr' or
-'/usr/local', then everything should work fine. If the GNU Radio
-install $prefix is something else, then Cmake must be told where to
-find it. This can be done in two ways. If you are installing the
-out-of-tree module into the same $prefix, then you would be setting
-'-DCMAKE_INSTALL_PREFIX' on the configuration command line. This is
-enough to tell Cmake where to look for the configuration files.
-
-The other way to do it is to set the CMAKE_PREFIX_PATH environmental
-variable to $prefix. You can then install your component anywhere
-you'd like and it will be able to find and configure against the
-installed GNU Radio.
+Cmake has to know where to find either the package config files or the
+GnuradioConfig.cmake script. The package config files are located in
+$prefix/lib/pkgconfig while all of the Cmake scripts from GNU Radio
+are installed into $prefix/lib/cmake/gnuradio.
+
+If the installed GNU Radio $prefix is '/usr' or '/usr/local', then
+everything should work fine. If the GNU Radio install $prefix is
+something else, then Cmake must be told where to find it. This can be
+done in a few ways:
+
+1. If you are installing the out-of-tree module into the same $prefix,
+then you would be setting '-DCMAKE_INSTALL_PREFIX' on the
+configuration command line. This is enough to tell Cmake where to look
+for the configuration files.
+
+2. Cmake will try to find the package config (*.pc) files. If it can,
+these files will instruct Cmake where to look for the rest of the
+configuration options. If this is not set, it can be set as:
+
+\code
+    export PKG_CONFIG_PATH=$prefix/lib/pkgconfg:$PKG_CONFIG_PATH
+\endcode
+
+3. Set the CMAKE_PREFIX_PATH environmental variable to $prefix.
+
+\code
+    export CMAKE_PREFIX_PATH=$prefix:$CMAKE_PREFIX_PATH
+\endcode
+
+
+With method 1, you will be installing your OOT project into the same
+$prefix as GNU Radio. With methods 2 and 3, you can install your
+component anywhere you like (using -DCMAKE_INSTALL_PREFIX).
 
 */
-- 
cgit v1.2.3