[CMake] CPack - Mac OS X Universal dmg
Hello, I would like to build a Mac OS X Universal dmg using cpack, but currently we're building an i386 - how might we build universal instead? Here's our CPack config: http://code.google.com/p/synergy-plus/source/browse/trunk/cmake/CMakeLists_cpack.txt Nick ___ 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
Re: [CMake] CPack - Mac OS X Universal dmg
When configuring your build set *CMAKE_OSX_ARCHITECTURES * to both the architectures you wish to build. For example 'i386;ppc'. This will produce libraries/executables with both architectures embedded in them. You can check this by just running the 'file' command on any of the libraries/executables. On Sun, Jun 20, 2010 at 10:08 AM, Nick Bolton nick.bolton...@gmail.comwrote: Hello, I would like to build a Mac OS X Universal dmg using cpack, but currently we're building an i386 - how might we build universal instead? Here's our CPack config: http://code.google.com/p/synergy-plus/source/browse/trunk/cmake/CMakeLists_cpack.txt Nick ___ 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
[CMake] Non-build output
How would I go about placing a text file in the same directory as a target's output? For example, let's say I have a target called foo, which creates an executable. foo has a config file called foo.conf that should always go in the same directory. At the moment, it resides in the src/ directory for the foo target. How would I get it to automatically copy into the same directory as the foo executable as part of the build process? For bonus points, how would this interact with make install? Regards, -- Clark ___ 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
Re: [CMake] CPack - Mac OS X Universal dmg
This is OK for the easy case, where the source code doesn't require special defines to be set depending on the architecture. Some projects define symbols, such as FOO_PPC or FOO_X86 on the command line, instead of doing the detection in-source using e.g. __ppc__ or __x86_64__, respectively. In the latter case, one has to use lipo to manually glue the output of multiple binary trees into universal binaries, and the use of CPack is no longer possible. Michael On 20. Jun, 2010, at 19:02 , Dave Partyka wrote: When configuring your build set *CMAKE_OSX_ARCHITECTURES * to both the architectures you wish to build. For example 'i386;ppc'. This will produce libraries/executables with both architectures embedded in them. You can check this by just running the 'file' command on any of the libraries/executables. On Sun, Jun 20, 2010 at 10:08 AM, Nick Bolton nick.bolton...@gmail.comwrote: Hello, I would like to build a Mac OS X Universal dmg using cpack, but currently we're building an i386 - how might we build universal instead? Here's our CPack config: http://code.google.com/p/synergy-plus/source/browse/trunk/cmake/CMakeLists_cpack.txt Nick ___ 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
Re: [CMake] Non-build output
Am 20.06.2010 19:14, schrieb Clark Gaebel: How would I go about placing a text file in the same directory as a target's output? For example, let's say I have a target called foo, which creates an executable. foo has a config file called foo.conf that should always go in the same directory. At the moment, it resides in the src/ directory for the foo target. How would I get it to automatically copy into the same directory as the foo executable as part of the build process? To copy files as part of the build process, you can use the cmake binary 'copy' command, e.g.: execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dest}) For bonus points, how would this interact with make install? To install files, use the install() directive with FILES, e.g.: install(FILES ${CMAKE_SOURCE_DIR}/README DESTINATION ${YOUR_INSTALL_DIR}) Regards, -- Clark Stefan ___ 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
Re: [CMake] Non-build output
2010/6/20 Clark Gaebel cg.wowus...@gmail.com: How would I go about placing a text file in the same directory as a target's output? For example, let's say I have a target called foo, which creates an executable. foo has a config file called foo.conf that should always go in the same directory. At the moment, it resides in the src/ directory for the foo target. How would I get it to automatically copy into the same directory as the foo executable as part of the build process? For bonus points, how would this interact with make install? Concerning install: Your target foo may be installed with install(TARGETS foo DESTINATION where/you/want) Your config file with install(FILE foo.conf DESTINATION where/you/want) Now if you want to put the foo.conf near to foo **in the build tree** **and assuming foo.conf is in the same source dir as foo sources** you may do: configure_file(foo.conf foo.conf COPYONLY) this should copy foo.conf from source tree to binary tree. It may be a problem if you usually do in-source build so you may a) rename foo.conf to foo.conf.in in the source b) do configure_file(foo.conf.in foo.conf COPYONLY) -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.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
Re: [CMake] Non-build output
I'm doing exclusively out-of-source builds, so this is perfect. Thank you! Regards, -- Clark On 06/20/10 16:31, Eric Noulard wrote: 2010/6/20 Clark Gaebel cg.wowus...@gmail.com: How would I go about placing a text file in the same directory as a target's output? For example, let's say I have a target called foo, which creates an executable. foo has a config file called foo.conf that should always go in the same directory. At the moment, it resides in the src/ directory for the foo target. How would I get it to automatically copy into the same directory as the foo executable as part of the build process? For bonus points, how would this interact with make install? Concerning install: Your target foo may be installed with install(TARGETS foo DESTINATION where/you/want) Your config file with install(FILE foo.conf DESTINATION where/you/want) Now if you want to put the foo.conf near to foo **in the build tree** **and assuming foo.conf is in the same source dir as foo sources** you may do: configure_file(foo.conf foo.conf COPYONLY) this should copy foo.conf from source tree to binary tree. It may be a problem if you usually do in-source build so you may a) rename foo.conf to foo.conf.in in the source b) do configure_file(foo.conf.in foo.conf COPYONLY) -- Regards, -Clark ___ 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
Re: [CMake] Various problems deploying a python module
On 06/19/2010 12:31 PM, Janosch Peters wrote: On 2010-06-18 08:29:25 +0200, Michael Hertling said: On 06/17/2010 04:23 PM, Janosch Peters wrote: I have two python frameworks on my mac: Python2.5 which comes with OS X, and python2.6 from macports. If I just use FIND_PACKAGE(PythonInterp) and FIND_PACKAGE(PythonLibs) I end up getting the python2.6 interpreter from macports but the python2.5 libs from OS X. Have you already tried variables like CMAKE_PREFIX_PATH et al. to direct the find functions to your preferred python installation? I tried CMAKE_PREFIX_PATH and also CMAKE_FRAMEWORK_PATH but the behaviour did not change. So I digged a bit into the modules code and found out that the default macports framework prefix is already recognized when looking for frameworks. However, as you can see in the snippet below (it's from FindPythonLib), cmake just adds -framework Python which apperantly defaults to the apple provided frameworks. It seems to me that you cannot change that behaviour in any way, but by changing the FindPythonLibs code. Correct me if Im wrong. Currently, I've no access to a Mac OS X system, so I myself can't test, but IMO, you're right: Even if PYTHON_LIBRARY and PYTHON_INCLUDE_DIR are detected as desired FindPythonLibs.cmake sets PYTHON_LIBRARY to -framework Python if PYTHON_INCLUDE_DIR indicates a framework - regardless of which. BTW, does PYTHON_INCLUDE_DIR get the right directory? BTW, the macro CMAKE_FIND_FRAMEWORKS doesent care about CMAKE_FRAMEWORK_PATH at all. I would consider that a bug. Here, I'd also expect the CMAKE_FRAMEWORK_PATH et al. to be recognized, perhaps along with ARGN for additional explicit framework locations; a bug report / feature request? I think the way to go would be to change CMAKE_FIND_FRAMEWORKS to make it recognise CMAKE_FRAMEWORK_PATH and use the first framework found in it to pass it to the -frameworks option and if none is found, just default to the apple system framework. Alternatively, you could use a modified FindPythonLibs.cmake, i.e. without the snippet from your latest post concerning frameworks, as a local CMake module in your project in junction with CMAKE_MODULE_PATH, or you could resort to FIND_{LIBRARY,PATH}() directly and let CMake figure out the correct options for linking and including. For the time being, I think I have to stick to my (very ugly) solution. ...or wait a little as the questionable snippet has gone: 8d87d12 ;) Regards, Michael ___ 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