~ubuntu-branches/ubuntu/trusty/gnuradio/trusty

« back to all changes in this revision

Viewing changes to .pc/Feature606/grc/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2014-01-05 12:14:43 UTC
  • mfrom: (2.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20140105121443-je18dkof6uhox808
Tags: 3.7.2.1-5
use correct compiler for unstable build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2011,2013 Free Software Foundation, Inc.
2
 
#
3
 
# This file is part of GNU Radio
4
 
#
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)
8
 
# any later version.
9
 
#
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.
14
 
#
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.
19
 
 
20
 
########################################################################
21
 
# Setup dependencies
22
 
########################################################################
23
 
include(GrPython)
24
 
 
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)
30
 
 
31
 
########################################################################
32
 
# Register component
33
 
########################################################################
34
 
include(GrComponent)
35
 
if(NOT CMAKE_CROSSCOMPILING)
36
 
    set(grc_python_deps
37
 
        PYTHON_MIN_VER_FOUND
38
 
        CHEETAH_FOUND
39
 
        LXML_FOUND
40
 
        PYGTK_FOUND
41
 
        NUMPY_FOUND
42
 
    )
43
 
endif(NOT CMAKE_CROSSCOMPILING)
44
 
 
45
 
GR_REGISTER_COMPONENT("gnuradio-companion" ENABLE_GRC
46
 
    ENABLE_GNURADIO_RUNTIME
47
 
    ENABLE_PYTHON
48
 
    ${grc_python_deps}
49
 
)
50
 
 
51
 
########################################################################
52
 
# Begin conditional configuration
53
 
########################################################################
54
 
if(ENABLE_GRC)
55
 
 
56
 
########################################################################
57
 
# Setup CPack components
58
 
########################################################################
59
 
include(GrPackage)
60
 
CPACK_COMPONENT("grc"
61
 
    DISPLAY_NAME "GNU Radio Companion"
62
 
    DESCRIPTION  "Graphical flow graph designer"
63
 
    DEPENDS      "runtime_python"
64
 
)
65
 
 
66
 
########################################################################
67
 
# Create and install the grc conf file
68
 
########################################################################
69
 
file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${GRC_BLOCKS_DIR} blocksdir)
70
 
 
71
 
configure_file(
72
 
    ${CMAKE_CURRENT_SOURCE_DIR}/grc.conf.in
73
 
    ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
74
 
@ONLY)
75
 
 
76
 
install(
77
 
    FILES ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
78
 
    DESTINATION ${GR_PREFSDIR}
79
 
    COMPONENT "grc"
80
 
)
81
 
 
82
 
GR_PYTHON_INSTALL(
83
 
    FILES __init__.py
84
 
    DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc
85
 
    COMPONENT "grc"
86
 
)
87
 
 
88
 
########################################################################
89
 
# Appens NSIS commands to set environment variables
90
 
########################################################################
91
 
if(WIN32)
92
 
 
93
 
file(TO_NATIVE_PATH ${GR_PKG_DOC_DIR} GR_DOC_DIR)
94
 
string(REPLACE "\\" "\\\\" GR_DOC_DIR ${GR_DOC_DIR})
95
 
 
96
 
file(TO_NATIVE_PATH ${GRC_BLOCKS_DIR} GRC_BLOCKS_PATH)
97
 
string(REPLACE "\\" "\\\\" GRC_BLOCKS_PATH ${GRC_BLOCKS_PATH})
98
 
 
99
 
file(TO_NATIVE_PATH ${GR_PYTHON_DIR} GR_PYTHON_POSTFIX)
100
 
string(REPLACE "\\" "\\\\" GR_PYTHON_POSTFIX ${GR_PYTHON_POSTFIX})
101
 
 
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
106
 
")
107
 
 
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
112
 
")
113
 
 
114
 
endif(WIN32)
115
 
 
116
 
########################################################################
117
 
# Add subdirectories
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)
127
 
 
128
 
endif(ENABLE_GRC)