File: CMakeLists.txt

package info (click to toggle)
ufo-filters 0.14.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,056 kB
  • sloc: ansic: 23,616; lisp: 2,667; python: 156; makefile: 133
file content (80 lines) | stat: -rw-r--r-- 2,033 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 2.8)

if (POLICY CMP0046)
cmake_policy(SET CMP0046 OLD)
endif ()

if (POLICY CMP0053)
cmake_policy(SET CMP0053 OLD)
endif ()

if (POLICY CMP0054)
cmake_policy(SET CMP0054 OLD)
endif ()

project(ufo C)

set(TARNAME "ufo-filters")

set(UFO_FILTERS_VERSION_MAJOR "0")
set(UFO_FILTERS_VERSION_MINOR "14")
set(UFO_FILTERS_VERSION_PATCH "1")
set(UFO_FILTERS_VERSION_STRING_LONG "${UFO_FILTERS_VERSION_MAJOR}.${UFO_FILTERS_VERSION_MINOR}.${UFO_FILTERS_VERSION_PATCH}")
set(UFO_FILTERS_VERSION_STRING_SHORT "${UFO_FILTERS_VERSION_MAJOR}.${UFO_FILTERS_VERSION_MINOR}")

set(UFO_DESCRIPTION "UFO good filters")
set(UFO_DESCRIPTION_SUMMARY "UFO good filters")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/common/cmake")

if (APPLE)
    set(CMAKE_MACOSX_RPATH      "ON")
    set(CMAKE_INSTALL_RPATH     "${CMAKE_INSTALL_PREFIX}/lib")
endif()

#{{{ Variables and Options
include(GNUInstallDirs)
include(PkgConfigVars)

set(PKG_UFO_CORE_MIN_REQUIRED "0.12")
# Backprojection burst mode, must be one of 1, 2, 4, 8, 16
set(BP_BURST "16" CACHE STRING "Number of projections processed in one pass")

option(WITH_PROFILING "Enable profiling" OFF)

if (WITH_PROFILING)
    add_definitions("-pg")
    set(CMAKE_C_FLAGS "-pg")
endif ()

option(WITH_CONTRIB "Enable contrib filters" OFF)
#}}}
#{{{ Common dependencies
find_package(OpenCL REQUIRED)
find_package(PkgConfig REQUIRED)

pkg_check_modules(UFO ufo>=${PKG_UFO_CORE_MIN_REQUIRED} REQUIRED)

pkg_check_variable(ufo plugindir)
pkg_check_variable(ufo kerneldir)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/deps/oclfft)

link_directories(${UFO_LIBRARY_DIRS})
#}}}
#{{{ Global definitions
add_definitions("-Wall -Wextra -fPIC")
add_definitions(-DG_LOG_DOMAIN="Ufo")

if (CMAKE_COMPILER_IS_GNUCC OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
    add_definitions("-Wno-unused-parameter")
endif ()
#}}}
#{{{ Subdirectories
add_subdirectory(docs)
add_subdirectory(deps)
add_subdirectory(src)
if (WITH_CONTRIB)
    add_subdirectory(contrib)
endif ()
#}}}