kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22833
[PATCH] Fix Windows resources.
The resource setting for bitmap2component is too late in the
CMakeLists.txt, and is being ignored, so bitmap2component does not have an
icon resource on Windows. Moving the entire section helps.
The other programs only have the mingw special case listed, not the generic
declaration for the resource file, so adding these as these appear for
bitmap2component.
---
bitmap2component/CMakeLists.txt | 15 +++++++--------
cvpcb/CMakeLists.txt | 2 ++
eeschema/CMakeLists.txt | 2 ++
gerbview/CMakeLists.txt | 2 ++
kicad/CMakeLists.txt | 2 ++
pagelayout_editor/CMakeLists.txt | 2 ++
pcb_calculator/CMakeLists.txt | 2 ++
pcbnew/CMakeLists.txt | 2 ++
8 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/bitmap2component/CMakeLists.txt b/bitmap2component/CMakeLists.txt
index bbe2fef..b1d2720 100644
--- a/bitmap2component/CMakeLists.txt
+++ b/bitmap2component/CMakeLists.txt
@@ -20,6 +20,13 @@ set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
COMPILE_DEFINITIONS "COMPILING_DLL"
)
+if( MINGW )
+ # BITMAP2COMPONENT_RESOURCES variable is set by the macro.
+ mingw_resource_compiler( bitmap2component )
+else()
+ set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc )
+endif()
+
if( APPLE )
# setup bundle
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
@@ -80,11 +87,3 @@ if( false ) # linker map with cross reference
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=bitmap2component.map"
)
endif()
-
-
-if( MINGW )
- # BITMAP2COMPONENT_RESOURCES variable is set by the macro.
- mingw_resource_compiler( bitmap2component )
-else()
- set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc )
-endif()
diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt
index 3b9f176..90430b1 100644
--- a/cvpcb/CMakeLists.txt
+++ b/cvpcb/CMakeLists.txt
@@ -57,6 +57,8 @@ set( CVPCB_SRCS
if( MINGW )
# CVPCB_RESOURCES variable is set by the macro.
mingw_resource_compiler( cvpcb )
+else()
+ set( CVPCB_RESOURCES cvpcb.rc )
endif()
diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index fd13769..1537547 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -197,6 +197,8 @@ set( EESCHEMA_COMMON_SRCS
if( MINGW )
# EESCHEMA_RESOURCES variable is set by the macro.
mingw_resource_compiler( eeschema )
+else()
+ set( EESCHEMA_RESOURCES eeschema.rc )
endif()
# Create a C++ compilable string initializer containing html text into a *.h file:
diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt
index e050db9..ff4f252 100644
--- a/gerbview/CMakeLists.txt
+++ b/gerbview/CMakeLists.txt
@@ -78,6 +78,8 @@ set( GERBVIEW_EXTRA_SRCS
if( MINGW )
# GERBVIEW_RESOURCES variable is set by the macro.
mingw_resource_compiler( gerbview )
+else()
+ set( GERBVIEW_RESOURCES gerbview.rc )
endif()
if( APPLE )
diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt
index 887b7b5..f0e2438 100644
--- a/kicad/CMakeLists.txt
+++ b/kicad/CMakeLists.txt
@@ -25,6 +25,8 @@ set( KICAD_SRCS
if( MINGW )
# KICAD_RESOURCES variable is set by the macro.
mingw_resource_compiler( kicad )
+else()
+ set( KICAD_RESOURCES kicad.rc )
endif()
if( APPLE )
diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt
index 094663a..06492bf 100644
--- a/pagelayout_editor/CMakeLists.txt
+++ b/pagelayout_editor/CMakeLists.txt
@@ -50,6 +50,8 @@ set( PL_EDITOR_EXTRA_SRCS
if( MINGW )
# PL_EDITOR_RESOURCES variable is set by the macro.
mingw_resource_compiler( pl_editor )
+else()
+ set( PL_EDITOR_RESOURCES pl_editor.rc )
endif()
diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt
index d82b137..292308c 100644
--- a/pcb_calculator/CMakeLists.txt
+++ b/pcb_calculator/CMakeLists.txt
@@ -40,6 +40,8 @@ set( PCB_CALCULATOR_SRCS
if( MINGW )
# PCB_CALCULATOR_RESOURCES variable is set by the macro.
mingw_resource_compiler( pcb_calculator )
+else()
+ set( PCB_CALCULATOR_RESOURCES pcb_calculator.rc )
endif()
if( APPLE )
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index 6f20b73..7580776 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -499,6 +499,8 @@ endif()
if( MINGW )
# PCBNEW_RESOURCES variable is set by the macro.
mingw_resource_compiler( pcbnew )
+else()
+ set( PCBNEW_RESOURCES pcbnew.rc )
endif()
Follow ups