[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] (no subject)
From:       baschdel_98 () web ! de
Date:       2019-12-16 10:37:34
Message-ID: trinity-40c4189f-ece2-4f26-b187-463fdcbb6434-1576492654804 () 3c-app-webde-bap51
[Download RAW message or body]

[Attachment #2 (text/html)]

<html><head></head><body><div style="font-family: Verdana;font-size: \
12.0px;"><div>Hello,</div>

<div>&nbsp;</div>

<div>I&#39;ve got a small Problem with Cpack and BundleUtilities on Windows.</div>

<div>At the moment I want to copy *.dll file at install time and also include these \
in the created &quot;installer&quot;.</div>

<div>When I install the program through VisualStudio, everything works like a charm. \
But when I invoke cpack via the command prompt, no dll files appear in the \
&quot;Installer&quot;. I am not sure what is happening.</div>

<div>&nbsp;</div>

<div>My code to archive this looks like this:</div>

<div><br/>
set(RELATIV_INSTALL_DIRECTORY &quot;bin&quot;)<br/>
install(TARGETS &#36;{CMAKE_PROJECT_NAME}&nbsp;<br/>
&nbsp;&nbsp; &nbsp;RUNTIME DESTINATION &#36;{RELATIV_INSTALL_DIRECTORY}<br/>
&nbsp;&nbsp; &nbsp;COMPONENT app)</div>

<div>
<div><br/>
if(WIN32)<br/>
&nbsp; &nbsp; #set Variable &quot;dirs&quot;</div>

<div>&nbsp;&nbsp; &nbsp;set(executable_path \
&quot;&#92;&#36;{CMAKE_INSTALL_PREFIX}/&#36;{RELATIV_INSTALL_DIRECTORY}/&#36;{CMAKE_PROJECT_NAME}.exe&quot;)<br/>
 endif()</div>
</div>

<div>
<div><br/>
install(CODE &quot;<br/>
&nbsp;&nbsp; &nbsp;include (BundleUtilities)<br/>
&nbsp;&nbsp; &nbsp;fixup_bundle(&#92;&quot;&#36;{executable_path}&#92;&quot; \
&#92;&quot;&#92;&quot; &#92;&quot;&#36;{DIRS}&#92;&quot;)<br/> &nbsp;&nbsp; \
&nbsp;&quot;<br/> &nbsp;&nbsp; &nbsp;COMPONENT app<br/>
&nbsp;&nbsp; &nbsp;)</div>

<div>set(CPACK_OUTPUT_FILE_PREFIX &quot;&#36;{CMAKE_BINARY_DIR}/package&quot;)</div>

<div>set(CPACK_PACKAGE_NAME &quot;&#36;{CMAKE_PROJECT_NAME}&quot;)<br/>
set(CPACK_PACKAGE_VENDOR &quot;&#36;{COMPANY_NAME}&quot;)<br/>
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY &quot;Installer for \
&#36;{CMAKE_PROJECT_NAME}.&quot;)<br/> set(CPACK_PACKAGE_VERSION_MAJOR \
&quot;&#36;{PROJECT_VERSION_MAJOR}&quot;)<br/> set(CPACK_PACKAGE_VERSION_MINOR \
&quot;&#36;{PROJECT_VERSION_MINOR}&quot;)<br/> set(CPACK_PACKAGE_VERSION_PATCH \
&quot;&#36;{PROJECT_VERSION_PATCH}&quot;)<br/> set(CPACK_PACKAGE_VERSION \
&quot;&#36;{CPACK_PACKAGE_VERSION_MAJOR}.&#36;{CPACK_PACKAGE_VERSION_MINOR}.&#36;{CPACK_PACKAGE_VERSION_PATCH}&quot;)<br/>
 set(CPACK_PACKAGE_INSTALL_DIRECTORY \
&quot;company/&#36;{CMAKE_PROJECT_NAME}&quot;)</div>

<div>set(CPACK_COMPONENTS_ALL app)</div>

<div>set(CPACK_RESOURCE_FILE_LICENSE \
&quot;&#36;{CMAKE_SOURCE_DIR}/license.txt&quot;)</div>

<div><br/>
if(WIN32)<br/>
&nbsp;&nbsp; &nbsp;set(CPACK_GENERATOR WIX;7Z)<br/>
endif()</div>

<div>include(CPack)</div>

<div>&nbsp;</div>

<div>I hope someone is able to help me with this issue.</div>

<div>Best regards</div>

<div>Sebastian</div>
</div></div></body></html>



-- 

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic