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