Re: [CMake] proper setup to create file and have it installed
On 12/29/2010 08:55 AM, Michael Hertling wrote: The tricky part is how to set up the custom command within the loop. Okay, I think I can work with the for-loop. Thank you. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] proper setup to create file and have it installed
On 12/27/2010 09:51 PM, Michael Hertling wrote: You might use the ALL option of ADD_CUSTOM_TARGET() to incorporate the language target in CMake's all target which, in turn, is built as a prerequisite of the install target. Alternatively, if the language file should be installed only if the language target has been built before, you might use the OPTIONAL flag of the INSTALL(FILES ...) command to avoid the fatal error due to a missing file. Thank you, that works. Now, a related question. Is there some way to successively add files dependencies to an add_custom_target? I know that DEPENDS does this, but it'd be nice if I could create a install-files target and in various points in the file add the files which are needed as dependencies. Otherwise I will basically have a new target for every install line which installs a generated file. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] proper setup to create file and have it installed
I'm using lupdate/lrelease in QT and trying to have a generated file installed. I've hit a few problems that I'm not clear on how they should be resolved. To produce the file I have a chain of commands that ends with: add_custom_command( OUTPUT English.qm COMMAND lrelease ${LANG_DIR}/MasterTypes.ts -qm English.qm DEPENDS ${LANG_DIR}/MasterTypes.ts ) To directly produce this file I add the following target: add_custom_target( language DEPENDS English.qm ) Now make language produces the file(s) as I want. I now however need to install them. install files won't take a relative path so I've specified the following: install( FILES ${CMAKE_BINARY_DIR}/src/gui/English.qm DESTINATION data/ ) I thought there might be some way to refer to the relative English.qm file. Is there? That aside, I need that the install command checks the dependencies on the file. As specified it does not, and I don't see a DEPENDS clause for install. How do I ensure that the installation updates the file as required? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] avoiding building test targets
How can I have CMake not build test targets when doing a make install? I'd prefer that test targets are only ever built if make test is called. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] avoiding building test targets
On 10/07/2010 11:28 AM, Michael Wild wrote: function(add_test_executable name) add_executable(${name} EXCLUDE_FROM_ALL ${ARGN}) if(NOT TARGET test-exes) add_custom_target(test-exes) endif() add_dependencies(test-exes ${name}) endfunction() add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMENT Running ctest) add_dependencies(check test-exes) That's great. Thank you. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] best practice way of copying libraries to an install package
I need to produce a nice self-contained packaged of executables and libraries for my project. I've looked around the web and found many very distinct ways of achieving this. I was wondering if there is some best practice related to this. Ideally I'd like to work from the same variables I use for linking, but I think I've already given up on that and know I'll have to hand-list every library. But still then I have these issues: - on windows the libraries are often the .lib, but I need to locate the associated DLL - on linux I need to ensure I'm copying the actual file an not a symlink - between debug/release I seem to have to list the files twice - I'd prefer a cross-platform solution, I don't want to code the copying once for each target platform If anybody has a good resource, or can recommend some best practices, that would be great. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- BigTPoker - Poker fun and games http://BigTPoker.com/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] using only release versions of QT libraries
On 09/09/2010 09:21 PM, John Drescher wrote: Do not do that. Your application will crash (in unexpected ways) if you mix debug and release libraries in visual studio. You also can not mix compiler versions. I mix release/debug libraries all the time. Just because I wish to debug my application doesn't mean I wish to debug all the libraries I am using. It's just that the CMake QT directives assume I want debug when it is available. Note that if I delete my QT debug libraries it will also just use the release versions (I looked in the module for findqt). -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Need to get something off your chest? Have an urge to scream? Your boss up for the weekly bastinado? http://NamelessRage.com/ Berate. Swear. Lambaste. Castigate. All with reckless abandon and anonymity. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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] using only release versions of QT libraries
My cmake file has the fairly standard QT setup: find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtNetwork QtSvg QtOpenGL QtMain REQUIRED) include(${QT_USE_FILE}) and then later use ${QT_LIBRARIES} However, this uses the debug libraries when I do a debug build. I don't want that. I want to just use the Release libraries for QT. Is there an easy way to do this? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Need to get something off your chest? Have an urge to scream? Your boss up for the weekly bastinado? http://NamelessRage.com/ Berate. Swear. Lambaste. Castigate. All with reckless abandon and anonymity. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. signature.asc Description: OpenPGP digital signature ___ 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