File: KReportAddExamples.cmake

package info (click to toggle)
kreport 3.2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,032 kB
  • sloc: cpp: 23,245; python: 779; xml: 197; sh: 108; makefile: 9
file content (24 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Additional CMake macros
#
# Copyright (C) 2015-2017 Jarosław Staniek <staniek@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if(__kreport_add_examples)
  return()
endif()
set(__kreport_add_examples YES)

include(KReportAddSimpleOption)

# Adds BUILD_EXAMPLES option to enable examples. If enabled, build in examples/ subdirectory
# is enabled. If optional argument ARG1 is ON, building examples will be ON by default.
# Otherwise building examples will be OFF. ARG1 is OFF by default.
macro(kreport_add_examples)
  set(_SET ${ARGV0})
  if (NOT "${_SET}" STREQUAL ON)
    set(_SET OFF)
  endif()
  simple_option(BUILD_EXAMPLES "Build example applications" ${_SET})
endmacro()