1 # this file is included by kdelibs/CMakeLists.txt and contains the cmake code
2 # which creates the KDELibsDepencies.cmake file, which is installed by kdelibs
4 ######## write dependency file which will be installed #########
8 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake
9 "# this file was generated during the kdelibs build process
10 set(KDE_VERSION_MAJOR ${KDE_VERSION_MAJOR})
11 set(KDE_VERSION_MINOR ${KDE_VERSION_MINOR})
12 set(KDE_VERSION_RELEASE ${KDE_VERSION_RELEASE})
13 set(KDE_VERSION \"${KDE_VERSION}\")
14 set(KDE_VERSION_STRING \"${KDE_VERSION_STRING}\")
15 set(KDE_DEFAULT_HOME \"${KDE_DEFAULT_HOME}\")
18 # write the installdirs
20 # we need the absolute directories where stuff will be installed too
21 # but since the variables which contain the destinations can be relative
22 # or absolute paths, we need this macro to make them all absoulte, Alex
23 macro(MAKE_INSTALL_PATH_ABSOLUTE out in)
24 if (IS_ABSOLUTE "${in}") # IS_ABSOLUTE is new since cmake 2.4.8
26 else (IS_ABSOLUTE "${in}")
27 set(${out} "\${KDE4_INSTALL_DIR}/${in}")
28 endif (IS_ABSOLUTE "${in}")
29 endmacro(MAKE_INSTALL_PATH_ABSOLUTE out in)
31 set(KDE4_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
32 make_install_path_absolute(KDE4_LIB_INSTALL_DIR ${LIB_INSTALL_DIR})
33 make_install_path_absolute(KDE4_LIBEXEC_INSTALL_DIR ${LIBEXEC_INSTALL_DIR})
34 make_install_path_absolute(KDE4_INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR})
35 make_install_path_absolute(KDE4_BIN_INSTALL_DIR ${BIN_INSTALL_DIR})
36 make_install_path_absolute(KDE4_SBIN_INSTALL_DIR ${SBIN_INSTALL_DIR})
37 make_install_path_absolute(KDE4_DATA_INSTALL_DIR ${DATA_INSTALL_DIR})
38 make_install_path_absolute(KDE4_HTML_INSTALL_DIR ${HTML_INSTALL_DIR})
39 make_install_path_absolute(KDE4_CONFIG_INSTALL_DIR ${CONFIG_INSTALL_DIR})
40 make_install_path_absolute(KDE4_ICON_INSTALL_DIR ${ICON_INSTALL_DIR})
41 make_install_path_absolute(KDE4_KCFG_INSTALL_DIR ${KCFG_INSTALL_DIR})
42 make_install_path_absolute(KDE4_LOCALE_INSTALL_DIR ${LOCALE_INSTALL_DIR})
43 make_install_path_absolute(KDE4_MIME_INSTALL_DIR ${MIME_INSTALL_DIR})
44 make_install_path_absolute(KDE4_SOUND_INSTALL_DIR ${SOUND_INSTALL_DIR})
45 make_install_path_absolute(KDE4_TEMPLATES_INSTALL_DIR ${TEMPLATES_INSTALL_DIR})
46 make_install_path_absolute(KDE4_WALLPAPER_INSTALL_DIR ${WALLPAPER_INSTALL_DIR})
47 make_install_path_absolute(KDE4_KCONF_UPDATE_INSTALL_DIR ${KCONF_UPDATE_INSTALL_DIR})
48 make_install_path_absolute(KDE4_AUTOSTART_INSTALL_DIR ${AUTOSTART_INSTALL_DIR})
49 make_install_path_absolute(KDE4_XDG_APPS_INSTALL_DIR ${XDG_APPS_INSTALL_DIR})
50 make_install_path_absolute(KDE4_XDG_DIRECTORY_INSTALL_DIR ${XDG_DIRECTORY_INSTALL_DIR})
51 make_install_path_absolute(KDE4_SYSCONF_INSTALL_DIR ${SYSCONF_INSTALL_DIR})
52 make_install_path_absolute(KDE4_MAN_INSTALL_DIR ${MAN_INSTALL_DIR})
53 make_install_path_absolute(KDE4_INFO_INSTALL_DIR ${INFO_INSTALL_DIR})
54 make_install_path_absolute(KDE4_DBUS_INTERFACES_DIR ${DBUS_INTERFACES_INSTALL_DIR})
55 make_install_path_absolute(KDE4_DBUS_SERVICES_DIR ${DBUS_SERVICES_INSTALL_DIR})
56 make_install_path_absolute(KDE4_SERVICES_INSTALL_DIR ${SERVICES_INSTALL_DIR})
57 make_install_path_absolute(KDE4_SERVICETYPES_INSTALL_DIR ${SERVICETYPES_INSTALL_DIR})
59 file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake "
60 if (NOT KDE4_INSTALL_DIR)
61 set(KDE4_INSTALL_DIR \"${CMAKE_INSTALL_PREFIX}\")
62 endif (NOT KDE4_INSTALL_DIR)
64 set(KDE4_LIB_INSTALL_DIR \"${KDE4_LIB_INSTALL_DIR}\")
65 set(KDE4_LIBEXEC_INSTALL_DIR \"${KDE4_LIBEXEC_INSTALL_DIR}\")
66 set(KDE4_INCLUDE_INSTALL_DIR \"${KDE4_INCLUDE_INSTALL_DIR}\")
67 set(KDE4_BIN_INSTALL_DIR \"${KDE4_BIN_INSTALL_DIR}\")
68 set(KDE4_SBIN_INSTALL_DIR \"${KDE4_SBIN_INSTALL_DIR}\")
69 set(KDE4_DATA_INSTALL_DIR \"${KDE4_DATA_INSTALL_DIR}\")
70 set(KDE4_HTML_INSTALL_DIR \"${KDE4_HTML_INSTALL_DIR}\")
71 set(KDE4_CONFIG_INSTALL_DIR \"${KDE4_CONFIG_INSTALL_DIR}\")
72 set(KDE4_ICON_INSTALL_DIR \"${KDE4_ICON_INSTALL_DIR}\")
73 set(KDE4_KCFG_INSTALL_DIR \"${KDE4_KCFG_INSTALL_DIR}\")
74 set(KDE4_LOCALE_INSTALL_DIR \"${KDE4_LOCALE_INSTALL_DIR}\")
75 set(KDE4_MIME_INSTALL_DIR \"${KDE4_MIME_INSTALL_DIR}\")
76 set(KDE4_SOUND_INSTALL_DIR \"${KDE4_SOUND_INSTALL_DIR}\")
77 set(KDE4_TEMPLATES_INSTALL_DIR \"${KDE4_TEMPLATES_INSTALL_DIR}\")
78 set(KDE4_WALLPAPER_INSTALL_DIR \"${KDE4_WALLPAPER_INSTALL_DIR}\")
79 set(KDE4_KCONF_UPDATE_INSTALL_DIR \"${KDE4_KCONF_UPDATE_INSTALL_DIR}\")
80 set(KDE4_AUTOSTART_INSTALL_DIR \"${KDE4_AUTOSTART_INSTALL_DIR}\")
81 set(KDE4_XDG_APPS_INSTALL_DIR \"${KDE4_XDG_APPS_INSTALL_DIR}\")
82 set(KDE4_XDG_DIRECTORY_INSTALL_DIR \"${KDE4_XDG_DIRECTORY_INSTALL_DIR}\")
83 set(KDE4_SYSCONF_INSTALL_DIR \"${KDE4_SYSCONF_INSTALL_DIR}\")
84 set(KDE4_MAN_INSTALL_DIR \"${KDE4_MAN_INSTALL_DIR}\")
85 set(KDE4_INFO_INSTALL_DIR \"${KDE4_INFO_INSTALL_DIR}\")
86 set(KDE4_DBUS_INTERFACES_DIR \"${KDE4_DBUS_INTERFACES_DIR}\")
87 set(KDE4_DBUS_SERVICES_DIR \"${KDE4_DBUS_SERVICES_DIR}\")
88 set(KDE4_SERVICES_INSTALL_DIR \"${KDE4_SERVICES_INSTALL_DIR}\")
89 set(KDE4_SERVICETYPES_INSTALL_DIR \"${KDE4_SERVICETYPES_INSTALL_DIR}\")
91 set(KDE4_TARGET_PREFIX ${KDE4_TARGET_PREFIX} )
96 # write the library dependencies
99 file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/KDELibsDependencies.cmake"
100 "if (NOT QT_INSTALL_DIR)
101 set (QT_INSTALL_DIR \"${QT_INSTALL_DIR}\")
102 endif (NOT QT_INSTALL_DIR)
104 # replace hard codes paths by variables
105 # !!! the following stuff does not work because export_library_dependencies
106 # !!! does not wait until the file is written completly
107 # export_library_dependencies(${CMAKE_BINARY_DIR}/tmpdeps.cmake)
108 # file(READ ${CMAKE_BINARY_DIR}/tmpdeps.cmake _deps)
109 # string(REPLACE "${QT_INSTALL_DIR}" "\${QT_INSTALL_DIR}" __deps "${_deps}")
110 # file (APPEND ${CMAKE_BINARY_DIR}/KDELibsDependencies.cmake "${__deps}")