Patch of CMake configuration file to support Win32 NMake install #7065

Closed
opened 2007-08-17 22:05:09 +02:00 by Stephane SOPPERA · 7 comments

%%%The patch correct two problems when building Blender using CMake on windows, with the free MSVC7 and generating nmake makefiles.
In this configuration there are two problems:

  1. the .blender directory and the .dll are not copied to the installation directory but to the root of the disk where the build is made. (I'm building in K:\blender_build\build and the .blender directory and the DLL are copied directly to k:.blender and k:\libpng.dll...)
  2. the installation of .dll files in 1. was interrupted on line:
  COMMAND if $\(ConfigurationName\)==Debug copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25_D.dll\" \"$\(TargetDir\)\\\"

The 1. problem was due to the fact that in source\creator\CMakelist.txt $TargetDir was used instead of ${TARGETDIR}. That made the file source\creator\CMakeFiles\blender.dir being generated with $(TargetDir) instead of the correct target dir. This explained why files where copied to the root dir since TargetDir environment var was not set.

The 2. problem is due to the line conditions:
if $(ConfigurationName)==Debug
that are not understood by cmd.exe. I get the error saying "copie etait inattendu" (my windows is in french) that can be translated in english: "copy was unexcepted". This error stops the makefile execution with errors:
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\nmake.exe"' : return code '0x2'
Stop.
I'm not an cmd.exe expert and I failed to find a solution for this one. So in the path I removed these tests and only copies the non-debug python dll.

%%%

%%%The patch correct two problems when building Blender using CMake on windows, with the free MSVC7 and generating nmake makefiles. In this configuration there are two problems: 1. the .blender directory and the .dll are not copied to the installation directory but to the root of the disk where the build is made. (I'm building in K:\blender_build\build and the .blender directory and the DLL are copied directly to k:\.blender and k:\libpng.dll...) 2. the installation of .dll files in 1. was interrupted on line: ``` COMMAND if $\(ConfigurationName\)==Debug copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25_D.dll\" \"$\(TargetDir\)\\\" ``` The 1. problem was due to the fact that in source\creator\CMakelist.txt $\(TargetDir\) was used instead of ${TARGETDIR}. That made the file source\creator\CMakeFiles\blender.dir being generated with $(TargetDir) instead of the correct target dir. This explained why files where copied to the root dir since TargetDir environment var was not set. The 2. problem is due to the line conditions: if $\(ConfigurationName\)==Debug that are not understood by cmd.exe. I get the error saying "copie etait inattendu" (my windows is in french) that can be translated in english: "copy was unexcepted". This error stops the makefile execution with errors: NMAKE : fatal error U1077: 'if' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\nmake.exe"' : return code '0x2' Stop. I'm not an cmd.exe expert and I failed to find a solution for this one. So in the path I removed these tests and only copies the non-debug python dll. %%%

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Chris, are you maintaining the CMake files now? I don't see Jacques Baurain (sp?) listed in the tracker, also he hasn't committed anything in the past 6 months or so. Should I ask on bf-committers?%%%

%%%Chris, are you maintaining the CMake files now? I don't see Jacques Baurain (sp?) listed in the tracker, also he hasn't committed anything in the past 6 months or so. Should I ask on bf-committers?%%%

%%%Is this patch still relavent?
%%%

%%%Is this patch still relavent? %%%

%%%Yes, the patch is still relevant.
I'll upload a new one with today SVN right now (by the way, there is still a definition of -DWITH_OPENEXR macro in the same file for CMake, it will be in the new patch version).

I've only tested my patch when generating NMake files from CMake and building from command line. Now I build with VC9.

Stéphane%%%

%%%Yes, the patch is still relevant. I'll upload a new one with today SVN right now (by the way, there is still a definition of -DWITH_OPENEXR macro in the same file for CMake, it will be in the new patch version). I've only tested my patch when generating NMake files from CMake and building from command line. Now I build with VC9. Stéphane%%%

%%%New version of patch with today SVN.%%%

%%%New version of patch with today SVN.%%%

%%%Committed -- thanks!%%%

%%%Committed -- thanks!%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#7065
No description provided.