On Tue, Mar 6, 2012 at 10:28 AM, Eric Noulard <[email protected]> wrote: > 2012/3/6 Dominik Schmidt <[email protected]>: >> On Tue, Mar 6, 2012 at 4:05 PM, Eric Noulard <[email protected]> wrote: >>> > So the next step would be to configure e.g. CPACK_CROSSPACKAGING and >>> > CPACK_WIN32 in my project config file and try to make GetPrerequisites >>> > work >>> > with them? >>> >>> That's not what I was thinking about. >>> May be you could just add something like: >>> >>> if (CPACK_CROSSPACKAGING) >>> set(WIN32 @WIN32@) >>> set(CMAKE_CROSSCOMPILING @CMAKE_CROSSCOMPILING@) >>> endif(CPACK_CROSSPACKAGING) >>> >>> So that if CPACK_CROSSPACKAGING is set in your CMakeLists.txt >>> it will trigger the definition of WIN32 and CMAKE_CROSSCOMPILING in your >>> configured CPackProjectConfig file. >> >> Neither works. I took a closer look at CPackConfig.cmake in my build >> dir and saw >> SET(CPACK_SYSTEM_NAME "win32") is defined. >> (which I didnt define, btw >> http://www.vtk.org/Wiki/CMake:CPackConfiguration say it defaults to >> CMAKE_SYSTEM_NAME which is Windows in my case tho) >> >> When I tried to print it in GetPrerequisites, it was empty. >> So variables defined there aren't available when needed here it seems. >> >> message(FATAL_ERROR "CPACK_SYSTEM_NAME is: ${CPACK_SYSTEM_NAME}") >> >> CMake Error at >> /home/domme/dev/installs/share/cmake-2.8/Modules/GetPrerequisites.cmake:626 >> (message): >> CPACK_SYSTEM_NAME is: >> Call Stack (most recent call first): >> /home/domme/dev/installs/share/cmake-2.8/Modules/BundleUtilities.cmake:432 >> (get_prerequisites) >> /home/domme/dev/installs/share/cmake-2.8/Modules/BundleUtilities.cmake:612 >> (get_bundle_keys) >> /home/domme/dev/sources/my_client/cmake/modules/DeployQt4.cmake:116 >> (fixup_bundle) >> /home/domme/dev/sources/my_client/win/cmake_install.cmake:43 >> (FIXUP_QT4_BUNDLE) > > This is the interesting part. > This installation part is launched by CPack before packaging. > >>> GetPrerequisites may simply works after that (as far as I understood >>> your previous e-mail). >> >> Err well. with the rest of my patch applied :-) > > So I misunderstood, one of your previous answer >>> In order to be sure that nothing else is breaking you can try to >>> [manually] add the missing definition in the CPackConfig.cmake file. >>> This file is loaded by CPack at CPack-time so that any definitions in >>> there >>> will be seen during CPack run. > >> Went fine. > > I have not the rime now to dive into CPack source code in order to check > which context comes with the installation step launched by CPack. > > Does the [cross-]DeployQt4 works if you simply do > > make install > > ? > > > -- > Erk > Le gouvernement représentatif n'est pas la démocratie -- > http://www.le-message.org > -- > > 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
Just an FYI from the original author of GetPrerequisites here: cross-packaging was not even considered as we developed it. If it works at all, it's by happy accident. I always envisioned packaging as occurring on a "host == target" platform. If we want to support cross-packaging for real in CMake/CPack, then we need some dashboard submissions that build such a beast, and submit nightly... so that we can monitor for errors when we do make changes to the source tree. Thanks, and best of luck here, David C. -- 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
