Commit 5cd2fad8 authored by f3nix's avatar f3nix

CMake:

* MinGWResourceCompiler: change output directory and name of compiled resource file (old resource object files have to be deleted manually, eg. cvpcb/cvpcb_rc.o since the 'make clean' target does not remove them).
* Add some comments.
parent 721d878f
......@@ -10,7 +10,7 @@ macro(mingw_resource_compiler _NAME)
dbg_msg("_IN: ${_IN}")
# Output file.
set(_OUT "${CMAKE_CURRENT_BINARY_DIR}/${_NAME}_rc.o")
set(_OUT "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_NAME}.dir/${_NAME}_rc.obj")
dbg_msg("_OUT: ${_OUT}")
# Include directories.
......@@ -28,6 +28,7 @@ macro(mingw_resource_compiler _NAME)
add_custom_command(OUTPUT ${_OUT}
COMMAND windres.exe
ARGS ${_ARGS}
COMMENT "Compiling ${_NAME} resource file."
VERBATIM)
# Set a NAME_RESOURCES variable
......
......@@ -58,6 +58,7 @@ set(CVPCB_EXTRA_SRCS
if(WIN32)
if(MINGW)
# CVPCB_RESOURCES variable is set by the macro.
mingw_resource_compiler(cvpcb)
else(MINGW)
set(CVPCB_RESOURCES cvpcb.rc)
......
......@@ -103,6 +103,7 @@ set(EESCHEMA_EXTRA_SRCS
if(WIN32)
if(MINGW)
# EESCHEMA_RESOURCES variable is set by the macro.
mingw_resource_compiler(eeschema)
else(MINGW)
set(EESCHEMA_RESOURCES eeschema.rc)
......
......@@ -60,6 +60,7 @@ set(GERBVIEW_EXTRA_SRCS
if(WIN32)
if(MINGW)
# GERBVIEW_RESOURCES variable is set by the macro.
mingw_resource_compiler(gerbview)
else(MINGW)
set(GERBVIEW_RESOURCES gerbview.rc)
......
......@@ -15,6 +15,7 @@ set(KICAD_SRCS
if(WIN32)
if(MINGW)
# KICAD_RESOURCES variable is set by the macro.
mingw_resource_compiler(kicad)
else(MINGW)
set(KICAD_RESOURCES kicad.rc)
......
......@@ -151,6 +151,7 @@ set(PCBNEW_EXTRA_SRCS
if(WIN32)
if(MINGW)
# PCBNEW_RESOURCES variable is set by the macro.
mingw_resource_compiler(pcbnew)
else(MINGW)
set(PCBNEW_RESOURCES pcbnew.rc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment