[CMake] How to generate MSVC projects that will build after install

Steve Huston shuston at riverace.com
Fri Oct 23 00:24:22 EDT 2009


Follow-up...

> I'm trying to generate project files for some code examples 
> that will go into the installer for a project. Thus, any 
> reference to a source or binary dir from the build or source 
> tree is invalid in the generated project.
> 
> I'm having problems with:
> 
> - include directories. I tried 
> include_directories(../../include) (which would work in the 
> install tree that's eventually put in place). When the vcproj 
> file is generated, the include path has 
> <cmake-current-source>\..\..\include

I've found that instead of using include_directories(),
set_directory_properties (INCLUDE_DIRECTORIES) works for this, at
least on Windows.

> - pdb files; these have fully qualified paths under the 
> binary directory

Still have this. Also, there is a rule to update the project based on
CMakeLists.txt, and this won't work in an installed situation. Can I
get rid of the check timestamps against CMakeLists.txt?

> Any idea on how I can solve these? Although the items above 
> are based on problems I'm having with the MSVC files, I'll 
> also need this to work for Makefiles.
> 
> Thanks,
> -Steve
> 
> --
> Steve Huston, Riverace Corporation
> Total Lifecycle Support for Your Networked Applications
> http://www.riverace.com
> 



More information about the CMake mailing list