Re: [CMake] import/export and DLL's

2011-12-06 Thread Michael Wild
On 12/07/2011 01:49 AM, Totte Karlsson wrote: >> Well, then just use add_definitions(-DIMPORT_X_DLL). If >> -DEXPORT_X_DLL is present, it will override your export/import >> header definitions for the import case, and everything should be >> fine. > > Not sure what you mean by override. If both

Re: [CMake] "make install" files

2011-12-06 Thread H Xu
On 2011/12/6 20:43, Eric Noulard wrote: 2011/12/6 H Xu: Hello, In cmake, install command is used to indicate the files that need to be installed, and install(DIRECTORY ...) could be used to install directories. However, I can't find a way to install files in a directory EXCEPT a few files that

Re: [CMake] import/export and DLL's

2011-12-06 Thread Michael Jackson
___ Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio On Dec 6, 2011, at 7:59 PM, Totte Karlsson wrote: > On 12/6/2011 8:10 AM,

Re: [CMake] import/export and DLL's

2011-12-06 Thread Totte Karlsson
On 12/6/2011 8:10 AM, Michael Jackson wrote: Read this article. http://www.cmake.org/Wiki/BuildingWinDLL Yeah, I did start with that one. My main problem was (as M. Wild) pointed out, defining the build flags correctly. I ended up using add_definitions(-DEXPORT_MOLECULE_DLL) In the article, t

Re: [CMake] import/export and DLL's

2011-12-06 Thread Totte Karlsson
> Well, then just use add_definitions(-DIMPORT_X_DLL). If -DEXPORT_X_DLL > is present, it will override your export/import header definitions for > the import case, and everything should be fine. Not sure what you mean by override. If both symbols are defined, MTK_COMMON will be defined as __dec

Re: [CMake] New type of cache variable: lists

2011-12-06 Thread David Cole
On Tue, Dec 6, 2011 at 5:13 PM, Robert Dailey wrote: > Thanks for that info David. You're welcome. > > I have to say that the way this is setup feels kind of duct-taped together. It is kind of duct-taped together. (It was better than using WD-40...) > I expected the documentation for such a

[CMake] Question about add_custom_target

2011-12-06 Thread Robert Dailey
Does $ work in add_custom_target as it does in add_custom_command? The documentation doesn't state anything about this that I can see, but it seems like it should work. - Robert Dailey -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opens

Re: [CMake] New type of cache variable: lists

2011-12-06 Thread Robert Dailey
Thanks for that info David. I have to say that the way this is setup feels kind of duct-taped together. I expected the documentation for such a feature to be under 'set' in the docs, but it wasn't. Plus the option in the list that is the default must be specified in 2 different locations. I think

Re: [CMake] hear hear

2011-12-06 Thread Mateusz Łoskot
On 6 December 2011 17:19, Alexander Neundorf wrote: > On Tuesday 06 December 2011, Mateusz Łoskot wrote: >> On 6 December 2011 16:27, Daniel Dekkers wrote: >> > On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: >> >> I think if the CMake community took a vote we could probably come up >> >> wit

Re: [CMake] New type of cache variable: lists

2011-12-06 Thread David Cole
On Tue, Dec 6, 2011 at 4:26 PM, David Doria wrote: > On Tue, Dec 6, 2011 at 4:19 PM, Robert Dailey wrote: >> Has anyone thought of creating a "LIST" type for cache variables? In CMake >> GUI on Windows, this would be represented by a combo-box or drop-down box >> that allows the user to pick one

Re: [CMake] New type of cache variable: lists

2011-12-06 Thread David Doria
On Tue, Dec 6, 2011 at 4:19 PM, Robert Dailey wrote: > Has anyone thought of creating a "LIST" type for cache variables? In CMake > GUI on Windows, this would be represented by a combo-box or drop-down box > that allows the user to pick one item out of a list of available items. > > Is this possib

[CMake] New type of cache variable: lists

2011-12-06 Thread Robert Dailey
Has anyone thought of creating a "LIST" type for cache variables? In CMake GUI on Windows, this would be represented by a combo-box or drop-down box that allows the user to pick one item out of a list of available items. Is this possible? - Robert Dailey -- Powered by www.kitware.com Vi

Re: [CMake] Best practices/preferred methods for linking external libraries

2011-12-06 Thread David Cole
On Tue, Dec 6, 2011 at 12:08 PM, Matthew LeRoy wrote: > On 2011-12-03 14:54-0800 Alan W. Irwin wrote: >> >> On 2011-12-03 12:42-0800 Alan W. Irwin wrote: >> >> > On 2011-12-02 19:33- Matthew LeRoy wrote: >> >> Assuming we want to just put the install tree in version control >> >> somewhere, an

Re: [CMake] hear hear

2011-12-06 Thread Alexander Neundorf
On Tuesday 06 December 2011, Mateusz Łoskot wrote: > On 6 December 2011 16:27, Daniel Dekkers wrote: > > On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: > >> I think if the CMake community took a vote we could probably come up > >> with an "Exemplar" Find*.cmake file that is good for someone t

Re: [CMake] hear hear

2011-12-06 Thread Mateusz Łoskot
On 6 December 2011 16:27, Daniel Dekkers wrote: > On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: >> I think if the CMake community took a vote we could probably come up with an >> "Exemplar" >> Find*.cmake file that is good for someone trying to develop a new one. > > Yes please. > And I thi

Re: [CMake] Best practices/preferred methods for linking external libraries

2011-12-06 Thread Matthew LeRoy
On 2011-12-03 14:54-0800 Alan W. Irwin wrote: > > On 2011-12-03 12:42-0800 Alan W. Irwin wrote: > > > On 2011-12-02 19:33- Matthew LeRoy wrote: > >> Assuming we want to just put the install tree in version control > >> somewhere, and have ProjectB's list files reference the install tree > >>

[CMake] hear hear

2011-12-06 Thread Daniel Dekkers
On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: > I think if the CMake community took a vote we could probably come up with an > "Exemplar" Find*.cmake file that is good for someone trying to develop a new > one. Yes please. And I think in general that is true. Of course it is more interesti

Re: [CMake] import/export and DLL's

2011-12-06 Thread Michael Jackson
Read this article. http://www.cmake.org/Wiki/BuildingWinDLL If you have questions after that please post. That article should clear everything up. Thanks ___ Mike JacksonPrincipal Software Engineer BlueQuartz Software

Re: [CMake] Best practices/preferred methods for linking external libraries

2011-12-06 Thread Michael Jackson
On Dec 6, 2011, at 9:56 AM, Matthew LeRoy wrote: > On Dec 5, 2011, at 5:57 PM, Michael Jackson wrote: > >> On Dec 5, 2011, at 5:36 PM, Matthew LeRoy wrote: >> >>> On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: >>> On Dec 1, 2011, at 4:56 PM, Matthew LeRoy wrote: > We began

Re: [CMake] Best practices/preferred methods for linking external libraries

2011-12-06 Thread Matthew LeRoy
On Dec 5, 2011, at 5:57 PM, Michael Jackson wrote: > On Dec 5, 2011, at 5:36 PM, Matthew LeRoy wrote: > > > On Dec 4, 2011, at 11:59 AM, Michael Jackson wrote: > > > >> On Dec 1, 2011, at 4:56 PM, Matthew LeRoy wrote: > >> > >>> We began using CMake a few months ago for a couple of small cross-

Re: [CMake] import/export and DLL's

2011-12-06 Thread Michael Wild
On 12/06/2011 10:42 AM, Totte Karlsson wrote: > Thanks for feedback >> >> You misunderstand and misuse the DEFINE_SYMBOL property. All the >> IMPORT_X_DLL symbols are wrong, you have to remove them. > > But when building the B, and C dll the import symbols need to be defined > somehow. See my expo

Re: [CMake] "make install" files

2011-12-06 Thread Eric Noulard
2011/12/6 H Xu : > Hello, > > In cmake, install command is used to indicate the files that need to be > installed, and install(DIRECTORY ...) could be used to install directories. > However, I can't find a way to install files in a directory EXCEPT a few > files that I do not want to install. Is it

[CMake] "make install" files

2011-12-06 Thread H Xu
Hello, In cmake, install command is used to indicate the files that need to be installed, and install(DIRECTORY ...) could be used to install directories. However, I can't find a way to install files in a directory EXCEPT a few files that I do not want to install. Is it possible to do this?

Re: [CMake] import/export and DLL's

2011-12-06 Thread Totte Karlsson
Thanks for feedback You misunderstand and misuse the DEFINE_SYMBOL property. All the IMPORT_X_DLL symbols are wrong, you have to remove them. But when building the B, and C dll the import symbols need to be defined somehow. See my export/import header below. CMake will only add the DEFINE_

Re: [CMake] import/export and DLL's

2011-12-06 Thread Michael Wild
On 12/06/2011 09:47 AM, Totte Karlsson wrote: > Hi, I have a project where several DLL's are to be built, say A, B > and C. B needs to import functions/classes from A, and C need to > import functions from both A and B. In each library, a flag is > defined for exporting or importing, i.e. __declspe

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-06 Thread Totte Karlsson
I want to be moved to the same folder as the executables. How do I do that in CMake? At configuration time: CONFIGURE_FILE(//input.txt ${EXECUTABLE_OUTPUT_PATH} COPYONLY) Note that the destination directory, i.e. the EXECUTABLE_OUTPUT_PATH, possibly must already exist, and refer to the EXECU

[CMake] import/export and DLL's

2011-12-06 Thread Totte Karlsson
Hi, I have a project where several DLL's are to be built, say A, B and C. B needs to import functions/classes from A, and C need to import functions from both A and B. In each library, a flag is defined for exporting or importing, i.e. __declspec(dllexport) or __declspec(import) The build orde