Changeset View
Changeset View
Standalone View
Standalone View
KF5PackageMacros.cmake
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 139 | if (alreadyin LESS 0) | |||
---|---|---|---|---|---|
143 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/regenerateindex.sh ${regenerateindex}) | 143 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/regenerateindex.sh ${regenerateindex}) | ||
144 | endif() | 144 | endif() | ||
145 | 145 | | |||
146 | 146 | | |||
147 | set(kpkgqrc "${CMAKE_CURRENT_BINARY_DIR}/${component}.qrc") | 147 | set(kpkgqrc "${CMAKE_CURRENT_BINARY_DIR}/${component}.qrc") | ||
148 | find_program(KPACKAGE_RCC rcc DOC "rcc binary for generating kpackage contents.rcc files") | 148 | find_program(KPACKAGE_RCC rcc DOC "rcc binary for generating kpackage contents.rcc files") | ||
149 | set(metadatajson ${metadatajson}) | 149 | set(metadatajson ${metadatajson}) | ||
150 | set(root ${root}) | 150 | set(root ${root}) | ||
151 | set(install_dir ${install_dir}) | | |||
152 | set(BINARYDIR ${CMAKE_CURRENT_BINARY_DIR}) | 151 | set(BINARYDIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
153 | set(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") | 152 | set(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") | ||
154 | set(OUTPUTFILE "${kpkgqrc}") | 153 | set(OUTPUTFILE "${kpkgqrc}") | ||
155 | set(component ${component}) | 154 | add_custom_target(${component}-${root}-qrc ALL | ||
156 | include(${kpackagedir}/qrc.cmake) | 155 | COMMAND ${CMAKE_COMMAND} -DINSTALL_DIR=${install_dir} -DROOT=${root} -DCOMPONENT=${component} -DDIRECTORY=${DIRECTORY} -D OUTPUTFILE=${OUTPUTFILE} -P ${kpackagedir}/qrc.cmake | ||
156 | DEPENDS ${component}-${root}-metadata-json) | ||||
157 | set(GENERATED_RCC_CONTENTS "${CMAKE_CURRENT_BINARY_DIR}/${component}-contents.rcc") | 157 | set(GENERATED_RCC_CONTENTS "${CMAKE_CURRENT_BINARY_DIR}/${component}-contents.rcc") | ||
158 | # add_custom_target depends on ALL target so qrc is run everytime | 158 | # add_custom_target depends on ALL target so qrc is run everytime | ||
159 | # it doesn't have OUTPUT property so it's considered out-of-date every build | 159 | # it doesn't have OUTPUT property so it's considered out-of-date every build | ||
160 | add_custom_target(${component}-${root}-contents-rcc ALL | 160 | add_custom_target(${component}-${root}-contents-rcc ALL | ||
161 | COMMENT "Generating ${component}-contents.rcc" | 161 | COMMENT "Generating ${component}-contents.rcc" | ||
162 | COMMAND ${KPACKAGE_RCC} ${kpkgqrc} --binary -o ${GENERATED_RCC_CONTENTS} | 162 | COMMAND ${KPACKAGE_RCC} ${kpkgqrc} --binary -o ${GENERATED_RCC_CONTENTS} | ||
163 | DEPENDS ${component}-${root}-metadata-json ${kpkgqrc}) | 163 | DEPENDS ${component}-${root}-metadata-json ${component}-${root}-qrc) | ||
164 | install(FILES ${GENERATED_RCC_CONTENTS} DESTINATION ${KDE_INSTALL_FULL_DATADIR}/${install_dir}/${root}/${component}/ RENAME contents.rcc) | 164 | install(FILES ${GENERATED_RCC_CONTENTS} DESTINATION ${KDE_INSTALL_FULL_DATADIR}/${install_dir}/${root}/${component}/ RENAME contents.rcc) | ||
165 | 165 | | |||
166 | endfunction() | 166 | endfunction() |