[CMake] Generating makefile from Visual Studio Project (Migrating to Eclipse)

Olumide 50295 at web.de
Wed Dec 5 15:56:23 EST 2007


Olumide wrote:
> I'm a CMake newbie and I'd appreciate help creating a makefile *from* a 
> Visual Studio .NET 2003 project/solution. I'm trying like to migrate my 
> projects to eclipse and I hope CMake will help make that transition.

I'm trying to generate a Unix style (or NMake) Makefile that I can use 
to port my visual studio project to eclipse. I've tried running cmake on 
the project directory with the -G"Unix Makefiles" and -G"NMake 
Makefiles" option, but its not working -- I'm getting lots of errors. 
Apparently, I'm missing a number of variables. How can I set these 
variables? I'd still like to use the Microsoft compiler *but* within the 
eclipse environment.


C:\Work\Demo\TestTexturePlugin>cmake ..\TestTexturePlugin -G"Unix Makefiles"
CMake Error: CMake was unable to find a build program corresponding to 
"Unix Makefiles".  CMAKE_MAKE
_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module 
file:C:/Work/Demo/TestTexturePlugin/CMakeFiles/CMakeCCompil
er.cmake
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may 
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module 
file:C:/Work/Demo/TestTexturePlugin/CMakeFiles/CMakeCXXComp
iler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring done


Also, I've previously run CMake on the project directory, and I got 
TestTexturePlugin.vcproj.cmake, ALL_BUILD.vcproj.cmake. What is a cmake 
file? And what can I do with it?

('sorry to be asking these noobish questions)


More information about the CMake mailing list