Re: [CMake] Supressing Make, but not Generators
It's worryingly quiet on this subject. -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Smith Jack (Ext. - UGIS - UniCredit Group) Sent: Tuesday, March 02, 2010 6:31 PM To: cmake@cmake.org Subject: [CMake] Supressing Make, but not Generators I have the following scenario: I have a large project with several sub-projects. I always want CMake run Visual Studio/Nmake/Eclipse specific generators for all the sub-projects so that I may edit any sub-project in my IDE of choice on the platform of choice. BUT when Make (Gmake, Nmake, etc.) is run, to have platform detection occur since some of the sub-projects won't build on all platforms. Is this possible ? ___ 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
Re: [CMake] Supressing Make, but not Generators
Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Smith Jack (Ext. - UGIS - UniCredit Group) Sent: Tuesday, March 02, 2010 6:31 PM To: cmake@cmake.org Subject: [CMake] Supressing Make, but not Generators I have the following scenario: I have a large project with several sub-projects. I always want CMake run Visual Studio/Nmake/Eclipse specific generators for all the sub-projects so that I may edit any sub-project in my IDE of choice on the platform of choice. BUT when Make (Gmake, Nmake, etc.) is run, to have platform detection occur since some of the sub-projects won't build on all platforms. Is this possible ? ___ 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
Re: [CMake] Supressing Make, but not Generators
-Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Hendrik Sattler Sent: Wednesday, March 03, 2010 9:21 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. I'm afraid you've lost me there. Do I do this within a CMakeLists.txt file ? My current CMakeLists.txt relies upon ADD_SUBDIRECTORY(project_name) in order to generate the build targets. How do I conditionally exclude project_name from ALL in this case ? Thanks, Jack ___ 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] Supressing Make, but not Generators
You can test for platform flags.. if( win32 ) add_subdirectory( these_compile ) #... endif( win32 ) or add specific options that can be checked http://www.cmake.org/Wiki/CMake_Useful_Variables On Wed, Mar 3, 2010 at 12:27 AM, Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de wrote: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Hendrik Sattler Sent: Wednesday, March 03, 2010 9:21 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. I'm afraid you've lost me there. Do I do this within a CMakeLists.txt file ? My current CMakeLists.txt relies upon ADD_SUBDIRECTORY(project_name) in order to generate the build targets. How do I conditionally exclude project_name from ALL in this case ? Thanks, Jack ___ 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
Re: [CMake] Supressing Make, but not Generators
-Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of J Decker Sent: Wednesday, March 03, 2010 9:34 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators You can test for platform flags.. if( win32 ) add_subdirectory( these_compile ) #... endif( win32 ) or add specific options that can be checked http://www.cmake.org/Wiki/CMake_Useful_Variables Thanks , but that doesn't solve the problem. If I conditionally include a sub directory, then the generator will not be run against the project in that subdirectory. I want to generator (VisualStudio/Eclipse/whatever) to always run so that I may always see the entire project hierarchy within my development environment, but the generated makefile to perform a platform test to see if it should build the target. Is this possible. On Wed, Mar 3, 2010 at 12:27 AM, Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de wrote: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Hendrik Sattler Sent: Wednesday, March 03, 2010 9:21 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. I'm afraid you've lost me there. Do I do this within a CMakeLists.txt file ? My current CMakeLists.txt relies upon ADD_SUBDIRECTORY(project_name) in order to generate the build targets. How do I conditionally exclude project_name from ALL in this case ? Thanks, Jack ___ 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
Re: [CMake] Supressing Make, but not Generators
On 3. Mar, 2010, at 9:27 , Smith Jack (Ext. - UGIS - UniCredit Group) wrote: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Hendrik Sattler Sent: Wednesday, March 03, 2010 9:21 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. I'm afraid you've lost me there. Do I do this within a CMakeLists.txt file ? My current CMakeLists.txt relies upon ADD_SUBDIRECTORY(project_name) in order to generate the build targets. How do I conditionally exclude project_name from ALL in this case ? Thanks, Jack CMakeLists.txt: ### project(super) if(UNIX) set(BUILD_FOO) else() # FOO only builds on UNIX set(BUILD_FOO EXCLUDE_FROM_ALL) endif() add_subdirectory(foo) foo/CMakeLists.txt: ### project(foo) add_executable(foo ${BUILD_FOO} src1.cpp src2.cpp) HTH 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
Re: [CMake] Supressing Make, but not Generators
2010/3/3 Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of J Decker Sent: Wednesday, March 03, 2010 9:34 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators You can test for platform flags.. if( win32 ) add_subdirectory( these_compile ) #... endif( win32 ) or add specific options that can be checked http://www.cmake.org/Wiki/CMake_Useful_Variables Thanks , but that doesn't solve the problem. If I conditionally include a sub directory, then the generator will not be run against the project in that subdirectory. I want to generator (VisualStudio/Eclipse/whatever) to always run so that I may always see the entire project hierarchy within my development environment, but the generated makefile to perform a platform test to see if it should build the target. Is this possible. I don't think it is possible. You want to export usual CMake-time decision to Build-time, the specific platform check are not meant to be exported at build time. I'm not even sure it would be wise to try to do it (in the general case) because with add_custom_command/target you may be trying to execute platform specific executable on the wrong platform. I think the EXCLUDE_FROM_ALL proposed by Hendrik and explained by Michael is the best way to go. What to compile will NOT be decided at Build time but you'll be able to browse the code. The CMake design is something like one build tree for one platform what you ask for is more like dynamic build tree for several platform. As a side note I did cross some time ago a build system based on hand-written re-entrant GNU makefile which supported the scheme you described. I was nice but not that easy to maintain compared to a CMake build system. All of this is off course my own point of view :-) -- 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] Supressing Make, but not Generators
-Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, March 03, 2010 10:51 AM To: Smith Jack (Ext. - UGIS - UniCredit Group) Cc: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators 2010/3/3 Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of J Decker Sent: Wednesday, March 03, 2010 9:34 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators You can test for platform flags.. if( win32 ) add_subdirectory( these_compile ) #... endif( win32 ) or add specific options that can be checked http://www.cmake.org/Wiki/CMake_Useful_Variables Thanks , but that doesn't solve the problem. If I conditionally include a sub directory, then the generator will not be run against the project in that subdirectory. I want to generator (VisualStudio/Eclipse/whatever) to always run so that I may always see the entire project hierarchy within my development environment, but the generated makefile to perform a platform test to see if it should build the target. Is this possible. I don't think it is possible. You want to export usual CMake-time decision to Build-time, the specific platform check are not meant to be exported at build time. I'm not even sure it would be wise to try to do it (in the general case) because with add_custom_command/target you may be trying to execute platform specific executable on the wrong platform. I think the EXCLUDE_FROM_ALL proposed by Hendrik and explained by Michael is the best way to go. What to compile will NOT be decided at Build time but you'll be able to browse the code. The CMake design is something like one build tree for one platform what you ask for is more like dynamic build tree for several platform. As a side note I did cross some time ago a build system based on hand-written re-entrant GNU makefile which supported the scheme you described. I was nice but not that easy to maintain compared to a CMake build system. All of this is off course my own point of view :-) -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org Thanks for the response. I think Michael's solution fits my needs (although I haven't yet tested it.) Jack ___ 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] xcodeproj internal reference lottery
i am using cmake 2.8.0 on mac os x 10.6.2 with xcode 3.2.1 for generating .xcodeproj files for a large cross platform project. internally, .xcodeproj package files neatly distinguish project from user data information (such as debug settings) in separate files: project.pbxproj and user.pbxuser. in there, file references are tracked by hex ids: 104043E30104043E30104043 /* main.cpp */ now it happens, that each time i sync to head of the repository (with typically only a handful files changed) and recreate the project, cmake selects a complete new set of hex ids for its project.pbxproj file. as a result, user.pbxuser (while it does not get overwritten by cmake) is rendered no longer useful and is subsequently reset by xcode to default. is there a way to preserve those hex ids (or my debug setting for that matter)? maybe cmake could be configured with a seed hex ref from which all others are derived in a consistent manner. [on win_vx90 this works - maybe refs are stored by path rather than id] thank you. ___ 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] Skipping PATH when using find_library
Hi I have read the documentation on find_library command, and i think what i need is possible, but i just can't figure it out. I'd like to run the find_library command, so that it doesn't use the windows environment variable PATH for folders to look from. Is this possible with cmake? I tried a few of the additional commands for find_library, but it didn't seem to work. These few include NO_SYSTEM_ENVIRONMENT_PATH and NO_DEFAULT_PATH And additionally, I have a list of folders where to look from, currently i provide it as HINTS but i did try giving it as PATHS ___ 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] find_path for multiple files
Hi, I'm working on a new FindXXX module and I need to search for paths providing multiple header files, for instance path P1 could provide A.h and B.h while not providing C.h when path P2 provides the three of them. In this case, I want to detect P2 only. Does CMake has some built-in functions or module to achieve that or do I need to implement it myself? Guillaume ___ 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] xcodeproj internal reference lottery
The CMake generator for Xcode simply uses object pointers as the seed for those hex ids: that's why they change every time you run cmake. It's also what makes it easy to guarantee that those ids are unique without having a data structure to track it. Re-using the same ids would be possible, but it would add complexity to the xcode generator, and the ids would have to be cached and tracked somehow. It's a fairly tall order... If you have the time to propose how to do it, perhaps submitting a feature request and a patch to the bug tracker, I would be happy to review it. Cheers, David On Wed, Mar 3, 2010 at 5:33 AM, ha...@mac.com wrote: i am using cmake 2.8.0 on mac os x 10.6.2 with xcode 3.2.1 for generating .xcodeproj files for a large cross platform project. internally, .xcodeproj package files neatly distinguish project from user data information (such as debug settings) in separate files: project.pbxproj and user.pbxuser. in there, file references are tracked by hex ids: 104043E30104043E30104043 /* main.cpp */ now it happens, that each time i sync to head of the repository (with typically only a handful files changed) and recreate the project, cmake selects a complete new set of hex ids for its project.pbxproj file. as a result, user.pbxuser (while it does not get overwritten by cmake) is rendered no longer useful and is subsequently reset by xcode to default. is there a way to preserve those hex ids (or my debug setting for that matter)? maybe cmake could be configured with a seed hex ref from which all others are derived in a consistent manner. [on win_vx90 this works - maybe refs are stored by path rather than id] thank you. ___ 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
Re: [CMake] xcodeproj internal reference lottery
2010/3/3 David Cole david.c...@kitware.com: The CMake generator for Xcode simply uses object pointers as the seed for those hex ids: that's why they change every time you run cmake. It's also what makes it easy to guarantee that those ids are unique without having a data structure to track it. Re-using the same ids would be possible, but it would add complexity to the xcode generator, and the ids would have to be cached and tracked somehow. It's a fairly tall order... If you have the time to propose how to do it, perhaps submitting a feature request and a patch to the bug tracker, I would be happy to review it. Don't know in which case Hex id are used (and I'm not an Mac OS user) but may be it would be possible to derive those id as a simple hash function (like http://sites.google.com/site/murmurhash/) of something which somehow unique but invariant like the filename + path + project name + etc... Since this kind of function should be fast, may be you do not even have to cache the hexid. Theoretically there may be some collision but occurence probability should be very low. My 2 cents idea. -- 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] find_path for multiple files
On 3. Mar, 2010, at 11:33 , Guillaume Duhamel wrote: Hi, I'm working on a new FindXXX module and I need to search for paths providing multiple header files, for instance path P1 could provide A.h and B.h while not providing C.h when path P2 provides the three of them. In this case, I want to detect P2 only. Does CMake has some built-in functions or module to achieve that or do I need to implement it myself? Guillaume Is the mapping unique? I.e. if you find C.h, is it sure that the same directory also contains A.h and B.h? Then it's just a matter of ordering the find_path calls and providing HINTS based on the previous invocations. Also, if C.h is only optional, you might consider to just let the user deal with the whole thing... If not, it's going to be difficult to achieve what you want because there is no find_path_next... ___ 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] Weird behaviour of mark_as_advanced(), find_program() and the cache
Alexander Neundorf wrote: This sees the variable is already in the cache, but without meta info and adds it using AddCacheDefinition(). After this call, makefile-GetDefinition(FOO) returns an empty string, before this call it still returns foo. It's not the empty string in find_program()'s call to AddCacheDefinition that raises this problem. It's the bottom of cmMakefile's implementation of the method: // if there was a definition then remove it this-Internal-VarStack.top().Set(name, 0); I didn't figure out the correct way how to improve this. This is related to the open issue http://www.cmake.org/Bug/view.php?id=9008 discussed previously. I think it should end up in the cache as foo with the type FILEPATH, but I didn't figure out how to achieve this. Issue #9008 basically means you should never mix cache and non-cache variables with the same name. There are all kinds of historical reasons behind their interaction and changing anything will lead to subtle breakage for someone. (The original attempt at CMP0015 for issue 9008 is evidence of this.) The only safe way to combine cache and local variables of the same name is to do *all* the cache stuff first, and then later override it locally. -Brad ___ 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] Qt assistant in OsX application bundle
In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional plugins and finds them in your Qt installation because they do not get copied into your application bundle automatically. Since the prefixes do not match, Qt is complaining... You can confirm this by setting the environment variables DYLD_PRINT_LIBRARIES or DYLD_PRINT_LIBRARIES_POST_LAUNCH to a non-empty string and then starting your application from the command line (i.e. /path-to/application.app/Contents/MacOS/executable, where you have to replace the parts in ). Then watch for the library names that get loaded. Nothing should come from your Qt installation. If this is the source for the error, try including an empty qt.conf file in your bundle (or as a resource) as described here: http://doc.trolltech.com/4.6/qt-conf.html HTH Michael On 25. Feb, 2010, at 9:11 , Martin Guillon wrote: A little feedback on what s happening. After using the fixbundle script, my app works great on a machine without QT installed. I loads the frameworks I put in the bundle perfectly. But now I have a problem in my dev environment. After fixing the bundle, if I start my app, I get qt errors saying it finds multiple versions of qt, and then some of my executables wont start. That s not that bad in my dev environment but what if the user already have a qt somewhere? Is there a way to make so that my app only see the qt frameworks in the bundle? Thanks MArtin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Wednesday, February 24, 2010 4:05 PM To: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework Thanks a lot, it now works perfectly MArtin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Werner Smekal Sent: Wednesday, February 24, 2010 3:34 PM To: cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt
Re: [CMake] Qt assistant in OsX application bundle
Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional plugins and finds them in your Qt installation because they do not get copied into your application bundle automatically. Since the prefixes do not match, Qt is complaining... You can confirm this by setting the environment variables DYLD_PRINT_LIBRARIES or DYLD_PRINT_LIBRARIES_POST_LAUNCH to a non-empty string and then starting your application from the command line (i.e. /path-to/application.app/Contents/MacOS/executable, where you have to replace the parts in ). Then watch for the library names that get loaded. Nothing should come from your Qt installation. If this is the source for the error, try including an empty qt.conf file in your bundle (or as a resource) as described here: http://doc.trolltech.com/4.6/qt-conf.html HTH Michael On 25. Feb, 2010, at 9:11 , Martin Guillon wrote: A little feedback on what s happening. After using the fixbundle script, my app works great on a machine without QT installed. I loads the frameworks I put in the bundle perfectly. But now I have a problem in my dev environment. After fixing the bundle, if I start my app, I get qt errors saying it finds multiple versions of qt, and then some of my executables wont start. That s not that bad in my dev environment but what if the user already have a qt somewhere? Is there a way to make so
Re: [CMake] Qt assistant in OsX application bundle
Yeah it s very frustrating :D Where did you find the info about exactly where qt looks for libsqlite.dylib? I tried to find that info myself but couldn't Tried not using symlink but copies, same problem. I feel stuck! :s -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Wednesday, March 03, 2010 3:20 PM To: Martin Guillon Cc: Michael Jackson; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional plugins and finds them in your Qt installation because they do not get copied into your application bundle automatically. Since the prefixes do not match, Qt is complaining... You can confirm this by setting the environment variables DYLD_PRINT_LIBRARIES or DYLD_PRINT_LIBRARIES_POST_LAUNCH to a non-empty string and then starting your application from the command line (i.e. /path-to/application.app/Contents/MacOS/executable, where you have to replace the parts in ). Then watch for the library names that get loaded. Nothing should come from your Qt installation. If this is the source for the error, try including an empty qt.conf file in your bundle (or as a resource) as described here: http://doc.trolltech.com/4.6/qt-conf.html HTH Michael On 25. Feb, 2010, at 9:11 , Martin Guillon wrote: A little feedback on what s happening. After using the
Re: [CMake] Qt assistant in OsX application bundle
This works for me: Foo.app/ -Contents/ --plugins/ ---sqldrivers --Resources/ ---qt.conf --MacOS/ ---Foo ---Assistant.app/ Contents/ -plugins/ symlink to ../../../plugins Resources -qt.conf You can change the location of plugins to your liking if you specify it in qt.conf. That also means you can do without symlinking plugins and tell the assistant's qt.conf to go up 3 more directories. Clint On 03/03/2010 07:20 AM, Michael Wild wrote: Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional plugins and finds them in your Qt installation because they do not get copied into your application bundle automatically. Since the prefixes do not match, Qt is complaining... You can confirm this by setting the environment variables DYLD_PRINT_LIBRARIES or DYLD_PRINT_LIBRARIES_POST_LAUNCH to a non-empty string and then starting your application from the command line (i.e. /path-to/application.app/Contents/MacOS/executable, where you have to replace the parts in). Then watch for the library names that get loaded. Nothing should come from your Qt installation. If this is the source for the error, try including an empty qt.conf file in your bundle (or as a resource) as described here: http://doc.trolltech.com/4.6/qt-conf.html HTH Michael On 25. Feb, 2010, at 9:11 , Martin Guillon wrote: A little feedback on what s happening. After using the fixbundle script, my app works great on a machine without QT installed. I loads
Re: [CMake] Qt assistant in OsX application bundle
On 3. Mar, 2010, at 15:50 , Clinton Stimpson wrote: This works for me: Foo.app/ -Contents/ --plugins/ ---sqldrivers --Resources/ ---qt.conf --MacOS/ ---Foo ---Assistant.app/ Contents/ -plugins/ symlink to ../../../plugins Resources -qt.conf You can change the location of plugins to your liking if you specify it in qt.conf. That also means you can do without symlinking plugins and tell the assistant's qt.conf to go up 3 more directories. Ahh, yes. That would be the error. You use Plugins, but it should be plugins. Alternatively, use the following qt.conf (http://doc.trolltech.com/4.6/qt-conf.html): [Paths] Plugins = Plugins In the page it is also mentioned that Qt requires plugins to be located in their specific sub-directories, for the details refer to http://doc.trolltech.com/4.6/plugins-howto.html. HTH Michael Clint On 03/03/2010 07:20 AM, Michael Wild wrote: Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional plugins and finds them in your Qt installation because they do not get copied into your application bundle automatically. Since the prefixes do not match, Qt is complaining... You can confirm this by setting the environment variables DYLD_PRINT_LIBRARIES or DYLD_PRINT_LIBRARIES_POST_LAUNCH to a non-empty string and then starting your application from the command
Re: [CMake] Qt assistant in OsX application bundle
Already tried with that qt.conf and I still get the error :s And yes I have to be careful as it is case sensitive MArtin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Wednesday, March 03, 2010 4:10 PM To: Clinton Stimpson Cc: Martin Guillon; Michael Jackson; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle On 3. Mar, 2010, at 15:50 , Clinton Stimpson wrote: This works for me: Foo.app/ -Contents/ --plugins/ ---sqldrivers --Resources/ ---qt.conf --MacOS/ ---Foo ---Assistant.app/ Contents/ -plugins/ symlink to ../../../plugins Resources -qt.conf You can change the location of plugins to your liking if you specify it in qt.conf. That also means you can do without symlinking plugins and tell the assistant's qt.conf to go up 3 more directories. Ahh, yes. That would be the error. You use Plugins, but it should be plugins. Alternatively, use the following qt.conf (http://doc.trolltech.com/4.6/qt-conf.html): [Paths] Plugins = Plugins In the page it is also mentioned that Qt requires plugins to be located in their specific sub-directories, for the details refer to http://doc.trolltech.com/4.6/plugins-howto.html. HTH Michael Clint On 03/03/2010 07:20 AM, Michael Wild wrote: Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double level of bundle app. Then I thought that should just put the Assistant executable in the MacOS folder of my bundle. Then the fixing worked but launching the Assistant wouldn't work. It would just crash with a bus error during start. So did anyone successfully integrated the qt assistant in its app bundle? Thanks a lot Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Thursday, February 25, 2010 9:36 AM To: Martin Guillon Cc: Werner Smekal; cmake@cmake.org Subject: Re: [CMake] OsX bundle including Qt framework I think this is because Qt by default loads some optional
Re: [CMake] Qt assistant in OsX application bundle
On Wednesday 03 March 2010 08:07:17 am Martin Guillon wrote: I tried exactly your layout and I still get the error. So a few questions: - can you show me the qt.conf of your Assistant.app Its empty. - where did you get the Assistant.app? I build qt myself so that I can choose to install qt (carbon) in a directory of my choice. So the assistant comes from there. - Which version of Qt? I got assistant.app from a Qt 4.5.2 (carbon) installation. - how did you change the path where the executable looks for frameworks? (I used cmake which internally changes absolute paths written during Assistant build to @executable_path/../Frameworks/... ) I use BundleUtilities.cmake on Foo.app which goes in an fixes assistant.app as well. But before that, I also add a symlink Frameworks - ../../../Frameworks for the assistant, and a libQtCLucene.4.dylib - ../../../libQtCLucene.4.dylib As far as I know, those symlinks are only necessary because of how BundleUtilities does it. Clint Sorry for asking so many question, but that s the only way I can find why it works for you :s Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Clinton Stimpson Sent: Wednesday, March 03, 2010 3:51 PM To: Michael Wild Cc: Michael Jackson; cmake@cmake.org; Martin Guillon Subject: Re: [CMake] Qt assistant in OsX application bundle This works for me: Foo.app/ -Contents/ --plugins/ ---sqldrivers --Resources/ ---qt.conf --MacOS/ ---Foo ---Assistant.app/ Contents/ -plugins/ symlink to ../../../plugins Resources -qt.conf You can change the location of plugins to your liking if you specify it in qt.conf. That also means you can do without symlinking plugins and tell the assistant's qt.conf to go up 3 more directories. Clint On 03/03/2010 07:20 AM, Michael Wild wrote: Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1, 2010, at 7:52 AM, Martin Guillon wrote: Hi, After successfully creating my application bundle with qt frameworks(thanks to all of you) I am now trying to integrate the qt assistant in my application bundle. I first tried to put the whole Assistant.app in a folder of my app bundle. But then fixing the bundle wouldn't work with the assistant because of the double
Re: [CMake] Qt assistant in OsX application bundle
Ok so we do exactly the same thing (except that I use qt 4.6.2 right now) Thanks for the info -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Clinton Stimpson Sent: Wednesday, March 03, 2010 4:20 PM To: Martin Guillon Cc: Michael Jackson; cmake@cmake.org; Michael Wild Subject: Re: [CMake] Qt assistant in OsX application bundle On Wednesday 03 March 2010 08:07:17 am Martin Guillon wrote: I tried exactly your layout and I still get the error. So a few questions: - can you show me the qt.conf of your Assistant.app Its empty. - where did you get the Assistant.app? I build qt myself so that I can choose to install qt (carbon) in a directory of my choice. So the assistant comes from there. - Which version of Qt? I got assistant.app from a Qt 4.5.2 (carbon) installation. - how did you change the path where the executable looks for frameworks? (I used cmake which internally changes absolute paths written during Assistant build to @executable_path/../Frameworks/... ) I use BundleUtilities.cmake on Foo.app which goes in an fixes assistant.app as well. But before that, I also add a symlink Frameworks - ../../../Frameworks for the assistant, and a libQtCLucene.4.dylib - ../../../libQtCLucene.4.dylib As far as I know, those symlinks are only necessary because of how BundleUtilities does it. Clint Sorry for asking so many question, but that s the only way I can find why it works for you :s Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Clinton Stimpson Sent: Wednesday, March 03, 2010 3:51 PM To: Michael Wild Cc: Michael Jackson; cmake@cmake.org; Martin Guillon Subject: Re: [CMake] Qt assistant in OsX application bundle This works for me: Foo.app/ -Contents/ --plugins/ ---sqldrivers --Resources/ ---qt.conf --MacOS/ ---Foo ---Assistant.app/ Contents/ -plugins/ symlink to ../../../plugins Resources -qt.conf You can change the location of plugins to your liking if you specify it in qt.conf. That also means you can do without symlinking plugins and tell the assistant's qt.conf to go up 3 more directories. Clint On 03/03/2010 07:20 AM, Michael Wild wrote: Hmm, that's strange... Looks like you're doing the things the right way... Have you tried making the Doc/Assistant.app/Contents/Plugins not a symlink, but a copy of Bundle.app/Contents/Plugins instead? Just for debugging... Moving the libqsqlite.dylib library into MacOS can't help because Qt is always searching for $PLUGINS_DIR/sqldrivers/libsqlite.dylib, where $PLUGINS_DIR is the directory where Qt looks for plugins. I understand your frustration, deploying stuff on Mac OS X is a PITA. Michael On 3. Mar, 2010, at 14:47 , Martin Guillon wrote: In fact it was not solved It works great on my dev machine. But as soon as I copy my app on a machine without qt framework I get an error Cannot Load SQLite database driver! So let me first show you my layout Bundl.app --MacOS --Resources --Framework -QtCore... -QGui... -QtXml... -QtHelp... -QtSql... --Plugins imageformats . sqldrivers --libsqlite.dylib --Doc Assistant.app --Frameworks (link to ../../Frameworks) --Plugins (link to ../../Plugins) -- Exactly the same layout as the assistant from qt/bin Now I now Assistant find the frameworks as I get another error related to that if I change anything related to the frameworks. Now I have spent 3 days of the Cannot Load SQLite database driver! error and I cant find the solution. I tried copying libsqlite.dylib in the MacOS folder, tried creating a empty/filled qt.conf in Bundle.app/Doc/Assistant.app/Resources. Nothing works! I really need help Thanks Martin -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Martin Guillon Sent: Monday, March 01, 2010 4:18 PM To: Michael Wild; Michael Jackson Cc: cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle Thanks a lot Michael, I found the solution in ParaView!!! Martin -Original Message- From: Michael Wild [mailto:them...@gmail.com] Sent: Monday, March 01, 2010 3:14 PM To: Michael Jackson Cc: Martin Guillon; cmake@cmake.org Subject: Re: [CMake] Qt assistant in OsX application bundle But only the stable release, the CVS version doesn't anymore. Michael On 1. Mar, 2010, at 15:05 , Michael Jackson wrote: I would take a look at the ParaView project as ParaView uses QtAssistant for help. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Mar 1,
[CMake] combining cmake and qmake
Hello, I have a library that contain the core of my application. I have been running this application in text-mode so far. I will now extend it to use a GUI, and I've chosen Qt. I have used cmake to generate Makefiles on linux/g++4.x and solutions files on win32/vs2008. Qt comes with qmake which takes .pro files as input and also generates Makefiles or vs2008 solution files. Is there a generally advised policy re combining systems with both cmake and qmake? Any suggestions are appreciated, regards, ___ 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] combining cmake and qmake
On Wed, Mar 03, 2010 at 11:01:14AM -0500, Hicham Mouline wrote: Qt comes with qmake which takes .pro files as input and also generates Makefiles or vs2008 solution files. Is there a generally advised policy re combining systems with both cmake and qmake? Take a look at CMake's FindQt4 module. You don't need qmake (and I would recommend avoiding it since you're already using CMake for cross-platform building). tyler ___ 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] combining cmake and qmake
On 3 March 2010 16:01, Hicham Mouline hic...@mouline.org wrote: Hello, I have a library that contain the core of my application. I have been running this application in text-mode so far. I will now extend it to use a GUI, and I've chosen Qt. I have used cmake to generate Makefiles on linux/g++4.x and solutions files on win32/vs2008. Qt comes with qmake which takes .pro files as input and also generates Makefiles or vs2008 solution files. Is there a generally advised policy re combining systems with both cmake and qmake? Any suggestions are appreciated, You don't need to (and if you're using cmake - shouldn't) use qmake at all. It's very simple to reimplement all the qmake rules using CMake and the FindQt4.cmake package. See http://www.bineteri.com/qtwithcmake and http://qtnode.net/wiki/Qt_with_cmake -- Matt Williams http://milliams.com ___ 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] xcodeproj internal reference lottery
On Wed, Mar 3, 2010 at 8:15 AM, Eric Noulard eric.noul...@gmail.com wrote: 2010/3/3 David Cole david.c...@kitware.com: The CMake generator for Xcode simply uses object pointers as the seed for those hex ids: that's why they change every time you run cmake. It's also what makes it easy to guarantee that those ids are unique without having a data structure to track it. Re-using the same ids would be possible, but it would add complexity to the xcode generator, and the ids would have to be cached and tracked somehow. It's a fairly tall order... If you have the time to propose how to do it, perhaps submitting a feature request and a patch to the bug tracker, I would be happy to review it. Don't know in which case Hex id are used (and I'm not an Mac OS user) but may be it would be possible to derive those id as a simple hash function (like http://sites.google.com/site/murmurhash/) of something which somehow unique but invariant like the filename + path + project name + etc... Since this kind of function should be fast, may be you do not even have to cache the hexid. Theoretically there may be some collision but occurence probability should be very low. My 2 cents idea. All good ideas... I do not have time or funding to work on these ideas in any sort of near term time frame... Patches are welcome. David ___ 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] xcodeproj internal reference lottery
david, thanks for your prompt response. you presented an implementation issue as a reason for this behavior - i can understand. however, do you appreciate the issue of user data getting over written each time? in my opinion this represents a serious limitation of cmake on the mac when trying to use it for a large, collaborative project where continuous and frequent updates are required. you ask me for an alternative: the mac file system is pretty good at keeping track of files independent of file names/paths. couldn't unique file handles/hash ids be obtained from just there? these can be used instead and presumably provide some stability compared to dynamic pointers in memory (the latter change all the time). regards On Wednesday, March 03, 2010, at 12:44PM, David Cole david.c...@kitware.com wrote: ___ 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] combining cmake and qmake
On 03/03/2010 10:06 AM, Matt Williams wrote: On 3 March 2010 16:01, Hicham Moulinehic...@mouline.org wrote: Hello, I have a library that contain the core of my application. I have been running this application in text-mode so far. I will now extend it to use a GUI, and I've chosen Qt. I have used cmake to generate Makefiles on linux/g++4.x and solutions files on win32/vs2008. Qt comes with qmake which takes .pro files as input and also generates Makefiles or vs2008 solution files. Is there a generally advised policy re combining systems with both cmake and qmake? Any suggestions are appreciated, You don't need to (and if you're using cmake - shouldn't) use qmake at all. It's very simple to reimplement all the qmake rules using CMake and the FindQt4.cmake package. See http://www.bineteri.com/qtwithcmake and http://qtnode.net/wiki/Qt_with_cmake The simplest Qt cmake file I've come up with, based on converting from a Qmake build, is the following - it should be easy to follow and modify. # Minimal QT Build # CMake cross-platform build system recipe # 2010 Ryan Pavlik rpav...@iastate.edu abir...@ryand.net # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) # Set package properties project(qtExample) ### # Perform build configuration of dependencies # Set up QT4 and required components find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) include(${QT_USE_FILE}) ### # All the project files set(SOURCES main.cpp mywindow.cpp progressbar.cpp trainingdisplay.cpp TheApp.cpp) set(HEADERS datastorage.h train.h) set(MOCS mywindow.h progressbar.h TheApp.h) set(UIS ui/TheApp.ui) set(RESOURCES theappresources.qrc) ### # Build and link the project # Let QT pre-process the files and add the generated files to the source list qt4_wrap_ui(GENERATED_SOURCES ${UIS}) qt4_add_resources(GENERATED_SOURCES ${RESOURCES}) qt4_wrap_cpp(GENERATED_SOURCES ${MOCS}) source_group(Generated Sources - Do Not Edit FILES ${GENERATED_SOURCES}) # Make sure the compiler can find the pre-processed files from qt4_wrap_ui include_directories(${CMAKE_BINARY_DIR}) # Build the app! add_executable(qt-example MACOSX_BUNDLE WIN32 # source files that are actually built direclty ${SOURCES} ${GENERATED_SOURCES} # items included so they show up in your IDE ${HEADERS} ${UIS} ${MOCS} ${RESOURCES}) # Link the app! target_link_libraries(qt-example ${QT_LIBRARIES}) -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik ___ 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] xcodeproj internal reference lottery
ha...@mac.com wrote: david, thanks for your prompt response. you presented an implementation issue as a reason for this behavior - i can understand. however, do you appreciate the issue of user data getting over written each time? in my opinion this represents a serious limitation of cmake on the mac when trying to use it for a large, collaborative project where continuous and frequent updates are required. you ask me for an alternative: the mac file system is pretty good at keeping track of files independent of file names/paths. couldn't unique file handles/hash ids be obtained from just there? these can be used instead and presumably provide some stability compared to dynamic pointers in memory (the latter change all the time). regards Those id's are all over the place in projects. But, sounds like the only ones that need to persist are the ones that represent files. I suppose you could load in the existing project if there is one, and populate a map of object id's for the files. You would have to write a parser for the crazy Xcode file format. That would be the cleanest way to do it, as the information is already on the disk. As Dave mentioned, we don't have any funding for this right now, but you can clone CMake, and give it a try. I can provide assistance if you want to attempt this. Thanks. -Bill ___ 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] xcodeproj internal reference lottery
Those id's are all over the place in projects. But, sounds like the only ones that need to persist are the ones that represent files. I suppose you could load in the existing project if there is one, and populate a map of object id's for the files. You would have to write a parser for the crazy Xcode file format. That would be the cleanest way to do it, as the information is already on the disk. As Dave mentioned, we don't have any funding for this right now, but you can clone CMake, and give it a try. I can provide assistance if you want to attempt this. Thanks. -Bill isn't it easier to just query hash values from the file system( for files that exist on disk) as the xcodeproj is generated? for nonexistent files (build products) one has to find unique new ids - using the current method. that would save us the xcodeproj parsing bit. what expert time/funding are we talking? ___ 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] xcodeproj internal reference lottery
ha...@mac.com wrote: Those id's are all over the place in projects. But, sounds like the only ones that need to persist are the ones that represent files. I suppose you could load in the existing project if there is one, and populate a map of object id's for the files. You would have to write a parser for the crazy Xcode file format. That would be the cleanest way to do it, as the information is already on the disk. As Dave mentioned, we don't have any funding for this right now, but you can clone CMake, and give it a try. I can provide assistance if you want to attempt this. Thanks. -Bill isn't it easier to just query hash values from the file system( for files that exist on disk) as the xcodeproj is generated? for nonexistent files (build products) one has to find unique new ids - using the current method. that would save us the xcodeproj parsing bit. what expert time/funding are we talking? That might work as well. You would have to come up with a hash that was exactly this long: 218CE70218CE70218CE7, and was always unique to the file. But, if you did that it would work as well. I am not sure what you are asking with the time/funding question? -Bill ___ 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] Weird behaviour of mark_as_advanced(), find_program() and the cache
On Wednesday 03 March 2010, Brad King wrote: Alexander Neundorf wrote: This sees the variable is already in the cache, but without meta info and adds it using AddCacheDefinition(). After this call, makefile-GetDefinition(FOO) returns an empty string, before this call it still returns foo. It's not the empty string in find_program()'s call to AddCacheDefinition that raises this problem. It's the bottom of cmMakefile's implementation of the method: // if there was a definition then remove it this-Internal-VarStack.top().Set(name, 0); I didn't figure out the correct way how to improve this. This is related to the open issue http://www.cmake.org/Bug/view.php?id=9008 discussed previously. Yes. I think it should end up in the cache as foo with the type FILEPATH, but I didn't figure out how to achieve this. Issue #9008 basically means you should never mix cache and non-cache variables with the same name. There are all kinds of historical reasons behind their interaction and changing anything will lead to subtle breakage for someone. (The original attempt at CMP0015 for issue 9008 is evidence of this.) Yes, I remember. Still this issue here is really weird, the variable suddenly becomes empty, although the normal variable was set before to a value and the find_program() should have put something (either foo or its result) into the cache. But afterwards, the normal variable is gone and the cache is empty. Should I add this testcase to #9008 ? Alex ___ 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] Supressing Make, but not Generators
On Wednesday 03 March 2010, Michael Wild wrote: On 3. Mar, 2010, at 9:27 , Smith Jack (Ext. - UGIS - UniCredit Group) wrote: -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Hendrik Sattler Sent: Wednesday, March 03, 2010 9:21 AM To: cmake@cmake.org Subject: Re: [CMake] Supressing Make, but not Generators Zitat von Smith Jack (Ext. - UGIS - UniCredit Group) jack.smith.ext...@unicreditgroup.de: It's worryingly quiet on this subject. So, just exclude the target that won't build from ALL. I'm afraid you've lost me there. Do I do this within a CMakeLists.txt file ? My current CMakeLists.txt relies upon ADD_SUBDIRECTORY(project_name) in order to generate the build targets. How do I conditionally exclude project_name from ALL in this case ? Thanks, Jack CMakeLists.txt: ### project(super) if(UNIX) set(BUILD_FOO) else() # FOO only builds on UNIX set(BUILD_FOO EXCLUDE_FROM_ALL) endif() add_subdirectory(foo) foo/CMakeLists.txt: ### project(foo) add_executable(foo ${BUILD_FOO} src1.cpp src2.cpp) You can also test CMAKE_GENERATOR and CMAKE_EXTRA_GENERATOR (contains the IDE for the makefile-based project generators like Eclipse) for the current generator. Alex ___ 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] Weird behaviour of mark_as_advanced(), find_program() and the cache
Alexander Neundorf wrote: On Wednesday 03 March 2010, Brad King wrote: http://www.cmake.org/Bug/view.php?id=9008 Should I add this testcase to #9008 ? Yes, please. -Brad ___ 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 RPM: how to specify the compression type ?
On Tuesday 02 March 2010, Eric Noulard wrote: 2010/3/1 Alexander Neundorf a.neundorf-w...@gmx.net: Hi, I'm not sure this is actually possible, but I'd like to build a rpm on a SUSE 11.1 machine, which can also be installed on a SUSE 10.1 machine. Beside the compression type problem it's not guaranted that dependencies found in 11.1 will be backward compatible with the one found in 10.1. (libc or any other dynamic lib dependencies) but I guess you already know that. You should be building something static or self-contained right? The problem is that the rpm generated on the 11.1 machine is lzma-compressed, but this is not supported on the 10.1 machine. So, is it possible to tell rpmbuild which compression type to use ? I don't know if it's possible at all :-( I would expect this to be either an extra rpmbuild option or a specific spec file directive. Would you try to launch (on OpenSuSE 11.1) rpmbuild --showrc and see whether if there is some lzma related default parameters in there. I'll have a look tonight on my OpenSuSE virtual machine tonight too. If so, is this already supported by the rpm generator (doesn't seem so) ? RPM generator does not support custom rpmbuild parameter but it support custom spec file so depending on the solution (if it exists) it may already be possible or not :-) Ok, found it, thanks to the friendly guys from SUSE :-) For bzip2: %define _binary_payload w9.bzdio for gzip: %define _binary_payload w9.gzdio for lzma: %define _binary_payload w9.lzdio I've set this using the CPACK_RPM_SPEC_MORE_DEFINE variable. Maybe this could be supported via something like a CPACK_RPM_COMPRESSION_TYPE variable ? Alex ___ 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] Watcom Support
OKay these should work great, but have to be done on a per-target basis, rather than being built into the generator. How would the ...\share\cmake-2.8\Modules\Platform\Windows-wcl386.cmake get modified to set link_flags? On Mon, Mar 1, 2010 at 9:28 PM, Tyler Roscoe ty...@cryptio.net wrote: Don't know about the watcom stuff but as for this: On Mon, Mar 01, 2010 at 07:03:14PM -0800, J Decker wrote: Is there really only a set of CMAKE_C_FLAGS_ and _CXX_FLAGS_? no companion _LD_FLAGS_ ? Properties rather than global variables but is this what you mean? http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LINK_FLAGS tyler ___ 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] Order of installation items
It looks as though installation of items is different than I thought it should be. CMakeLists.txt install(CODE message(\start\)) add_subdirectory(sub1) install(CODE message( \end\)) sub1\CMakeLists.txt: install(CODE message(\--sub1\)) In this example the following output is generated during install: start end --sub1 I would have expected: start --sub1 end I'm surprised that it is running all the install commands for the top level cmake before doing the commands in the sub directory. I would have expected the install commands to be run in script order. James ___ 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] Qt - Private implementation slot and required cmake special rules
I try to use Qt's internal Stuff for my own purpose. I want to compile the moc file separately which is with cmake very simple. Anyway, I have to tweak moc for this. I have to add the private type to the moc file generated otherwise I get an compiler error about incomplete type (the public header forwards only the private), in this case simple by e.g. /usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. slotTest.h -fslotTest_p.h -o moc_slotTest.cpp Note the -fslotTest_p.h Now I've the private header included, but how to say this for cmake for the general case?? QT4_WRAP_CPP allows addition options, but how to get the private header? Thanks, Olaf ___ 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 absolute values in include_directories directive
Hello all. Im trying to set an include directory which is actually an environment variable inside VC++ , $(QTDIR), and thus I tried the following: ... include_directories( $(QTDIR)/include ) ... It comes up that in the resulting SLN file, it translates that directive to C:/basedir/$(QTDIR)/include, where basedir is the root directory for the project. However, that wouldn't work since $(QTDIR) is something like C:\Qt. Is there a way to make CMake to not put C:/basedir/ before $(QTDIR) ? Thanks in advance Felipe ___ 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] Qt - Private implementation slot and required cmake special rules
On Wed, Mar 3, 2010 at 1:37 PM, Olaf Peter ope-de...@gmx.de wrote: I try to use Qt's internal Stuff for my own purpose. I want to compile the moc file separately which is with cmake very simple. Anyway, I have to tweak moc for this. I have to add the private type to the moc file generated otherwise I get an compiler error about incomplete type (the public header forwards only the private), in this case simple by e.g. /usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. slotTest.h -fslotTest_p.h -o moc_slotTest.cpp Note the -fslotTest_p.h Now I've the private header included, but how to say this for cmake for the general case?? QT4_WRAP_CPP allows addition options, but how to get the private header? Use QT4_AUTOMOC in these cases. SET( wwWidgets_SRCS ./widgets/qwwnumpad/qwwnumpad.cpp ./widgets/wwglobal_p.cpp ./widgets/qwwbuttonlineedit.cpp ./widgets/qwwfilechooser/qwwfilechooser.cpp ) SET( wwWidgets_EXT_HDRS ./widgets/qwwnumpad/qwwnumpad.h ./widgets/wwglobal.h ./widgets/wwglobal_p.h ./widgets/qwwbuttonlineedit.h ./widgets/qwwbuttonlineedit_p.h ./widgets/qwwfilechooser/qwwfilechooser.h ) # some .ui files SET( wwWidgets_UIS ) # and finally an resource file SET( wwWidgets_RCS ) SET( wwWidgets_INT_HDRS ) QT4_AUTOMOC(${wwWidgets_SRCS} ${wwWidgets_EXT_HDRS}) include_directories( ${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}/.. ${wwWidgets_TREE_INCLUDE} ) add_library(wwWidgets ${wwWidgets_SRCS} ${wwWidgets_EXT_HDRS} ${wwWidgets_INT_HDRS} ) John ___ 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 absolute values in include_directories directive
On Wed, Mar 3, 2010 at 1:44 PM, Felipe Sodre dos Santos felipe.so...@totvs.com.br wrote: Hello all. Im trying to set an include directory which is actually an environment variable inside VC++ , $(QTDIR), and thus I tried the following: … include_directories( $(QTDIR)/include ) … It comes up that in the resulting SLN file, it translates that directive to C:/basedir/$(QTDIR)/include, where basedir is the root directory for the project. However, that wouldn’t work since $(QTDIR) is something like “C:\Qt”. If you need this only for Qt. Why don't you use the proper Qt support in CMake? FIND_PACKAGE(Qt4 REQUIRED) INCLUDE(${QT_USE_FILE}) # Use the include path and library for Qt that is used by VTK. INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ) John ___ 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 absolute values in include_directories directive
You can do this at configure-time, by doing include_directories($ENV{WHATEVERDIR}) although that's generally discouraged - use a find module instead to set SOMEPACKAGE_INCLUDE_DIRS that you can use like: include_directories(${SOMEPACKAGE_INCLUDE_DIRS}) For the case of QT, see my recent email to the list showing a clean CMake file for building a QT app. Ryan On 03/03/2010 12:44 PM, Felipe Sodre dos Santos wrote: Hello all. Im trying to set an include directory which is actually an environment variable inside VC++ , $(QTDIR), and thus I tried the following: ... include_directories( $(QTDIR)/include ) ... It comes up that in the resulting SLN file, it translates that directive to C:/basedir/$(QTDIR)/include, where basedir is the root directory for the project. However, that wouldn't work since $(QTDIR) is something like C:\Qt. Is there a way to make CMake to not put C:/basedir/ before $(QTDIR) ? Thanks in advance Felipe ___ 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 -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik ___ 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] Qt - Private implementation slot and required cmake special rules
John Drescher schrieb: On Wed, Mar 3, 2010 at 1:37 PM, Olaf Peter ope-de...@gmx.de wrote: I try to use Qt's internal Stuff for my own purpose. I want to compile the moc file separately which is with cmake very simple. Anyway, I have to tweak moc for this. I have to add the private type to the moc file generated otherwise I get an compiler error about incomplete type (the public header forwards only the private), in this case simple by e.g. /usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. slotTest.h -fslotTest_p.h -o moc_slotTest.cpp Note the -fslotTest_p.h Now I've the private header included, but how to say this for cmake for the general case?? QT4_WRAP_CPP allows addition options, but how to get the private header? Use QT4_AUTOMOC in these cases. Well, QT4_AUTOMOC requires #include foo.moc which I don't want. Thanks, Olaf ___ 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 absolute values in include_directories directive
Hi John, thanks for answering. I'm actually porting a project from VC++ to be built using CMake tools, and thus I'm first translating the VCPROJ files into CMakeLists.txt files. I'll try what you said, but I still would like to know if there's a way to do what I was trying to do. Thanks ! -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: quarta-feira, 3 de março de 2010 16:14 To: Felipe Sodre dos Santos Cc: cmake@cmake.org Subject: Re: [CMake] Using absolute values in include_directories directive On Wed, Mar 3, 2010 at 1:44 PM, Felipe Sodre dos Santos felipe.so...@totvs.com.br wrote: Hello all. Im trying to set an include directory which is actually an environment variable inside VC++ , $(QTDIR), and thus I tried the following: . include_directories( $(QTDIR)/include ) . It comes up that in the resulting SLN file, it translates that directive to C:/basedir/$(QTDIR)/include, where basedir is the root directory for the project. However, that wouldn't work since $(QTDIR) is something like C:\Qt. If you need this only for Qt. Why don't you use the proper Qt support in CMake? FIND_PACKAGE(Qt4 REQUIRED) INCLUDE(${QT_USE_FILE}) # Use the include path and library for Qt that is used by VTK. INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ) John ___ 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 RPM: how to specify the compression type ?
2010/3/3 Alexander Neundorf a.neundorf-w...@gmx.net: RPM generator does not support custom rpmbuild parameter but it support custom spec file so depending on the solution (if it exists) it may already be possible or not :-) Ok, found it, thanks to the friendly guys from SUSE :-) For bzip2: %define _binary_payload w9.bzdio for gzip: %define _binary_payload w9.gzdio for lzma: %define _binary_payload w9.lzdio I've set this using the CPACK_RPM_SPEC_MORE_DEFINE variable. That's definitely the appropriate spaceholder. Maybe this could be supported via something like a CPACK_RPM_COMPRESSION_TYPE variable ? Yes I'll add it to my TODO list. May be I'll have to check whether if it's supported by other RPM based distros (Mandriva, RedHat, CentOS, Fedora etc...) in order to make it robust, i.e. ignoring i tif not supported. Would you be kind enough to file a feature request and assign it to me? I'll try to bundle this during my next CPackRPM working session. -- 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
[CMake] CMake interview for FLOSS Weekly in about 1 hour
At 4:30, I am going to be interviewed for FLOSS Weekly. The chat is here: http://irc.twit.tv/ The video is here: http://live.twit.tv/ Should be going on some time around 4:30 EST. -Bill ___ 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] CMake interview for FLOSS Weekly in about 1 hour
2010/3/3 Bill Hoffman bill.hoff...@kitware.com: At 4:30, I am going to be interviewed for FLOSS Weekly. wow! ___ 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] CMake interview for FLOSS Weekly in about 1 hour
On Wednesday 03 March 2010, Bill Hoffman wrote: At 4:30, I am going to be interviewed for FLOSS Weekly. The chat is here: http://irc.twit.tv/ The video is here: http://live.twit.tv/ Should be going on some time around 4:30 EST. We just saw it, cool :-) And thanks :-) Alex ___ 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] CMake interview for FLOSS Weekly in about 1 hour
Unfortunate acronym! I hope it wasn't like pulling teeth! Andrew On Thu, Mar 4, 2010 at 7:39 AM, Bill Hoffman bill.hoff...@kitware.com wrote: At 4:30, I am going to be interviewed for FLOSS Weekly. The chat is here: http://irc.twit.tv/ The video is here: http://live.twit.tv/ Should be going on some time around 4:30 EST. -Bill ___ 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 -- ___ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.acfr.usyd.edu.au/ ___ ___ 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] CMake interview for FLOSS Weekly in about 1 hour
On Wed, Mar 3, 2010 at 5:15 PM, Andrew Maclean andrew.amacl...@gmail.comwrote: Unfortunate acronym! I hope it wasn't like pulling teeth! On Thu, Mar 4, 2010 at 7:39 AM, Bill Hoffman bill.hoff...@kitware.com wrote: At 4:30, I am going to be interviewed for FLOSS Weekly. The video is here: http://live.twit.tv/ Should be going on some time around 4:30 EST. A few of us at Kitware HQ watched it on the big screen. Marcus ___ 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] Canonical use of FindPackageHandleStandardArgs
Hi, I'm writing some FindXXX.cmake macros [1] and I'd like to master some best practices I use and I'm having troubles with picturing what should canonical use of FindPackageHandleStandardArgs look like. I'm aware I've used it incorrectly in many places. I'm looking for confirmation if it should be something along these 1) Set lookup mode to quiet if user explicitly asked to find MYLIB quietly or if it's already found: if(MYLIB_FIND_QUIETLY OR MYLIB_FOUND) set(FIND_MYLIB_QUIET_ARG QUIET) endif() 2) Call find passing selected lookup mode find_package(MYLIB ${FIND_MYLIB_QUIET_ARG}) 3) Perform other checks, but do not call message() if MYLIB_FIND_QUIETLY is requested, otherwise lookup will not be really quiet 4) Check and report results find_package_handle_standard_args(MYLIB DEFAULT_MSG MYLIB_LIBRARY MY_INCLUDE_DIR) Have I missed anything? [1] http://github.com/mloskot/workshop/blob/master/cmake/modules/ Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.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] Canonical use of FindPackageHandleStandardArgs
I took a quick look at your MySQL script and can offer these suggestions: - The idiom that follows is outdated and unnecessary (no if-else needed because find_whatever won't run if the variable it's given already has a valid value, and find_package_handle... takes care of the silent bit.): if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY) # Already in cache, be silent set(MYSQL_FIND_QUIETLY TRUE) else() as is this (as above, the find_package_handle_standard_args takes care of it): if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY_DIR) set(MYSQL_FOUND TRUE) - You probably don't want the find_library calls for the optional libs inside any sort of conditional - it's not necessary. - Don't call include_directories or link_directories from your find script - let the user do that since you don't know what else they're using and you can't know if order for those is important - it might be. - Search for dependent libraries like zlib (is there a stock find script?), yassl, taocrypt before the find_package_handle... call, and if they're needed, pass their variable name into that call. - Be sure to set the plural versions of the variables (INCLUDE_DIRS, LIBRARIES) to include the dependencies (these should not be cached), and leave the singular version for just a single path/file (these should be cached, as by default - Mark all variables as advanced except for a single variable that specifies a root to search, traditionally called something like MYSQL_ROOT_DIR. If MYSQL_FOUND is true after the find_package_handle... call, then mark MYSQL_ROOT_DIR as advanced as well. A good rule of thumb is to look at the simple view in ccmake or cmake-gui: if there's anything showing that doesn't require user attention (project build-time options, root_dir variables for missing dependencies), it should be advanced. In your emailed example: I presume the mylib in step 2 is different than the mylib in step 1 and 3/4, because otherwise you have an infinitely-recursive find script. Please clarify, preferably with an actual example. If the lib in step 2 is a dependency, convention varies, but it seems prudent to me to always find dependencies quietly: this prevents them from showing up in lists from FeatureSummary, etc. Anything you require in that dependency package should be passed to your find_package_handle_standard_args call which will make the appropriate noises if it shouldn't be quiet and it can't be found. If you're not doing find scripts that depend on other find scripts, then look in the archives from a month or so ago: I posted some sample find scripts that are modern and clean in style. You can also take a peek at everything except FindDirectShow.cmake (I didn't write that one or rewrite it beyond running my cleanup app on it, and it's sorely in need of work) here: http://github.com/rpavlik/vrpn/tree/master/vrpn/cmake/ Hope this helps! Ryan On 03/03/2010 05:06 PM, Mateusz Loskot wrote: Hi, I'm writing some FindXXX.cmake macros [1] and I'd like to master some best practices I use and I'm having troubles with picturing what should canonical use of FindPackageHandleStandardArgs look like. I'm aware I've used it incorrectly in many places. I'm looking for confirmation if it should be something along these 1) Set lookup mode to quiet if user explicitly asked to find MYLIB quietly or if it's already found: if(MYLIB_FIND_QUIETLY OR MYLIB_FOUND) set(FIND_MYLIB_QUIET_ARG QUIET) endif() 2) Call find passing selected lookup mode find_package(MYLIB ${FIND_MYLIB_QUIET_ARG}) 3) Perform other checks, but do not call message() if MYLIB_FIND_QUIETLY is requested, otherwise lookup will not be really quiet 4) Check and report results find_package_handle_standard_args(MYLIB DEFAULT_MSG MYLIB_LIBRARY MY_INCLUDE_DIR) Have I missed anything? [1] http://github.com/mloskot/workshop/blob/master/cmake/modules/ Best regards, -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik ___ 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] Canonical use of FindPackageHandleStandardArgs
snip If you're not doing find scripts that depend on other find scripts, then look in the archives from a month or so ago: I posted some sample find scripts that are modern and clean in style. You can also take a peek at everything except FindDirectShow.cmake (I didn't write that one or rewrite it beyond running my cleanup app on it, and it's sorely in need of work) here: http://github.com/rpavlik/vrpn/tree/master/vrpn/cmake/ The FindVRPN.cmake script is probably one of the best sophisticated examples in that list - handles dependencies, but does not have to do anything too exotic (figure out what kind of command line args are needed by trial-and-error, etc). It should be easy to read and learn from. Of course, now that I look at it, I see I'm not finding my dependencies quietly: I will probably change that... Ryan -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik ___ 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] Find_Library question
Hello all, I'm using Find_Library call at several places to locate libraries. The document says if Find_Library finds the library it stores the path in a cache variable, and Find_Library does not gets called again for the variable. Now If I run configure, Find_Library seems to be trying to find the library again. What I expect is, CMake first reads the CMakeCache.txt file, and then calls Find_Library. Now that variable is cached, Find_Library should not be trying to find the library again. I've a set of .cmake scripts and include them in master file using Include call. Most of the .cmake files contain Find_Library calls and nothing else. What I've observed is, CMake is taking longer to configure with these cmake scripts included. If I comment them out then configure is pretty fast. As these .cmake files contain Find_Library and nothing else, I feel Find_Library is trying to find library again and again. Am I missing something here ? I'm using Cmake-2.8.1 RC3 on Windows. Surya ___ 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