Some tweaks for Windows CMake.

This commit is contained in:
f3nix 2007-12-26 03:48:17 +00:00
parent 36950919c6
commit cda4ed9659
6 changed files with 58 additions and 15 deletions

View File

@ -44,16 +44,15 @@ ENDIF(UNIX)
IF(WIN32)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
SET(CMAKE_INSTALL_PREFIX C:/kicad)
SET(CMAKE_INSTALL_PREFIX c:/kicad)
# When used later, "winexe" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
SET(KICAD_BIN winexe CACHE PATH "Location of KiCad binaries.")
SET(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
SET(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
SET(KICAD_MODULES ${KICAD_DATA}/modules)
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
SET(KICAD_PLUGINS ${KICAD_BIN}/plugins)
SET(KICAD_DOCS help)
SET(KICAD_MODULES modules)
SET(KICAD_LIBRARY library)
SET(KICAD_INTERNAT internat)
SET(KICAD_TEMPLATE template)
ENDIF(WIN32)
# Did we find wxWidgets ? This condition will fail

View File

@ -55,7 +55,16 @@ SET(CVPCB_EXTRA_SRCS
../share/zoom.cpp)
IF(WIN32)
IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}
-i ${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
SET(CVPCB_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
ELSE(MINGW)
SET(CVPCB_RESOURCES cvpcb.rc)
ENDIF(MINGW)
ENDIF(WIN32)
IF(APPLE)
SET(CVPCB_RESOURCES cvpcb.r)

View File

@ -101,11 +101,19 @@ SET(EESCHEMA_EXTRA_SRCS
../share/setpage.cpp
../share/svg_print.cpp
../share/wxprint.cpp
../share/zoom.cpp
)
../share/zoom.cpp)
IF(WIN32)
IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}
-i ${CMAKE_CURRENT_SOURCE_DIR}/eeschema.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
SET(EESCHEMA_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
ELSE(MINGW)
SET(EESCHEMA_RESOURCES eeschema.rc)
ENDIF(MINGW)
ENDIF(WIN32)
IF(APPLE)
SET(EESCHEMA_RESOURCES eeschema.r)

View File

@ -57,7 +57,16 @@ SET(GERBVIEW_EXTRA_SRCS
../share/zoom.cpp)
IF(WIN32)
IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}
-i ${CMAKE_CURRENT_SOURCE_DIR}/gerbview.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
SET(GERBVIEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
ELSE(MINGW)
SET(GERBVIEW_RESOURCES gerbview.rc)
ENDIF(MINGW)
ENDIF(WIN32)
IF(APPLE)
SET(GERBVIEW_RESOURCES gerbview.r)

View File

@ -17,7 +17,16 @@ SET(KICAD_EXTRA_SRCS
../share/infospgm.cpp)
IF(WIN32)
IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}
-i ${CMAKE_CURRENT_SOURCE_DIR}/kicad.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
SET(KICAD_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
ELSE(MINGW)
SET(KICAD_RESOURCES kicad.rc)
ENDIF(MINGW)
ENDIF(WIN32)
IF(APPLE)
SET(KICAD_RESOURCES kicad.r)

View File

@ -149,7 +149,16 @@ SET(PCBNEW_EXTRA_SRCS
../share/zoom.cpp)
IF(WIN32)
IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}
-i ${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o)
SET(PCBNEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o)
ELSE(MINGW)
SET(PCBNEW_RESOURCES pcbnew.rc)
ENDIF(MINGW)
ENDIF(WIN32)
IF(APPLE)
SET(PCBNEW_RESOURCES pcbnew.r)