~ubuntu-branches/ubuntu/wily/kid3/wily

« back to all changes in this revision

Viewing changes to src/app/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2015-05-12 18:56:41 UTC
  • mfrom: (1.1.19) (2.3.3 sid)
  • Revision ID: package-import@ubuntu.com-20150512185641-hgeys2pingwq9mwn
Tags: 3.2.1-1
* New upstream release.
  - Add new build dependency qt4-dev-tools.
* Uploading to unstable.
* Switch to DEP5 debian/copyright format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
  add_subdirectory(qt)
17
17
endif (BUILD_QT_APP)
18
18
 
 
19
if (BUILD_QML_APP)
 
20
  add_subdirectory(qml)
 
21
endif (BUILD_QML_APP)
 
22
 
19
23
if (BUILD_KDE_APP)
20
 
  set(_cmakeInstallRpath "${CMAKE_INSTALL_RPATH}")
21
 
  find_package(KDE4 REQUIRED)
22
 
  include (KDE4Defaults)
23
 
 
24
 
  if (BUILD_SHARED_LIBS)
25
 
    # FindKDE4Internal.cmake will overwrite our RPATH if LIB_INSTALL_DIR (which
26
 
    # defaults to ${CMAKE_INSTALL_PREFIX}/lib) is not an implicit link directory.
27
 
    # In practice this means that most values for CMAKE_INSTALL_PREFIX other
28
 
    # than /usr will cause the RPATH to be overwritten and the kid3 executable
29
 
    # will not find its libraries. This happens also for the default value
30
 
    # /usr/local for CMAKE_INSTALL_PREFIX.
31
 
    # The RPATH is set again here to reverse this.
32
 
    set(_prefixLibdir "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}")
33
 
    list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_prefixLibdir}" _isSystemDir)
34
 
    if ("${_isSystemDir}" STREQUAL "-1")
35
 
      list(APPEND _cmakeInstallRpath ${CMAKE_INSTALL_RPATH})
36
 
      list(REMOVE_DUPLICATES _cmakeInstallRpath)
37
 
      set(CMAKE_INSTALL_RPATH "${_cmakeInstallRpath}")
38
 
    endif ("${_isSystemDir}" STREQUAL "-1")
39
 
  endif (BUILD_SHARED_LIBS)
40
 
 
41
 
  add_subdirectory(kde)
42
 
  kde4_install_icons(${ICON_INSTALL_DIR})
 
24
  if (HAVE_QT5)
 
25
    set(_cmakeInstallRpath "${CMAKE_INSTALL_RPATH}")
 
26
    cmake_minimum_required(VERSION 2.8.12)
 
27
    find_package(ECM REQUIRED NO_MODULE)
 
28
    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
 
29
    include(ECMInstallIcons)
 
30
 
 
31
    include(KDEInstallDirs)
 
32
    include(KDECompilerSettings)
 
33
    include(KDECMakeSettings)
 
34
    include(FeatureSummary)
 
35
 
 
36
    find_package(KF5 REQUIRED COMPONENTS KIO)
 
37
 
 
38
    if (BUILD_SHARED_LIBS)
 
39
      # KDECMakeSettings.cmake will overwrite our RPATH if LIB_INSTALL_DIR is
 
40
      # not an implicit link directory. In practice this means that most values
 
41
      # for CMAKE_INSTALL_PREFIX other than /usr will cause the RPATH to be
 
42
      # overwritten and the kid3 executable will not find its libraries.
 
43
      # This happens also for the default value /usr/local for
 
44
      # CMAKE_INSTALL_PREFIX. The RPATH is set again here to reverse this.
 
45
      set(_prefixLibdir "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}")
 
46
      list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_prefixLibdir}" _isSystemDir)
 
47
      if ("${_isSystemDir}" STREQUAL "-1")
 
48
        list(APPEND _cmakeInstallRpath ${CMAKE_INSTALL_RPATH})
 
49
        list(REMOVE_DUPLICATES _cmakeInstallRpath)
 
50
        set(CMAKE_INSTALL_RPATH "${_cmakeInstallRpath}")
 
51
      endif ("${_isSystemDir}" STREQUAL "-1")
 
52
    endif (BUILD_SHARED_LIBS)
 
53
 
 
54
    kde_enable_exceptions()
 
55
    add_subdirectory(kde)
 
56
    ecm_install_icons(ICONS
 
57
      hisc-apps-kid3.svgz
 
58
      hi128-apps-kid3.png
 
59
      hi16-apps-kid3.png
 
60
      hi32-apps-kid3.png
 
61
      hi48-apps-kid3.png
 
62
      hi64-apps-kid3.png
 
63
      DESTINATION ${ICON_INSTALL_DIR}
 
64
      THEME hicolor
 
65
    )
 
66
  else (HAVE_QT5)
 
67
    set(_cmakeInstallRpath "${CMAKE_INSTALL_RPATH}")
 
68
    find_package(KDE4 REQUIRED)
 
69
    include (KDE4Defaults)
 
70
 
 
71
    if (BUILD_SHARED_LIBS)
 
72
      # FindKDE4Internal.cmake will overwrite our RPATH if LIB_INSTALL_DIR (which
 
73
      # defaults to ${CMAKE_INSTALL_PREFIX}/lib) is not an implicit link directory.
 
74
      # In practice this means that most values for CMAKE_INSTALL_PREFIX other
 
75
      # than /usr will cause the RPATH to be overwritten and the kid3 executable
 
76
      # will not find its libraries. This happens also for the default value
 
77
      # /usr/local for CMAKE_INSTALL_PREFIX.
 
78
      # The RPATH is set again here to reverse this.
 
79
      set(_prefixLibdir "${CMAKE_INSTALL_PREFIX}/${WITH_LIBDIR}")
 
80
      list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_prefixLibdir}" _isSystemDir)
 
81
      if ("${_isSystemDir}" STREQUAL "-1")
 
82
        list(APPEND _cmakeInstallRpath ${CMAKE_INSTALL_RPATH})
 
83
        list(REMOVE_DUPLICATES _cmakeInstallRpath)
 
84
        set(CMAKE_INSTALL_RPATH "${_cmakeInstallRpath}")
 
85
      endif ("${_isSystemDir}" STREQUAL "-1")
 
86
    endif (BUILD_SHARED_LIBS)
 
87
 
 
88
    add_subdirectory(kde)
 
89
    kde4_install_icons(${ICON_INSTALL_DIR})
 
90
  endif (HAVE_QT5)
43
91
endif (BUILD_KDE_APP)