Statistics
| Branch: | Tag: | Revision:

root / gruel / CMakeLists.txt @ f95a0abb

History | View | Annotate | Download (3.3 kB)

1
# Copyright 2010-2011 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(GrBoost)
24
25
include(GrPython) #used for code generation
26
27
########################################################################
28
# Register component
29
########################################################################
30
include(GrComponent)
31
GR_REGISTER_COMPONENT("gruel" ENABLE_GRUEL
32
    Boost_FOUND
33
    PYTHONINTERP_FOUND
34
)
35
36
include(GrMiscUtils)
37
GR_SET_GLOBAL(GRUEL_INCLUDE_DIRS
38
    ${CMAKE_CURRENT_SOURCE_DIR}/src/include
39
    ${CMAKE_CURRENT_BINARY_DIR}/src/include
40
    ${Boost_INCLUDE_DIRS}
41
)
42
43
########################################################################
44
# Begin conditional configuration
45
########################################################################
46
if(ENABLE_GRUEL)
47
48
########################################################################
49
# Setup CPack components
50
########################################################################
51
include(GrPackage)
52
CPACK_SET(CPACK_COMPONENT_GROUP_GRUEL_DESCRIPTION "GNU Radio Utility Etcetera Library")
53
54
CPACK_COMPONENT("gruel_runtime"
55
    GROUP        "Gruel"
56
    DISPLAY_NAME "Runtime"
57
    DESCRIPTION  "Dynamic link libraries"
58
)
59
60
CPACK_COMPONENT("gruel_devel"
61
    GROUP        "Gruel"
62
    DISPLAY_NAME "Development"
63
    DESCRIPTION  "C++ headers, package config, import libraries"
64
)
65
66
CPACK_COMPONENT("gruel_python"
67
    GROUP        "Gruel"
68
    DISPLAY_NAME "Python"
69
    DESCRIPTION  "Python modules for runtime"
70
    DEPENDS     "gruel_runtime"
71
)
72
73
CPACK_COMPONENT("gruel_swig"
74
    GROUP        "Gruel"
75
    DISPLAY_NAME "SWIG"
76
    DESCRIPTION  "SWIG development .i files"
77
    DEPENDS     "gruel_python;gruel_devel"
78
)
79
80
########################################################################
81
# Add subdirectories
82
########################################################################
83
add_subdirectory(src/include/gruel)
84
add_subdirectory(src/scheme/gnuradio)
85
add_subdirectory(src/lib)
86
if(ENABLE_PYTHON)
87
    add_subdirectory(src/swig)
88
    add_subdirectory(src/python)
89
endif(ENABLE_PYTHON)
90
91
########################################################################
92
# Create Pkg Config File
93
########################################################################
94
configure_file(
95
    ${CMAKE_CURRENT_SOURCE_DIR}/gruel.pc.in
96
    ${CMAKE_CURRENT_BINARY_DIR}/gruel.pc
97
@ONLY)
98
99
install(
100
    FILES ${CMAKE_CURRENT_BINARY_DIR}/gruel.pc
101
    DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
102
    COMPONENT "gruel_devel"
103
)
104
105
endif(ENABLE_GRUEL)