<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hello,</div><div dir="ltr"><br></div><div dir="ltr">The main wish is to install to the user directory as described in the documentation, the absolute path to the „all users“ works already:</div><div dir="ltr"><br></div><div dir="ltr">Here is the description from the manual, also attached as an image</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">Automatic plug-in loading</div><div dir="ltr">Lightroom automatically checks for plug-ins in the standard Modules folder where other Lightroom settings are stored:</div><div dir="ltr"> In Mac OS (current user) In Mac OS (all users)</div><div dir="ltr">In Windows XP</div><div dir="ltr">plug-in and also installs a helper application.</div><div dir="ltr">Plug-ins that are installed in this location are automatically listed in the Plug-in Manager dialog. You can use the dialog to enable or disable such a plug-in, but not to remove it. The Remove button is dimmed when such a plug-in is selected.</div><div dir="ltr">~/Library/Application Support/Adobe/Lightroom/Modules /Library/Application Support/Adobe/Lightroom/Modules</div><div dir="ltr">C:\Documents and Users\username\Application Data\Adobe\Lightroom\Modules</div><div dir="ltr">C:\Users\username\AppData\Roaming\Adobe\Lightroom\Modules You may want to use this location if, for example, you are writing an installer that installs a Lightroom</div><div dir="ltr"> In Windows 7/Vista</div><div dir="ltr"><br></div><div dir="ltr"><img src="cid:4C1B6CC5-4E73-4B80-B6BA-9E33AA09D163-L0-001"><br></div><div dir="ltr"><br></div><div dir="ltr">Regards</div><div dir="ltr">Roman</div></div><div dir="ltr"><br><blockquote type="cite">Am 01.11.2019 um 05:10 schrieb David Aguilar <davvid@gmail.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>I would also suggest avoiding absolute paths so that the user can tell you where to root the installation.</div><div><br></div><div>One way to do that is to use GNUInstallDirs so that the user can specify the install prefix. And maybe you want to let them user their home directory be default if they've not specified it:<br></div><div><br></div><div><br></div><div>include(GNUInstallDirs)</div><div><br></div><div>if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)</div><div> # NOTE: default to the home directory, assumes $HOME is defined in the environment</div><div> set(CMAKE_INSTALL_PREFIX $ENV{HOME} CACHE PATH "Installation prefix" FORCE) <br></div><div>endif ()</div><div><br></div><div>[... usual stuff here ...]</div><div><br></div><div># NOTE: relative path<br></div><div>install(TARGETS target_name DESTINATION "Library/Application Support/Adobe/Lightroom/Modules")</div><div><br></div><div><br></div><div>Then the user would just "make && make install" and it'll install to their ~/Library directory by default.</div><div><br></div><div>Then, if they have the permissions to do so, they can install to the global system location using:</div><div><br></div><div>cmake -D CMAKE_INSTALL_PREFIX=/ . &&</div><div>make &&</div><div>sudo make install</div><div><br></div><div>Mixing both in the same cmake invocation can be done, but now you've made it impossible to install into other locations (for testing, packaging, etc).</div><div><br></div><div>For example, someone might want to package it without sudo, so they might want to do this instead of "sudo make install":</div><div><br></div><div> make DESTDIR=$PWD/tmp install</div><div><br></div><div>and then you have a tmp/Library/ directory structure that can be made into a macOS .pkg installer:<br></div><div><br></div><div> pkgbuild --install-location / --identifier org.domain.pkgs.example --version 1.0.0 --root tmp example-1.0.0.pkg</div><div><br></div><div>And now you have a .pkg installer that updates the global /Library directory without needing to be root to build it.</div><div><br></div><div><br></div><div>Question -- is this a situation where you want a single build to install into both locations, or is the literally the same plugin and it only needs to be in one of the two locations (global vs. user)? I interpreted your question to be about the latter, where the user really only needs one or the other, and it's the same plugin in both cases.</div><div><br></div><div>I don't know if cpack handles this for you, but hopefully this is helpful advice.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 31, 2019 at 10:19 AM David Cole via cmake-developers <<a href="mailto:cmake-developers@cmake.org">cmake-developers@cmake.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">According to the docs, the INSTALL command uses the absolute path if<br>
it is given as the DESTINATION, so .... it should work.<br>
<a href="https://cmake.org/cmake/help/latest/command/install.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/latest/command/install.html</a><br>
<br>
Did you try using a double quoted string, instead of escaping the<br>
space with a backslash?<br>
<br>
I think this should work for the absolute one:<br>
INSTALL( ... DESTINATION "/abs/path/to/some folder")<br>
<br>
For the one in the home directory, I'm not sure if a string that<br>
starts with "~" is considered absolute or not, so it may or may not<br>
end up where you expect it. Can you resolve it before hand with a<br>
get_filename_component call, (or otherwise), and pass in a string that<br>
begins with "/" ...?<br>
<br>
<br>
Hope this helps,<br>
David C.<br>
<br>
<br>
On Mon, Oct 28, 2019 at 4:36 PM Roman Wüger <<a href="mailto:roman.wueger@gmx.at" target="_blank">roman.wueger@gmx.at</a>> wrote:<br>> Hello,<br>> I tried to install a file/directory with productbuild on macOS which is generated with CPack<br>> The most of the files are installed correctly, but I have two problems:<br>><br>
> If I want to install to “/Library/Application\ Support/Adobe/Lightroom/Modules”<br>
> If I want to install to the users modules folder “~/Library/Application\ Support/Adobe/Lightroom/Modules”<br>><br>
> How can I archive these two?<br>><br>
> I already tried the following with no luck:<br>> install(DIRECTORY $<TARGET_FILE_DIR:${PROJECT_NAME}>/${CMAKE_PROJECT_NAME}.lrplugin<br>> DESTINATION /Library/Application\ Support/Adobe/Lightroom/Modules)<br>><br>
> install(DIRECTORY $<TARGET_FILE_DIR:${PROJECT_NAME}>/${CMAKE_PROJECT_NAME}.lrplugin<br>> DESTINATION ~/Library/Application\ Support/Adobe/Lightroom/Modules)<br>> Best Regards<br>
><br>
> Roman<br></blockquote></div>-- <br><div dir="ltr" class="gmail_signature">David</div></div>
</div></blockquote></body></html>