[CMake] Generating makefile from Visual Studio Project (Migrating
to Eclipse)
Olumide
50295 at web.de
Fri Dec 7 12:27:38 EST 2007
Olumide wrote:
> Olumide wrote:
>> The directory C:\Work\Demo\TestTexturePlugin\CMakeFiles now contains,
>> among other files, Makefile2, which I assume is the NMake Makefile,
>> and Makefile.cmake. Where can I find more information about these
>> files. I'm not sure which files I need to perform the migration to
>> eclipse.
>
> I see there is a Makefile in C:\Work\Demo\TestTexturePlugin.
>
> Anyway here is the result of running nmake
> C:\Work\Demo\TestTexturePlugin>nmake
>
> Microsoft (R) Program Maintenance Utility Version 7.10.3077
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> [100%] Building CXX object CMakeFiles/TestTexturePlugin.dir/pluginMain.obj
> _WINDOWS
> c1xx : fatal error C1083: Cannot open source file: '_WINDOWS': No such
> file or directory
> _DEBUG
Compiled and linked! :)
Had to overhaul my CMakeLists.txt tho'. Here are the changes I had to make:
include_directories(
"$(VSINSTALLDIR)include"
"$(VCInstallDir)atlmfc/include"
"$(VCInstallDir)PlatformSDK/include/prerelease"
"$(VCInstallDir)PlatformSDK/include"
"$(FrameworkSDKDir)include"
"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/include"
"C:/Program Files/Microsoft Visual Studio .NET
2003/Vc7/PlatformSDK/Include"
"C:/Program Files/Alias/Maya6.5/include"
C:/Work/Demo/TestTexturePlugin/
)
add_definitions(
"/D \"WIN32\""
"/D \"_DEBUG\""
"/D \"_AFXDLL\""
"/D \"_MBCS\""
"/D \"_WINDOWS\""
"/D \"NT_PLUGIN\""
"/D \"REQUIRE_IOSTREAM\""
"/D \"CMAKE_INTDIR=Debug\""
#TestTexturePlugin_EXPORTS
)
link_directories(
"$(VCInstallDir)lib"
"$(VCInstallDir)atlmfc/lib"
"$(VCInstallDir)PlatformSDK/lib/prerelease"
"$(VCInstallDir)PlatformSDK/lib"
"$(FrameworkSDKDir)lib"
"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/lib"
"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib"
"C:/Program Files/Alias/Maya6.5/lib"
)
I've still got a few odd's and ends to take care of. To begin with, the
target application (Autodesk Maya) refuses to lead the plugin because
its unable to find an initialize function which is included in the
source file pluginMain.cpp. Specifically, the output should have a .mll
file extension instead of .dll.
One other minor question: it appears the visual studio path(?) macros
e.g. $(VCInstallDir) aren't recognized/expanded. Why is this so?
- Olumide
More information about the CMake
mailing list