Some tweaks for Windows CMake.
This commit is contained in:
parent
36950919c6
commit
cda4ed9659
|
@ -44,16 +44,15 @@ ENDIF(UNIX)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
# 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.
|
# 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_BIN winexe CACHE PATH "Location of KiCad binaries.")
|
||||||
SET(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
|
SET(KICAD_PLUGINS ${KICAD_BIN}/plugins)
|
||||||
SET(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
|
SET(KICAD_DOCS help)
|
||||||
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
SET(KICAD_MODULES modules)
|
||||||
SET(KICAD_MODULES ${KICAD_DATA}/modules)
|
SET(KICAD_LIBRARY library)
|
||||||
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
|
SET(KICAD_INTERNAT internat)
|
||||||
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
|
SET(KICAD_TEMPLATE template)
|
||||||
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
# Did we find wxWidgets ? This condition will fail
|
# Did we find wxWidgets ? This condition will fail
|
||||||
|
|
|
@ -55,7 +55,16 @@ SET(CVPCB_EXTRA_SRCS
|
||||||
../share/zoom.cpp)
|
../share/zoom.cpp)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(CVPCB_RESOURCES cvpcb.rc)
|
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)
|
ENDIF(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(CVPCB_RESOURCES cvpcb.r)
|
SET(CVPCB_RESOURCES cvpcb.r)
|
||||||
|
|
|
@ -101,11 +101,19 @@ SET(EESCHEMA_EXTRA_SRCS
|
||||||
../share/setpage.cpp
|
../share/setpage.cpp
|
||||||
../share/svg_print.cpp
|
../share/svg_print.cpp
|
||||||
../share/wxprint.cpp
|
../share/wxprint.cpp
|
||||||
../share/zoom.cpp
|
../share/zoom.cpp)
|
||||||
)
|
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(EESCHEMA_RESOURCES eeschema.rc)
|
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)
|
ENDIF(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(EESCHEMA_RESOURCES eeschema.r)
|
SET(EESCHEMA_RESOURCES eeschema.r)
|
||||||
|
|
|
@ -57,7 +57,16 @@ SET(GERBVIEW_EXTRA_SRCS
|
||||||
../share/zoom.cpp)
|
../share/zoom.cpp)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(GERBVIEW_RESOURCES gerbview.rc)
|
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)
|
ENDIF(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(GERBVIEW_RESOURCES gerbview.r)
|
SET(GERBVIEW_RESOURCES gerbview.r)
|
||||||
|
|
|
@ -17,7 +17,16 @@ SET(KICAD_EXTRA_SRCS
|
||||||
../share/infospgm.cpp)
|
../share/infospgm.cpp)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(KICAD_RESOURCES kicad.rc)
|
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)
|
ENDIF(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(KICAD_RESOURCES kicad.r)
|
SET(KICAD_RESOURCES kicad.r)
|
||||||
|
|
|
@ -149,7 +149,16 @@ SET(PCBNEW_EXTRA_SRCS
|
||||||
../share/zoom.cpp)
|
../share/zoom.cpp)
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(PCBNEW_RESOURCES pcbnew.rc)
|
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)
|
ENDIF(WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(PCBNEW_RESOURCES pcbnew.r)
|
SET(PCBNEW_RESOURCES pcbnew.r)
|
||||||
|
|
Loading…
Reference in New Issue