Can plasma_install_package use an absolute path to install a component?
Michail Vourlakos
mvourlakos at gmail.com
Thu May 11 17:57:01 UTC 2017
On 11/05/2017 07:18 μμ, Aleix Pol wrote:
> On Wed, May 10, 2017 at 3:36 PM, Michail Vourlakos <mvourlakos at gmail.com> wrote:
>> Hello everyone,
>>
>>
>> is it possible for plasma_install_package found inside a CMakeLists.txt file
>> to install a component (plasmoid, containment, etc.) from an absolute path?
>>
>>
>> The issue is the following: In Latte plasmoid we make through CMake some
>> adjustments in our plasmoid code and add it in the cmake "build" directory
>> afterwards. For easiness afterwards we are using plasma_install_package to
>> install that plasmoid and until now we were using a static reference to that
>> plasmoid in our build directory, for example,
>>
>> plasma_install_package(build/plasmoid/release org.kde.latte.plasmoid)
>>
>> problem is that in that way we cant use kdesrc-build... I tried:
>>
>>
>> plasma_install_package(${CMAKE_CURRENT_BINARY_DIR}/plasmoid/release
>> org.kde.latte.plasmoid)
>>
>>
>> but as it appears the plasma_install_package adds by default the absolute
>> path of the latte source code and the above command fails...
>>
>>
>> any ideas,
>>
>>
>> regards,
>>
>> michail
> Hi Michail,
> Have you looked into what plasma_install_package does? (in fact,
> kpackage_install_package in kpackage framework).
>
> Aleix
Hello Aleix,
I have found the mentioned line in kpackage_install_package, line#33 :
install(DIRECTORY ${dir}/ DESTINATION
${KDE_INSTALL_DATADIR}/${install_dir}/${root}/${component}
PATTERN .svn EXCLUDE
PATTERN *.qmlc EXCLUDE
PATTERN CMakeLists.txt EXCLUDE
PATTERN Messages.sh EXCLUDE
PATTERN dummydata EXCLUDE)
I read the cmake documentation concerning "install(DIRECTORY ..."
and even though it doesnt mention absolute paths, it says that relative
paths are translated automatically based on the projects root directory.
Do you have any insights?
regards,
michail
P.S. btw we solved it for Latte by providing a different approach in our
source handling in order to be able to use
plasma_install_package with relative paths... kdesrc-build should work
just fine now
More information about the Plasma-devel
mailing list