Re: [CMake] Problem with recognising the MSYS environment

2009-04-22 Thread Arjen Markus
On 2009-04-17 10:02, Hendrik Sattler wrote: Zitat von Arjen Markus : With -G "MSYS Makefiles" I do get the proper setting for MSYS. The find_library command still insists on using the MS Visual C/C++ versions of the libraries, though, so I need to use my workaround still. But at least one point

Re: [CMake] Which to use: find_file and find_library; or check_include_file and check_library_exists

2009-04-22 Thread Marcel Loose
Hi Alex, So if I understand it correctly: The find_file() and find_library() commands should be used in FindXXX.cmake files; the check_include_file() and check_library_exists() command can in fact only be used in CMakeLists.txt files. Right? Or am I seeing things too black-and-white? Regards, Mar

Re: [CMake] Find scripts and dependent libraries

2009-04-22 Thread Adolfo Rodríguez
I would be definitely interested in FindACE and FindTAO scripts, and although I currently don't have much spare time, I'd be happy to contribute with whatever I can to the writing of such scripts. I currently use the LibFindMacros.cmake script posted here [1], but I'm considering moving to the FIND

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Ralf Habacker
Brad King schrieb: Ralf Habacker wrote: For my opinion the problem here is caused by the fact that cmake uses the value of the OUPUT_NAME property for creating the import library name and not the target name which is expected. to be more specific - s/not the target/not only the target/g -

[CMake] How to create transitive include dirs and preprocessor defs

2009-04-22 Thread Marcel Loose
Hi all, I'm currently converting a medium-sized project from Autotools to CMake. In that project we used the concept of "packages", where we defined a package as a directory containing sources (and header files) that together form a logical unit and are translated into a object library. These pack

[CMake] Analyze file dependencies in Visual Studio for project generatedby CMake

2009-04-22 Thread Martin Apel
Hi all, I am currently fighting with Visual Studio regenerating a CMake-generated project on every build, although nothing has changed. I am searching for a method how to debug the generated dependencies inside VS. The project builds a DLL from Fortran files, which are generated by a Perl script.

[CMake] SET_TARGET_PROPERTIES & COMPILE_DEFINITIONS

2009-04-22 Thread Micha Renner
Hi, How can I add more definitions to the target? In this example: SET_TARGET_PROPERTIES(${_targetname} PROPERTIES COMPILE_DEFINITIONS "myDefs=\"${flag}\" FC_CACHEDIR=\"${FC_CACHEDIR}\" FONTCONFIG_PATH=\"${FONTCONFIG_PATH}\"") only "myDefs" is added. Micha __

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Brad King
Ralf Habacker wrote: May be the following (new) properties OUTPUT_RUNTIME_NAME OUTPUT_ARCHIVE_NAME OUTPUT_LIBRARY_NAME which enforce the developer to change individual types of generated files would solve this problem in a generic way Good idea. We already do this for the output directory,

Re: [CMake] SET_TARGET_PROPERTIES & COMPILE_DEFINITIONS

2009-04-22 Thread Eric Noulard
2009/4/22 Micha Renner : > Hi, > > How can I add more definitions to the target? > > In this example: > SET_TARGET_PROPERTIES(${_targetname} PROPERTIES >        COMPILE_DEFINITIONS "myDefs=\"${flag}\" FC_CACHEDIR=\"${FC_CACHEDIR}\" > FONTCONFIG_PATH=\"${FONTCONFIG_PATH}\"") > > only "myDefs" is add

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Ralf Habacker
Brad King schrieb: Ralf Habacker wrote: May be the following (new) properties OUTPUT_RUNTIME_NAME OUTPUT_ARCHIVE_NAME OUTPUT_LIBRARY_NAME which enforce the developer to change individual types of generated files would solve this problem in a generic way Good idea. We already do this for th

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Brad King
Ralf Habacker wrote: http://www.cmake.org/Bug/view.php?id=8920 Thanks. Oops, you're right. My bad. I guess you can use your workaround for now. yes, thanks for the hint. This might work better: set_target_properties(k3b_bin PROPERTIES IMPORT_SUFFIX _bin${CMAKE_IMPORT_LIBRARY_SUFF

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Sergey Rudchenko
On Wed, 2009-04-15 at 13:23 -0400, Brad King wrote: > Sergey Rudchenko wrote: > > Hi all, > > > > My global generator adds some imported libraries in EnableLanguage > > method, but the TARGET_LINK_LIBRARIES command doesn't obey that fact the > > libraries are imported. > > Here is the code whic

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Ralf Habacker
Brad King schrieb: Ralf Habacker wrote: http://www.cmake.org/Bug/view.php?id=8920 Thanks. Oops, you're right. My bad. I guess you can use your workaround for now. yes, thanks for the hint. This might work better: set_target_properties(k3b_bin PROPERTIES IMPORT_SUFFIX _bin${CMAKE

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Brad King
Sergey Rudchenko wrote: What piece of code should handle those imported targets? I thought it is cmMakefile::AddLinkLibraryForTarget, but it doesn't do that. Should a local generator check itself whether a library is an imported target? I thought this work is done transparently for generators.

Re: [CMake] msvc linking problem k3b on windows

2009-04-22 Thread Brad King
Ralf Habacker wrote: Brad King schrieb: We do support the "image version" fields in dll binaries. What do you mean by "real" versioned DLLs? Are you talking about side-by-side stuff? I mean integrating api versions in the runtime target filename to be able to have different versions of a libr

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Brad King
Sergey Rudchenko wrote: On Wed, 2009-04-22 at 10:41 -0400, Brad King wrote: In general the generators should never have to see any imported targets. If you have a "cmTarget*" you can always ask its IsImported() method. Thanks, Brad. Now it's clean for we how things should be implemented. So t

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Sergey Rudchenko
On Wed, 2009-04-22 at 10:41 -0400, Brad King wrote: > In general the generators should never have to see any imported > targets. > If you have a "cmTarget*" you can always ask its IsImported() method. Thanks, Brad. Now it's clean for we how things should be implemented. So there is one straight p

Re: [CMake] How to create transitive include dirs and preprocessor defs

2009-04-22 Thread Tyler Roscoe
On Wed, Apr 22, 2009 at 10:03:53AM +0200, Marcel Loose wrote: > Suppose that one of subA1's header files includes a header file from > ext1. I can specify this in subA1 CMakeLists file by using > include_directories(). However, subA2 will fail to compile when it > includes this header file, because

Re: [CMake] Imported libraries lookup

2009-04-22 Thread Sergey Rudchenko
On Wed, 2009-04-22 at 11:01 -0400, Brad King wrote: > Don't use GetLinkLibraries. It's the "old-style" link computation results > which had some bugs. If you're computing a set of libraries to specify > for linking in a project file, use cmComputeLinkInformation: > >cmComputeLinkInformation*

[CMake] Visual Studio "clean" won't delete things

2009-04-22 Thread Tyler Roscoe
Each of my CMake projects deposits its results in a results directory. I set this up like this: # Set up results dir. add_custom_command( COMMENT "Creating results dir ${${PROJECT_NAME}_RESULTS}" OUTPUT ${${PROJECT_NAME}_RESULTS} COMMAND ${CMAKE_COMMAND} -E make_directory ${${PROJECT

Re: [CMake] versioned dll support on windows (was msvc linking problem k3b on windows)

2009-04-22 Thread Ralf Habacker
Brad King schrieb: Ralf Habacker wrote: Brad King schrieb: We do support the "image version" fields in dll binaries. What do you mean by "real" versioned DLLs? Are you talking about side-by-side stuff? I mean integrating api versions in the runtime target filename to be able to have differe

[CMake] libraries and exported functions

2009-04-22 Thread Christopher Harvey
Does cmake provide a mechanism to let a programmer define what functions/classes should be exported from a library? Basically I'd like an easy way to use this: http://gcc.gnu.org/wiki/Visibility (the step-by-step part at the bottom) I was thinking cmake could take care of that header and fill in

Re: [CMake] Which to use: find_file and find_lib rary; or check_include_file and check_lib rary_exists

2009-04-22 Thread Alexander Neundorf
On Wednesday 22 April 2009, Marcel Loose wrote: > Hi Alex, > > So if I understand it correctly: > The find_file() and find_library() commands should be used in > FindXXX.cmake files; the check_include_file() and check_library_exists() > command can in fact only be used in CMakeLists.txt files. > Ri

Re: [CMake] Analyze file dependencies in Visual Studio for project generatedby CMake

2009-04-22 Thread Alexander Neundorf
On Wednesday 22 April 2009, Martin Apel wrote: > Hi all, > > I am currently fighting with Visual Studio regenerating a > CMake-generated project on every build, although nothing has changed. I > am searching for a method how to debug the generated dependencies inside > VS. The project builds a DLL

Re: [CMake] cmake // how to get compiler default include search path

2009-04-22 Thread Alexander Neundorf
On Wednesday 22 April 2009, Sergey Nikulov wrote: > Hi All, > > Could you please suggest me how to get default compiler include search > path with cmake? > > For example gcc -c -v empty.c gives > > <... skip ...> > #include "..." search starts here: > #include <...> search starts here: > /usr/loca

Re: [CMake] Multiple custom commands depending on same file

2009-04-22 Thread giuliano
Indeed, both file-A.txt and file-B.txt are dependencies of one of my targets. giuliano Bill Hoffman wrote, on 4/21/2009 6:16 PM: giuliano wrote: I have something like: ADD_CUSTOM_COMMAND( OUTPUT ${BUILD_FOLDER}/file-A.txt COMMAND ${XSLT} ARGS

Re: [CMake] cmake // how to get compiler default include search path

2009-04-22 Thread Sergey Nikulov
Thank you, Alex. Will check it. 2009/4/23 Alexander Neundorf : > On Wednesday 22 April 2009, Sergey Nikulov wrote: >> Hi All, >> >> Could you please suggest me how to get default compiler include search >> path with cmake? >> >> For example gcc -c -v empty.c gives >> >> <... skip ...> >> #include

Re: [CMake] Multiple custom commands depending on same file

2009-04-22 Thread Bill Hoffman
giuliano wrote: Indeed, both file-A.txt and file-B.txt are dependencies of one of my targets. If you can create a full example that shows the problem, that would help. -Bill giuliano Bill Hoffman wrote, on 4/21/2009 6:16 PM: giuliano wrote: I have something like: ADD_CUSTOM_COMMAND

Re: [CMake] libraries and exported functions

2009-04-22 Thread Mike Jackson
http://www.cmake.org/Wiki/BuildingWinDLL Will get you started. While it is targeted at Windows DLLs there is some mention of using it with GCC. Take a look and see if the information is useful for GCC. If it is only partially useful or GCC information is missing from the article let me know and I

[CMake] how to get the version of a library

2009-04-22 Thread brice rebsamen
How to know the version of an installed library? My code has #if macros to handle different APIs. So I would need to get the version and set 2 variables (MAJOR and MINOR) and pass them to the compiler (-D). To be more precise, I am interested in Player/Stage. One way to get the version is to r