root / volk / CMakeLists.txt @ 8879533b
History | View | Annotate | Download (3.2 kB)
| 1 | # |
|---|---|
| 2 | # Copyright 2011 Free Software Foundation, Inc. |
| 3 | # |
| 4 | # This program is free software: you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation, either version 3 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | # |
| 17 | |
| 18 | ######################################################################## |
| 19 | # Project setup |
| 20 | ######################################################################## |
| 21 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
| 22 | IF(NOT DEFINED CMAKE_BUILD_TYPE) |
| 23 | SET(CMAKE_BUILD_TYPE Release) |
| 24 | ENDIF() |
| 25 | SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type: None Debug Release RelWithDebInfo MinSizeRel")
|
| 26 | PROJECT(volk) |
| 27 | ENABLE_LANGUAGE(CXX) |
| 28 | ENABLE_LANGUAGE(C) |
| 29 | ENABLE_TESTING() |
| 30 | SET(VERSION 0.1) |
| 31 | SET(LIBVER 0.0.0) |
| 32 | |
| 33 | ######################################################################## |
| 34 | # Dependencies setup |
| 35 | ######################################################################## |
| 36 | FIND_PACKAGE(PythonInterp) |
| 37 | IF(NOT PYTHONINTERP_FOUND) |
| 38 | MESSAGE(FATAL_ERROR "Python interpreter required by the build system.") |
| 39 | ENDIF(NOT PYTHONINTERP_FOUND) |
| 40 | |
| 41 | ######################################################################## |
| 42 | # Setup the package config file |
| 43 | ######################################################################## |
| 44 | #set variables found in the pc.in file |
| 45 | SET(prefix ${CMAKE_INSTALL_PREFIX})
|
| 46 | SET(exec_prefix "\${prefix}")
|
| 47 | SET(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
|
| 48 | SET(includedir "\${prefix}/include")
|
| 49 | |
| 50 | CONFIGURE_FILE( |
| 51 | ${CMAKE_CURRENT_SOURCE_DIR}/volk.pc.in
|
| 52 | ${CMAKE_CURRENT_BINARY_DIR}/volk.pc
|
| 53 | @ONLY) |
| 54 | |
| 55 | INSTALL( |
| 56 | FILES ${CMAKE_CURRENT_BINARY_DIR}/volk.pc
|
| 57 | DESTINATION lib${LIB_SUFFIX}/pkgconfig
|
| 58 | ) |
| 59 | |
| 60 | ######################################################################## |
| 61 | # Install all headers in the include directories |
| 62 | ######################################################################## |
| 63 | INSTALL( |
| 64 | DIRECTORY ${CMAKE_SOURCE_DIR}/include/volk
|
| 65 | DESTINATION include FILES_MATCHING PATTERN "*.h" |
| 66 | ) |
| 67 | |
| 68 | INSTALL(FILES |
| 69 | ${CMAKE_BINARY_DIR}/include/volk/volk.h
|
| 70 | ${CMAKE_BINARY_DIR}/include/volk/volk_cpu.h
|
| 71 | ${CMAKE_BINARY_DIR}/include/volk/volk_config_fixed.h
|
| 72 | ${CMAKE_BINARY_DIR}/include/volk/volk_typedefs.h
|
| 73 | DESTINATION include/volk) |
| 74 | |
| 75 | ######################################################################## |
| 76 | # Setup the library |
| 77 | ######################################################################## |
| 78 | ADD_SUBDIRECTORY(lib) |
| 79 | |
| 80 | ######################################################################## |
| 81 | # And the utility apps |
| 82 | ######################################################################## |
| 83 | ADD_SUBDIRECTORY(apps) |
| 84 | |
| 85 | ######################################################################## |
| 86 | # Print summary |
| 87 | ######################################################################## |
| 88 | MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
|