blob: a2e4f3b34ef7a76bfe501a9969f602e7f8115e72 [file] [log] [blame]
piotr437f5462014-02-04 17:57:25 +01001# Copyright 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
20if(DEFINED __INCLUDED_GR_PLATFORM_CMAKE)
21 return()
22endif()
23set(__INCLUDED_GR_PLATFORM_CMAKE TRUE)
24
25########################################################################
26# Setup additional defines for OS types
27########################################################################
28if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
29 set(LINUX TRUE)
30endif()
31
32if(LINUX AND EXISTS "/etc/debian_version")
33 set(DEBIAN TRUE)
34endif()
35
36if(LINUX AND EXISTS "/etc/redhat-release")
37 set(REDHAT TRUE)
38endif()
39
40########################################################################
41# when the library suffix should be 64 (applies to redhat linux family)
42########################################################################
43if(NOT DEFINED LIB_SUFFIX AND REDHAT AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$")
44 set(LIB_SUFFIX 64)
45endif()
46set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix")