1
# Copyright 2011,2013 Free Software Foundation, Inc.
3
# This file is part of GNU Radio
5
# GNU Radio is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3, or (at your option)
10
# GNU Radio is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with GNU Radio; see the file COPYING. If not, write to
17
# the Free Software Foundation, Inc., 51 Franklin Street,
18
# Boston, MA 02110-1301, USA.
20
########################################################################
22
########################################################################
25
GR_PYTHON_CHECK_MODULE("python >= 2.5" sys "sys.version.split()[0] >= '2.5'" PYTHON_MIN_VER_FOUND)
26
GR_PYTHON_CHECK_MODULE("Cheetah >= 2.0.0" Cheetah "Cheetah.Version >= '2.0.0'" CHEETAH_FOUND)
27
GR_PYTHON_CHECK_MODULE("lxml >= 1.3.6" lxml.etree "lxml.etree.LXML_VERSION >= (1, 3, 6, 0)" LXML_FOUND)
28
GR_PYTHON_CHECK_MODULE("pygtk >= 2.10.0" gtk "gtk.pygtk_version >= (2, 10, 0)" PYGTK_FOUND)
29
GR_PYTHON_CHECK_MODULE("numpy" numpy True NUMPY_FOUND)
31
########################################################################
33
########################################################################
35
if(NOT CMAKE_CROSSCOMPILING)
43
endif(NOT CMAKE_CROSSCOMPILING)
45
GR_REGISTER_COMPONENT("gnuradio-companion" ENABLE_GRC
46
ENABLE_GNURADIO_RUNTIME
51
########################################################################
52
# Begin conditional configuration
53
########################################################################
56
########################################################################
57
# Setup CPack components
58
########################################################################
61
DISPLAY_NAME "GNU Radio Companion"
62
DESCRIPTION "Graphical flow graph designer"
63
DEPENDS "runtime_python"
66
########################################################################
67
# Create and install the grc conf file
68
########################################################################
69
file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${GRC_BLOCKS_DIR} blocksdir)
72
${CMAKE_CURRENT_SOURCE_DIR}/grc.conf.in
73
${CMAKE_CURRENT_BINARY_DIR}/grc.conf
77
FILES ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
78
DESTINATION ${GR_PREFSDIR}
84
DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc
88
########################################################################
89
# Appens NSIS commands to set environment variables
90
########################################################################
93
file(TO_NATIVE_PATH ${GR_PKG_DOC_DIR} GR_DOC_DIR)
94
string(REPLACE "\\" "\\\\" GR_DOC_DIR ${GR_DOC_DIR})
96
file(TO_NATIVE_PATH ${GRC_BLOCKS_DIR} GRC_BLOCKS_PATH)
97
string(REPLACE "\\" "\\\\" GRC_BLOCKS_PATH ${GRC_BLOCKS_PATH})
99
file(TO_NATIVE_PATH ${GR_PYTHON_DIR} GR_PYTHON_POSTFIX)
100
string(REPLACE "\\" "\\\\" GR_PYTHON_POSTFIX ${GR_PYTHON_POSTFIX})
102
CPACK_SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
103
#!include \\\"winmessages.nsh\\\"
104
WriteRegStr HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\" \\\"$INSTDIR\\\\${GRC_BLOCKS_PATH}\\\"
105
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
108
CPACK_SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
109
#!include \\\"winmessages.nsh\\\"
110
DeleteRegValue HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\"
111
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
116
########################################################################
118
########################################################################
119
add_subdirectory(base)
120
add_subdirectory(blocks)
121
add_subdirectory(freedesktop)
122
add_subdirectory(grc_gnuradio)
123
add_subdirectory(gui)
124
add_subdirectory(python)
125
add_subdirectory(scripts)
126
add_subdirectory(examples)