[gtk/more-vs-proj-updates: 5/5] MSVC projects: Generate demo sources in IntDir
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/more-vs-proj-updates: 5/5] MSVC projects: Generate demo sources in IntDir
- Date: Thu, 26 May 2022 11:48:25 +0000 (UTC)
commit 7b7a1456c9306e7885baa13782e64ca56f401fb3
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu May 26 19:45:47 2022 +0800
MSVC projects: Generate demo sources in IntDir
This is to reduce the pollution in the souce directories. Update the
include paths accordingly.
win32/generate-msvc.mak | 28 ++++++++++++----------
win32/vs10/gtk3-demo-application.vcxproj.filtersin | 1 -
win32/vs10/gtk3-demo-application.vcxprojin | 2 +-
win32/vs10/gtk3-demo.vcxproj.filtersin | 1 -
win32/vs10/gtk3-demo.vcxprojin | 4 ++--
win32/vs1x-props/gtk3-build-defines.props | 4 ++++
win32/vs9/gtk3-build-defines.vsprops | 8 +++++++
win32/vs9/gtk3-demo-application.vcprojin | 9 ++++++-
win32/vs9/gtk3-demo.vcprojin | 17 +++++++++----
win32/vs9/gtk3-icon-browser.vcprojin | 9 ++++++-
10 files changed, 59 insertions(+), 24 deletions(-)
---
diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak
index 78958d2f3e..d7c715d8e9 100644
--- a/win32/generate-msvc.mak
+++ b/win32/generate-msvc.mak
@@ -88,13 +88,13 @@ generate-base-sources: \
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtk-win32.rc \
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\libgtk3.manifest \
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtk.gresource.xml \
- ..\demos\gtk-demo\demos.h \
- ..\demos\gtk-demo\demo_resources.c \
- ..\demos\icon-browser\resources.c
+ .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h \
+ .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c \
+ .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c
# Copy the pre-defined config.h.win32 and demos.h.win32
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\config.h: ..\config.h.win32
-..\demos\gtk-demo\demos.h: ..\demos\gtk-demo\demos.h.win32
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h: ..\demos\gtk-demo\demos.h.win32
# Generate the versioned headers and resource scripts (*.rc)
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\gdk\gdkversionmacros.h: ..\gdk\gdkversionmacros.h.in
@@ -112,7 +112,7 @@ generate-base-sources: \
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\config.h \
.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\gdk\gdkconfig.h \
-..\demos\gtk-demo\demos.h:
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h:
@echo Copying $@...
@if not exist $(@D)\ md $(@D)
@copy $** $@
@@ -277,13 +277,17 @@ generate-base-sources: \
@$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --body $** >> $@.tmp
@move $@.tmp $@
-..\demos\gtk-demo\demo_resources.c: ..\demos\gtk-demo\demo.gresource.xml $(GTK_DEMO_RESOURCES)
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c: ..\demos\gtk-demo\demo.gresource.xml
$(GTK_DEMO_RESOURCES)
@echo Generating $@...
- @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\demo.gresource.xml
+ @if not exist $(@D)\ md $(@D)
+ @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\gtk-demo \
+ --generate-source ..\demos\gtk-demo\demo.gresource.xml
-..\demos\icon-browser\resources.c: ..\demos\icon-browser\iconbrowser.gresource.xml $(ICON_BROWSER_RESOURCES)
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c:
..\demos\icon-browser\iconbrowser.gresource.xml $(ICON_BROWSER_RESOURCES)
@echo Generating $@...
- @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source
$(@D)\iconbrowser.gresource.xml
+ @if not exist $(@D)\ md $(@D)
+ @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\icon-browser \
+ --generate-source ..\demos\icon-browser\iconbrowser.gresource.xml
gtk3-demo.sourcefiles: $(demo_actual_sources)
@-del vs9\$(DEMO_VS9_PROJ)
@@ -408,9 +412,9 @@ regenerate-demos-h-win32: ..\demos\gtk-demo\geninclude.py $(demo_actual_sources)
# Remove the generated files
clean:
- @-del /f /q ..\demos\icon-browser\resources.c
- @-del /f /q ..\demos\gtk-demo\demo_resources.c
- @-del /f /q ..\demos\gtk-demo\demos.h
+ @-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c
+ @-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c
+ @-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypebuiltins.c
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtktypebuiltins.h
@-del /f /q .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtkprivatetypebuiltins.c
diff --git a/win32/vs10/gtk3-demo-application.vcxproj.filtersin
b/win32/vs10/gtk3-demo-application.vcxproj.filtersin
index b6dc6bdd9d..5b356ef76b 100644
--- a/win32/vs10/gtk3-demo-application.vcxproj.filtersin
+++ b/win32/vs10/gtk3-demo-application.vcxproj.filtersin
@@ -16,6 +16,5 @@
</ItemGroup>
<ItemGroup>
#include "gtk3-demo-application.vs10.sourcefiles.filters"
- <ClCompile Include="..\..\demos\gtk-demo\demo_resources.c"><Filter>Source Files</Filter></ClCompile>
</ItemGroup>
</Project>
diff --git a/win32/vs10/gtk3-demo-application.vcxprojin b/win32/vs10/gtk3-demo-application.vcxprojin
index d4dae5b14b..d269c9f5d5 100644
--- a/win32/vs10/gtk3-demo-application.vcxprojin
+++ b/win32/vs10/gtk3-demo-application.vcxprojin
@@ -79,7 +79,7 @@
</ItemDefinitionGroup>
<ItemGroup>
#include "gtk3-demo-application.vs10.sourcefiles"
- <ClCompile Include="..\..\demos\gtk-demo\demo_resources.c" />
+ <ClCompile Include=".\$(Configuration)\$(Platform)\obj\gtk3-demo\demo_resources.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
diff --git a/win32/vs10/gtk3-demo.vcxproj.filtersin b/win32/vs10/gtk3-demo.vcxproj.filtersin
index b67f402acb..a8fa97ddc6 100644
--- a/win32/vs10/gtk3-demo.vcxproj.filtersin
+++ b/win32/vs10/gtk3-demo.vcxproj.filtersin
@@ -12,6 +12,5 @@
</ItemGroup>
<ItemGroup>
#include "gtk3-demo.vs10.sourcefiles.filters"
- <ClCompile Include="..\..\demos\gtk-demo\demo_resources.c"><Filter>Source Files</Filter></ClCompile>
</ItemGroup>
</Project>
diff --git a/win32/vs10/gtk3-demo.vcxprojin b/win32/vs10/gtk3-demo.vcxprojin
index 4d00d11f2d..72abf9bb6c 100644
--- a/win32/vs10/gtk3-demo.vcxprojin
+++ b/win32/vs10/gtk3-demo.vcxprojin
@@ -44,7 +44,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
-
<AdditionalIncludeDirectories>$(GtkBaseIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+
<AdditionalIncludeDirectories>$(Gtk3DemoIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader></PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<CompileAs>CompileAsC</CompileAs>
@@ -80,7 +80,7 @@
</ItemDefinitionGroup>
<ItemGroup>
#include "gtk3-demo.vs10.sourcefiles"
- <ClCompile Include="..\..\demos\gtk-demo\demo_resources.c" />
+ <ClCompile Include="$(IntDir)\demo_resources.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
diff --git a/win32/vs1x-props/gtk3-build-defines.props b/win32/vs1x-props/gtk3-build-defines.props
index 0198734e79..2304a7e736 100644
--- a/win32/vs1x-props/gtk3-build-defines.props
+++ b/win32/vs1x-props/gtk3-build-defines.props
@@ -15,6 +15,7 @@
<BaseConfigIncludes>$(GtkGenSrcDir);$(GdkGenSrcDir);..\..</BaseConfigIncludes>
<GdkBaseIncludes>$(GdkGenSrcDir)\gdk;..\..\gdk;$(BaseConfigIncludes)</GdkBaseIncludes>
<GtkBaseIncludes>$(GtkGenSrcDir)\gtk;..\..\gtk;$(GdkBaseIncludes)</GtkBaseIncludes>
+
<Gtk3DemoIncludes>.\$(Configuration)\$(Platform)\obj\gtk3-demo;..\..\gtk;$(GtkBaseIncludes)</Gtk3DemoIncludes>
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
<GtkHostMachine Condition="'$(Platform)' == 'Win32'">i686</GtkHostMachine>
<GtkHostMachine Condition="'$(Platform)' == 'x64'">x86_64</GtkHostMachine>
@@ -90,6 +91,9 @@ nmake -f install-msvc.mak PREFIX=$(GlibEtcInstallRoot)</InstallBuildsBase>
<BuildMacro Include="GtkBaseIncludes">
<Value>$(GtkBaseIncludes)</Value>
</BuildMacro>
+ <BuildMacro Include="Gtk3DemoIncludes">
+ <Value>$(Gtk3DemoIncludes)</Value>
+ </BuildMacro>
<BuildMacro Include="GtkIncludedImmodulesDefines">
<Value>$(GtkIncludedImmodulesDefines)</Value>
</BuildMacro>
diff --git a/win32/vs9/gtk3-build-defines.vsprops b/win32/vs9/gtk3-build-defines.vsprops
index 561a5952b1..fec060411d 100644
--- a/win32/vs9/gtk3-build-defines.vsprops
+++ b/win32/vs9/gtk3-build-defines.vsprops
@@ -55,6 +55,14 @@
Name="GtkBaseIncludesRelease"
Value=".\Release\$(PlatformName)\obj\gtk-3\gtk;..\..\gtk;$(GdkBaseIncludesRelease)"
/>
+ <UserMacro
+ Name="Gtk3DemoIncludesDebug"
+ Value=".\Debug\$(PlatformName)\obj\gtk3-demo;$(GtkBaseIncludesDebug)"
+ />
+ <UserMacro
+ Name="Gtk3DemoIncludesRelease"
+ Value=".\Release\$(PlatformName)\obj\gtk3-demo;$(GtkBaseIncludesRelease)"
+ />
<UserMacro
Name="GdkDefines"
Value="GDK_COMPILATION;G_LOG_DOMAIN=\"Gdk\""
diff --git a/win32/vs9/gtk3-demo-application.vcprojin b/win32/vs9/gtk3-demo-application.vcprojin
index b9eb1577e7..1866e967fe 100644
--- a/win32/vs9/gtk3-demo-application.vcprojin
+++ b/win32/vs9/gtk3-demo-application.vcprojin
@@ -153,7 +153,14 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "gtk3-demo-application.sourcefiles"
- <File RelativePath="..\..\demos\gtk-demo\demo_resources.c" />
+ <File RelativePath=".\Release\$(PlatformName)\obj\gtk3-demo\demo_resources.c">
+ <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
+ <File RelativePath=".\Debug\$(PlatformName)\obj\gtk3-demo\demo_resources.c" >
+ <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
</Filter>
<Filter
Name="Headers"
diff --git a/win32/vs9/gtk3-demo.vcprojin b/win32/vs9/gtk3-demo.vcprojin
index 50d279c442..57b885f22a 100644
--- a/win32/vs9/gtk3-demo.vcprojin
+++ b/win32/vs9/gtk3-demo.vcprojin
@@ -31,7 +31,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="$(GtkBaseIncludesDebug)"
+ AdditionalIncludeDirectories="$(Gtk3DemoIncludesDebug)"
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -63,7 +63,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="$(GtkBaseIncludesDebug)"
+ AdditionalIncludeDirectories="$(Gtk3DemoIncludesDebug)"
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -95,7 +95,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(GtkBaseIncludesRelease)"
+ AdditionalIncludeDirectories="$(Gtk3DemoIncludesRelease)"
PreprocessorDefinitions="$(GtkPrefixDefine)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@@ -127,7 +127,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(GtkBaseIncludesRelease)"
+ AdditionalIncludeDirectories="$(Gtk3DemoIncludesRelease)"
PreprocessorDefinitions="$(GtkPrefixDefine)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@@ -157,7 +157,14 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "gtk3-demo.sourcefiles"
- <File RelativePath="..\..\demos\gtk-demo\demo_resources.c" />
+ <File RelativePath=".\Release\$(PlatformName)\obj\gtk3-demo\demo_resources.c">
+ <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
+ <File RelativePath=".\Debug\$(PlatformName)\obj\gtk3-demo\demo_resources.c" >
+ <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/win32/vs9/gtk3-icon-browser.vcprojin b/win32/vs9/gtk3-icon-browser.vcprojin
index cc2c8b7782..28c24358d6 100644
--- a/win32/vs9/gtk3-icon-browser.vcprojin
+++ b/win32/vs9/gtk3-icon-browser.vcprojin
@@ -157,7 +157,14 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "gtk3-icon-browser.sourcefiles"
- <File RelativePath="..\..\demos\icon-browser\resources.c" />
+ <File RelativePath=".\Release\$(PlatformName)\obj\gtk3-icon-browser\resources.c">
+ <FileConfiguration Name="Debug|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Debug|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
+ <File RelativePath=".\Debug\$(PlatformName)\obj\gtk3-icon-browser\resources.c" >
+ <FileConfiguration Name="Release|Win32" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ <FileConfiguration Name="Release|x64" ExcludedFromBuild="true" ><Tool
Name="VCCLCompilerTool" /></FileConfiguration>
+ </File>
</Filter>
<Filter
Name="Headers"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]