]> OCCT Git - occt-wok.git/commitdiff
0025716: Part of WOK projects are generated as executable instead of library
authordbv <dbv@opencascade.com>
Mon, 19 Jan 2015 15:27:23 +0000 (18:27 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 21 Jan 2015 09:01:35 +0000 (12:01 +0300)
WOK now generates the correct project files.

src/WOKTclLib/osutils.tcl
src/WOKTclLib/templates/template.vc10x
src/WOKTclLib/templates/template.vc11x
src/WOKTclLib/templates/template.vc12x

index 595e8eb3a4a3c1a20443cc6d713ff864f1b4accd..a464b4a75ea4f6b093751c7ea595bc99adf0f0b8 100755 (executable)
@@ -1036,9 +1036,17 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     set WOKSteps_exec_link [wokparam -v %WOKSteps_exec_link [woklocate -u $theToolKit]]
     if { [regexp {WOKStep_DLLink} $WOKSteps_exec_link] || [regexp {WOKStep_Libink} $WOKSteps_exec_link] } {
       set aUsedToolKits [concat $aUsedToolKits "\/dll"]
-      set binext 2
+      set aConfType 2
+      if { "$theVcVer" == "vc10" || "$theVcVer" == "vc11" || "$theVcVer" == "vc12" } {
+        set aConfType "DynamicLibrary"
+      }
+      set aBinExt ".dll"
     } else {
-      set binext 1
+      set aConfType 1
+      if { "$theVcVer" == "vc10" || "$theVcVer" == "vc11" || "$theVcVer" == "vc12" } {
+        set aConfType "Application"
+      }
+      set aBinExt ".exe"
     }
 
     # correct names of referred third-party libraries that are named with suffix
@@ -1077,12 +1085,8 @@ proc osutils:vcprojx { theVcVer theOutDir theToolKit theGuidsMap {theProjTmpl {}
     regsub -all -- {__TKINC__}  $aProjTmpl $anIncPaths    aProjTmpl
     regsub -all -- {__TKDEFS__} $aProjTmpl $aTKDefines    aProjTmpl
     regsub -all -- {__FILES__}  $aProjTmpl $aFilesSection aProjTmpl
-    regsub -all -- {__CONF__}   $aProjTmpl $binext        aProjTmpl
-    if { $binext == 2 } {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "dll" aProjTmpl
-    } else {
-      regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl
-    }
+    regsub -all -- {__CONF__}   $aProjTmpl $aConfType     aProjTmpl
+    regsub -all -- {__XQTEXT__} $aProjTmpl $aBinExt       aProjTmpl
 
     set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w]
     fconfigure $aFile -translation crlf
index ab041e6af4b295ee88b235dee3ee04662464fc71..f7ed9850b674f02ce996c69d86953d8d2a8ed5fd 100644 (file)
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
index a5547ae6e386782f742096c62eb27ef707df11ae..17cc49f3437d79ba7302d883d6d968e0bfdc1230 100644 (file)
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v110</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v110</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v110</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v110</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
index 987985ab658d98e3701ab6d26f989d083aeb6a09..97bfe27b9022a98d0a0370f9a09cb17525a8bdc8 100644 (file)
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
+    <ConfigurationType>__CONF__</ConfigurationType>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />