[CMake] WG: Problems with MinGW + BundleUtilities

David Cole david.cole at kitware.com
Tue Feb 8 13:35:08 EST 2011


Copy the file "C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/BundleUtilities.cmake" and in your own copy
replace all:

  message(STATUS "

with:

  message("


Then reference that copied file directly from your "install/CMakeLists.txt"
and run it again. -- i.e. -- instead of "include(BundleUtilities)" do
"include(${CMAKE_CURRENT_SOURCE_DIR}/BundleUtilities.cmake)"

After running it, if it doesn't give you enough information to diagnose the
problem yourself, send that output to the list.


HTH,
David



On Mon, Jan 31, 2011 at 5:06 PM, NoRulez <norulez at me.com> wrote:

> I had sent this email, but it wasn’t forwarded to the mailing list.
>
> Maybe the administrator could forward the email, because I had attached a
> tiny example (RAR archive).
>
>
>
> Best Regards
>
>
>
> *Von:* NoRulez [mailto:norulez at me.com]
> *Gesendet:* Freitag, 28. Jänner 2011 17:52
> *An:* 'CMake MailingList'
> *Betreff:* AW: [CMake] Problems with MinGW + BundleUtilities
>
>
>
> I’ve added a tiny demo project which shows exactly the same error.
>
>
>
> Here is the output of the cpack command:
>
>
>
> C:\Users\norulez\Desktop\DemoProject\build>"C:\Program Files (x86)\CMake
> 2.8\bin\cpack.exe"
>
> CPack: Create package using NSIS
>
> CPack: Install projects
>
> CPack: - Run preinstall target for: DemoProject
>
> CPack: - Install project: DemoProject
>
> CPack: -   Install component: DemoProject
>
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/BundleUtilities.cmake:657 (message):
>
>   error: fixup_bundle: not a valid bundle
>
> Call Stack (most recent call first):
>
>   C:/Users/norulez/Desktop/DemoProject/build/install/cmake_install.cmake:43
> (fixup_bundle)
>
>   C:/Users/norulez/Desktop/DemoProject/build/cmake_install.cmake:33
> (INCLUDE)
>
>
>
>
>
> CPack Error: Error when generating package: DemoProject
>
>
>
> C:\Users\norulez\Desktop\DemoProject\build>
>
>
>
> Thanks in advance
>
>
>
> Best Regards
>
> NoRulez
>
>
>
> *Von:* David Cole [mailto:david.cole at kitware.com]
> *Gesendet:* Mittwoch, 19. Jänner 2011 15:07
> *An:* NoRulez
> *Cc:* CMake MailingList
> *Betreff:* Re: [CMake] Problems with MinGW + BundleUtilities
>
>
>
> Send us the full output of the call to fixup_bundle. Is the output
> different if you start from a clean build tree, and run fixup_bundle for the
> first time?
>
> On Wed, Jan 19, 2011 at 5:35 AM, NoRulez <norulez at me.com> wrote:
>
> The two files are also in the QT_BINARY_DIR
>
>
>
> The two directories (QT_BINARY_DIR and QT_LIBRARY_DIR ) are the directories
> where the dlls are stored.
>
>
>
> So, what should I do now to get it working?
>
>
>
>
>
> *Von:* David Cole [mailto:david.cole at kitware.com]
> *Gesendet:* Mittwoch, 19. Jänner 2011 11:23
>
>
> *An:* NoRulez
> *Cc:* CMake MailingList
> *Betreff:* Re: [CMake] Problems with MinGW + BundleUtilities
>
>
>
> Never mind. It's QT_BINARY_DIR and QT_LIBRARY_DIR, right there in the first
> line of code.
>
>
>
> So add to that variable the actual directories where all of your dlls live
> and it should work.
>
>
>
> i.e. -- what directories are the following files in?
>
>   libgcc_s_dw2-1.dll
>
>   mingwm10.dll
>
>
>
> They also need to be included in DIRS for fixup_bundle and
> get_prerequisites to find them.
>
>
>
> On Wed, Jan 19, 2011 at 5:21 AM, David Cole <david.cole at kitware.com>
> wrote:
>
> And what is the value of "DIRS"?
>
>
>
> On Wed, Jan 19, 2011 at 3:40 AM, NoRulez <norulez at me.com> wrote:
>
> The code I use to create the bundle is as followed
>
>
>
>         SET(DIRS ${QT_BINARY_DIR} ${QT_LIBRARY_DIR})
>
>         SET(APPS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.exe")
>
>         # Not working (Also when trying this in the INSTALL(CODE
>
>         # SET(APPS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_NAME}.exe")
>
>         # SET(APPS "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.exe")
>
>         # SET(APPS "\${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.exe")
>
>         SET(PLUGINS plugins)
>
>         INSTALL(FILES "${QT_PLUGINS_DIR}/sqldrivers/qsqlited4.dll"DESTINATION
> ${PLUGINS}/sqldrivers COMPONENT ${PROJECT_NAME})
>
>         INSTALL(CODE "
>
>             file(GLOB_RECURSE QTPLUGINS
>
>               \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PLUGINS}/sqldrivers/*
> ${CMAKE_SHARED_LIBRARY_SUFFIX}\")
>
>             include(BundleUtilities)
>
>             fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
>
>             " COMPONENT ${PROJECT_NAME})
>
>
>
> The install command for the application is:
>
>
>
> INSTALL(TARGETS ${PROJECT_NAME}
>
>         BUNDLE DESTINATION . COMPONENT ${PROJECT_NAME}
>
>         RUNTIME DESTINATION . COMPONENT ${PROJECT_NAME})
>
>
>
> Thanks in advance
>
>
>
> Best Regards
>
> NoRulez
>
>
>
> *Von:* David Cole [mailto:david.cole at kitware.com]
> *Gesendet:* Mittwoch, 19. Jänner 2011 00:26
> *An:* NoRulez
> *Cc:* CMake MailingList
> *Betreff:* Re: [CMake] Problems with MinGW + BundleUtilities
>
>
>
> Providing code samples and/or copy/pasted output from doing your build
> would be more effective.
>
>
>
> I don't really know what you mean by "give two destinations"
>
>
>
> On Tue, Jan 18, 2011 at 5:51 PM, NoRulez <norulez at me.com> wrote:
>
> Thanks for the answer
>
>
>
> I already added ${QT_LIBRARY_DIR} and ${QT_BINARY_DIR}, but if I give two
>  destinations, I get the error that it isn't a valid bundle.
>
>
>
> Best Regards
>
> NoRulez
>
> Am 18.01.2011 um 23:43 schrieb David Cole <david.cole at kitware.com>:
>
> On Windows, you have to tell fixup_bundle where to find the Qt dll's (and
> the others) by passing in a list of directories as the last argument. Or,
> alternatively, simply add those directories to the PATH as well.
>
>
>
> HTH,
>
> David
>
>
>
>
>
> On Tue, Jan 18, 2011 at 4:34 PM, NoRulez <norulez at me.com> wrote:
>
> Hello,
>
>
>
> I build my Qt project successfully on linux/mac with the great
> BundleUtilities.
>
> On Windows the required Qt dll’s and also “libgcc_s_dw2-1.dll” and
> “mingwm10.dll” aren’t packaged.
>
>
>
> The dumpbin.exe is in the path and the dumpbin.exe is under
> C:\masm32\bin\dumpbin.exe
>
>
>
> How can I solve this?
>
>
>
> Thanks in advance
>
>
>
> Best Regards
>
> NoRulez
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110208/78085a23/attachment-0001.htm>


More information about the CMake mailing list