File: CMakeLists.txt

package info (click to toggle)
kmplayer 1:0.11.3d-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,504 kB
  • ctags: 8,651
  • sloc: cpp: 34,402; xml: 6,455; ansic: 3,085; sh: 32; makefile: 9
file content (72 lines) | stat: -rw-r--r-- 2,140 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
cmake_minimum_required(VERSION 2.8.9)
project(kmplayer)

cmake_policy(VERSION 2.6)

SET(KMPLAYER_MAJOR_VERSION "0")
SET(KMPLAYER_MINOR_VERSION "11")
SET(KMPLAYER_PATCH_VERSION "3d")

SET(KMPLAYER_VERSION_STRING
    "${KMPLAYER_MAJOR_VERSION}.${KMPLAYER_MINOR_VERSION}.${KMPLAYER_PATCH_VERSION}")

find_package(KDE4 REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories( ${KDE4_INCLUDES})

if(NOT WIN32)
  OPTION(KMPLAYER_BUILT_WITH_CAIRO "Enable Cairo support" ON)
  OPTION(KMPLAYER_BUILT_WITH_NPP "Build NPP player" ON)
  OPTION(KMPLAYER_BUILT_WITH_EXPAT "Use expat XML parser" OFF)
  INCLUDE(UsePkgConfig)

  if (KMPLAYER_BUILT_WITH_CAIRO)

    PKGCONFIG(cairo CAIROIncDir CAIROLinkDir CAIROLinkFlags CAIROCflags)

    if (CAIROCflags)
        set(KMPLAYER_WITH_CAIRO 1)
    endif (CAIROCflags)
  endif (KMPLAYER_BUILT_WITH_CAIRO)

  if (KMPLAYER_BUILT_WITH_NPP)
    PKGCONFIG(dbus-glib-1 GLibDBusIncDir GLibDBusLinkDir GLibDBusLinkFlags GLibDBusCflags)
    PKGCONFIG(gmodule-2.0 GModuleIncDir GModuleLinkDir GModuleLinkFlags GModuleCflags)

    if (GLibDBusCflags)
      set(KMPLAYER_WITH_GDBUS 1)
      PKGCONFIG(gtk+-x11-2.0 GTKIncDir GTKLinkDir GTKLinkFlags GTKCflags)
      PKGCONFIG(gthread-2.0 GThreadIncDir GThreadLinkDir GThreadLinkFlags GThreadCflags)
      if (GTKCflags)
          set(KMPLAYER_WITH_NPP 1)
      endif (GTKCflags)
    endif (GLibDBusCflags)
  endif (KMPLAYER_BUILT_WITH_NPP)

  if (KMPLAYER_BUILT_WITH_EXPAT)
      INCLUDE(FindEXPAT)
      if (EXPAT_FOUND)
          set(KMPLAYER_WITH_EXPAT 1)
      else (EXPAT_FOUND)
          MESSAGE(Expat found)
      endif (EXPAT_FOUND)
  endif (KMPLAYER_BUILT_WITH_EXPAT)

endif(NOT WIN32)

include(CheckIncludeFiles)
check_include_files(stdint.h HAVE_STDINT_H)

configure_file (config-kmplayer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kmplayer.h )

add_subdirectory(src)
add_subdirectory(icons)
add_subdirectory(doc)
add_subdirectory(data)

include(MacroOptionalAddSubdirectory)
macro_optional_add_subdirectory(po)