Changeset View
Changeset View
Standalone View
Standalone View
KF5CoreAddonsMacros.cmake
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 52 | if(DESKTOP_TO_JSON_SERVICE_TYPES) | |||
---|---|---|---|---|---|
53 | foreach(type ${DESKTOP_TO_JSON_SERVICE_TYPES}) | 53 | foreach(type ${DESKTOP_TO_JSON_SERVICE_TYPES}) | ||
54 | if (EXISTS ${KDE_INSTALL_FULL_KSERVICETYPES5DIR}/${type}) | 54 | if (EXISTS ${KDE_INSTALL_FULL_KSERVICETYPES5DIR}/${type}) | ||
55 | set(type ${KDE_INSTALL_FULL_KSERVICETYPES5DIR}/${type}) | 55 | set(type ${KDE_INSTALL_FULL_KSERVICETYPES5DIR}/${type}) | ||
56 | endif() | 56 | endif() | ||
57 | list(APPEND command -s ${type}) | 57 | list(APPEND command -s ${type}) | ||
58 | endforeach() | 58 | endforeach() | ||
59 | endif() | 59 | endif() | ||
60 | 60 | | |||
61 | file(RELATIVE_PATH relativejson ${CMAKE_CURRENT_BINARY_DIR} ${json}) | ||||
61 | add_custom_command( | 62 | add_custom_command( | ||
62 | OUTPUT ${json} | 63 | OUTPUT ${json} | ||
63 | COMMAND ${command} | 64 | COMMAND ${command} | ||
64 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | 65 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
65 | DEPENDS ${desktop} | 66 | DEPENDS ${desktop} | ||
67 | COMMENT "Generating ${relativejson}" | ||||
66 | ) | 68 | ) | ||
67 | set_property(TARGET ${target} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json}) | 69 | set_property(TARGET ${target} APPEND PROPERTY AUTOGEN_TARGET_DEPENDS ${json}) | ||
68 | endfunction() | 70 | endfunction() | ||
69 | 71 | | |||
70 | function(_desktop_to_json_cmake28 desktop json compat) | 72 | function(_desktop_to_json_cmake28 desktop json compat) | ||
71 | # This function runs desktoptojson at *configure* time, ie, when CMake runs. | 73 | # This function runs desktoptojson at *configure* time, ie, when CMake runs. | ||
72 | # This is necessary with CMake < 3.0.0 because the .json file must be | 74 | # This is necessary with CMake < 3.0.0 because the .json file must be | ||
73 | # generated before moc is run, and there was no way until CMake 3.0.0 to | 75 | # generated before moc is run, and there was no way until CMake 3.0.0 to | ||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |