[CMake] Solution groups and sub projects.

2010-02-09 Thread Surya Kiran Gullapalli
Hello all, This has been asked for quite a few times with no answer and I'm putting the same question again. Do we have the support for solution groups and sub projects with VS generators. I'm using CMake-2.8.0 (I could see there's a

[CMake] link static lib to dll

2010-02-09 Thread Micha Renner
A DLL-library is linked to static library. The structure of the project is this: main-project +- Project STATIC | +- Project DLL This works very well. But if I include the following export part to the project of the DLL... INSTALL(TARGETS T-DLL EXPORT

Re: [CMake] link static lib to dll

2010-02-09 Thread Michael Wild
On 9. Feb, 2010, at 11:05 , Micha Renner wrote: A DLL-library is linked to static library. The structure of the project is this: main-project +- Project STATIC | +- Project DLL This works very well. But if I include the following export part to the

[CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Luigi Calori
Is there a way to instruct FindXXX modules to produce variables that have different linking in debug and release? I am producind a lib with suffix D (zlib) in an ExternalProjetAdd, target.It gets installed correctly in debug (which is the default for VS cmake--build) This zlibD.lib does not

[CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Hilton Medeiros
Hello, From what I read and understood this DEFINE_SYMBOL property should be defined like this (or something like this): On Windows, as shared library: target_EXPORTS=__declspec(dllexport) On Linux, as shared library: target_EXPORTS=__attribute__((visibility(default))) So that I can use this

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Mike Jackson
Here is one I wrote for Expat: --8 # - Find expat # Find the native EXPAT headers and libraries. # # EXPAT_INCLUDE_DIRS - where to find expat.h, etc. # EXPAT_LIBRARIES- List of libraries when using expat. # EXPAT_LIBRARY_DEBUG - Debug

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Pau Garcia i Quiles
Hello, You are doing it wrong. You need to create a header file (myproject_exports.h, for instance) following http://gcc.gnu.org/wiki/Visibility . If you call your visibility macro target_EXPORTS, you do not need to modify the value of DEFINE_SYMBOL at all, CMake will automagically make use of

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Mike Jackson
http://www.cmake.org/Wiki/BuildingWinDLL _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequartz.net Principal Software Engineer Dayton, Ohio On Tue, Feb 9, 2010

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Luigi Calori
Hi Mike, thanks for the code, I' ll try to understand it and to apply to my need... I see is quite more complex than the statndard FindExpat bundled with CMake: Is it customized to your need or just better? In the latter case, why not ship cmake with it? Is testing for debugging libs a very

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Mike Jackson
From my own experience there are very few projects that can be configured to have an installation of both debug and release libraries in the same installation tree. Qt was the first one that I have seen but there are a few others. After going through pain on windows where ALL libraries MUST be

Re: [CMake] Solution groups and sub projects.

2010-02-09 Thread Micha Renner
Am Dienstag, den 09.02.2010, 14:34 +0530 schrieb Surya Kiran Gullapalli: Hello all, This has been asked for quite a few times with no answer and I'm putting the same question again. Do we have the support for solution groups and sub projects with VS generators. I'm using CMake-2.8.0 (I

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Mike Jackson
Just to get some more clarification, what exactly do you mean by ...this visibility macro turns out to be always the same thing in every project..., The only thing you can say for certain is that for the versions of Visual Studio and GCC _currently_ released the macros seem to stay the same.

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Hilton Medeiros
Thanks a lot for the answers. Indeed, I already knew this macro, but I thought that since this visibility macro turns out to be always the same thing in every project, CMake would have it built in. I can't see why this is not the case yet. Well, back to #defines... Thanks again, Hilton On Tue,

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Mike Jackson
My version of Tiff is at: http://www.bluequartz.net/cgi-bin/gitweb/gitweb.cgi There are zlib and tiff entries there. There is also a project called CxImage (which I kind of hijacked from the original author) that includes zlib, tiff, jpeg and png as support files in the project and builds all of

[CMake] build package of subproject with cpack

2010-02-09 Thread normanraedke
Hello everybody, is there a way to build a package of sub project with CPACK. I have a Project which consists off different subprojects most shared library projects. The problem is that only the generated top level project include a CPackConfig.cmake file. The CMakeLists.txt files from avery

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Hilton Medeiros
Well, that is exactly what I expect from CMake, it has done much more than this until now, this should be easy. As an example the library Ogre for 3D graphics rendering is known to support a lot of platforms and as you can see it is the same thing always: #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32

Re: [CMake] Solution groups and sub projects.

2010-02-09 Thread Adil Yalcin
Hello, Isn't SOURCE_GROUP what you are looking for? http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:source_group Hope that helps, Adil On Tue, Feb 9, 2010 at 11:04 AM, Surya Kiran Gullapalli suryakiran.gullapa...@gmail.com wrote: Hello all, This has been asked for quite a few

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Michael Wild
CMake can't possibly do this in a good and general way. I'd hate it if it tried! 1. Many projects put much more stuff in the XXX_EXPORTS (or whatever-it's-called) macros. There's a huge variability, no two projects have the exact same requirements and conventions. 2. How would the

Re: [CMake] How to use DEFINE_SYMBOL properly?

2010-02-09 Thread Hilton Medeiros
Everything can be made as an option, nobody would be forced to use this. In fact, this could be a macro with one 'target' argument. It would be your choice to use it: add_visibility_definitions(target) It would choose the 'standard of visibility' to target_EXPORTS and target_IMPORTS, taking into

[CMake] Building shared library from collection?

2010-02-09 Thread John Brydon
Hi folks, first post here as just delving into the world of cmake. My first question is about the structure of my project. It is like so: Project Folder '- Module A '- Module B '- Module C From reading the CMake book it appears I've got 3 options for

[CMake] Sourceless targets

2010-02-09 Thread C. Meissa
Hello Lists, I have lots of small libraries and sometime it is needed to unify them to a main program library e.g. libtest.so for my test program… I tried ADD_LIBRARY(test-mainlib SHARED ) SET_TARGET_PROPERTIES( test-mainlib PROPERTIES OUPUT_NAME libtest ) But this does not work due to Cannot

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Will Dicharry
Mike Jackson wrote: Here is one I wrote for Expat: --8 # - Find expat # Find the native EXPAT headers and libraries. # # EXPAT_INCLUDE_DIRS - where to find expat.h, etc. # EXPAT_LIBRARIES- List of libraries when using expat. #

Re: [CMake] Sourceless targets

2010-02-09 Thread Michael Wild
On 9. Feb, 2010, at 17:13 , C. Meissa wrote: Hello Lists, I have lots of small libraries and sometime it is needed to unify them to a main program library e.g. libtest.so for my test program… I tried ADD_LIBRARY(test-mainlib SHARED ) SET_TARGET_PROPERTIES( test-mainlib PROPERTIES

Re: [CMake] Sourceless targets

2010-02-09 Thread C. Meissa
Hello, thx for your reply… Am Dienstag, 9. Februar 2010 schrieb Michael Wild: What is it exactly you are trying to achieve? Well, you got me perfectly right… I like to have all symbols in my static libraries included as is… :-) IMHO this can't possibly work. I assume that you want to create a

Re: [CMake] Building shared library from collection?

2010-02-09 Thread Hilton Medeiros
Personally, I prefer a sole CMakeLists.txt for small/medium size projects. You should not have problems linking your project, this would be my approach: list(APPEND LINK_MODULES PATHLIB/libA.a PATHLIB/libB.a PATHLIB/libC.a) target_link_libraries(super_lib ${LINK_MODULES}) Note that you should

Re: [CMake] Sourceless targets

2010-02-09 Thread Michael Wild
On 9. Feb, 2010, at 18:11 , C. Meissa wrote: Hello, thx for your reply… Am Dienstag, 9. Februar 2010 schrieb Michael Wild: What is it exactly you are trying to achieve? Well, you got me perfectly right… I like to have all symbols in my static libraries included as is… :-) IMHO this

Re: [CMake] How to turn off incremental linking for MSVC Debug and RelWithDebInfo targets?

2010-02-09 Thread Erwin Coumans
It would be great to have an answer on this, did I miss it in the FAQs? How can we switch off incremental linking for Debug and RelWithDebInfo target on Windows Visual Studio projects? Thanks a lot, Erwin On 8 February 2010 11:44, Erwin Coumans erwin.coum...@gmail.com wrote: I've search a

Re: [CMake] How to turn off incremental linking for MSVC Debug and RelWithDebInfo targets?

2010-02-09 Thread John Drescher
STRING(REPLACE INCREMENTAL:YES INCREMENTAL:NO replacementFlags ${CMAKE_EXE_LINKER_FLAGS_DEBUG}) message (${replacementFlags}) SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG ${replacementFlags}) STRING(REPLACE INCREMENTAL:YES INCREMENTAL:NO

Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Philip Lowman
On Tue, Feb 9, 2010 at 11:15 AM, Will Dicharry wdicha...@stellarscience.com wrote: Mike Jackson wrote: Here is one I wrote for Expat: --8 # - Find expat # Find the native EXPAT headers and libraries. # #  EXPAT_INCLUDE_DIRS - where to

[CMake] set “Whole Program Optimization ”to Yes in VS 2005

2010-02-09 Thread xiada74
nbsp; When I use the blow statement for MSVC: nbsp; SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} /GL) nbsp; The corresponding statement in the .vcproj file generated by CMake is: nbsp; AdditionalOptions= /Zm1000 /GL nbsp; When I open the property pages in VS 2005,I can see /GLnbsp;on

Re: [CMake] set “Whole Program Optimization ”to Yes in VS 2005

2010-02-09 Thread Tyler Roscoe
On Wed, Feb 10, 2010 at 10:51:28AM +0800, xiad...@sina.com wrote: SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} /GL) nbsp; The corresponding statement in the .vcproj file generated by CMake is: nbsp; AdditionalOptions= /Zm1000 /GL nbsp; When I open the property pages in VS 2005,I

Re: [CMake] link static lib to dll

2010-02-09 Thread Micha Renner
Am Dienstag, den 09.02.2010, 11:34 +0100 schrieb Michael Wild: On 9. Feb, 2010, at 11:05 , Micha Renner wrote: A DLL-library is linked to static library. The structure of the project is this: main-project +- Project STATIC | +- Project DLL This

Re: [CMake] set “Whole Program Optimization”to Y es in VS 2005

2010-02-09 Thread Philip Lowman
On Tue, Feb 9, 2010 at 9:51 PM, xiad...@sina.com wrote: When I use the blow statement for MSVC: SET (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} /GL) The corresponding statement in the .vcproj file generated by CMake is: AdditionalOptions= /Zm1000 /GL When I open the property pages