[CMake] Re: relative pathnames in projectfiles, and icon resources?

William A. Hoffman billlist at nycap.rr.com
Mon Aug 28 09:35:03 EDT 2006


At 10:59 PM 8/27/2006, erwin at erwincoumans.com wrote:

>>This is not possible with cmake.  The projects depend on cmake being installed.
>
>That is an unwanted dependency. Is there a way to remove this dependency? 
>Thanks,
>Erwin 

CMAKE_SUPPRESS_REGENERATION is the only way.  Although I would not recommend it.
The system introspection part of cmake is really needed.  Does the compiler
work, are these features installed on the machine?  Where are things installed?
This is all discovered on the machine where cmake is run.  If you then move
to a new machine, all of that information is potentially wrong.





>William A. Hoffman writes: 
>>At 09:46 PM 8/27/2006, erwin at erwincoumans.com wrote:
>>>I am (trying to) migrate from jam+msvcgen to cmake for projectfile autogeneration. Previously, I ran jam msvcgen to autogenerate all projectfiles, and then those *.vcproj,*.sln,*.dsw,*.dsp got distributed. So developers could use the distributed projectfiles out-of-the-box.
>>>It included resource files, with icon. 1) Can you configure cmake to include an icon?
>>This is possible with cmake.   Look at the CMake sources. In MFCDialot there is an icon referenced in the CMakeSetup.rc file.
>>You just add CMakeSetup.rc to the source list of the target.
>>You will also want this: 
>># Use of CMAKE_MFC_FLAG
>># Values:
>># 0: Use Standard Windows Libraries
>># 1: Use MFC in a Static Library
>># 2: Use MFC in a Shared DLL
>>SET(CMAKE_MFC_FLAG 2)
>>>2) can Cmake create redistributable projectfiles, with just relative paths? I am very new to cmake, and I just used some example that uses absolete paths in the generated projectfiles. I won't be able to distribute/package those.
>>>                               RelativePath="C:\develop\bulletsourceforge\Bullet\BroadphaseCollision\Ax 
>>This is not possible with cmake.  The projects depend on cmake being installed.
>>Also, cmake can do system introspection, so it is not a good idea to move the generated makefiles
>>from system to system.   You can try setting the cmake variable CMAKE_USE_RELATIVE_PATHS and CMAKE_SUPPRESS_REGENERATION to true.   However this is not well tested or recommend. 
>>-Bill 
>> 
>>_______________________________________________
>>CMake mailing list
>>CMake at cmake.org
>>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list