CMake build: preliminary support for install targets under linux.
This commit is contained in:
parent
8c6f6facff
commit
7a65708459
|
@ -1,7 +1,8 @@
|
||||||
TODO:
|
TODO:
|
||||||
* Fix kicad/minizip.
|
* Fix kicad/minizip.
|
||||||
* Fix eeschema/plugins.
|
* Fix eeschema/plugins.
|
||||||
* Add install targets for binaries, docs, translations, libraries.
|
* Add install targets for binaries, docs, translations, libraries (Windows, Mac).
|
||||||
|
Linux version has a preliminary support.
|
||||||
* Add DEBUG target.
|
* Add DEBUG target.
|
||||||
* Testing under Windows and Mac.
|
* Testing under Windows and Mac.
|
||||||
* More testing ...
|
* More testing ...
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
PROJECT(kicad)
|
PROJECT(kicad)
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
|
||||||
|
|
||||||
#SET(CMAKE_VERBOSE_MAKEFILE ON)
|
#SET(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
|
|
||||||
|
@ -8,6 +8,26 @@ SET(wxWidgets_USE_LIBS base core adv gl html net)
|
||||||
|
|
||||||
FIND_PACKAGE(wxWidgets REQUIRED)
|
FIND_PACKAGE(wxWidgets REQUIRED)
|
||||||
|
|
||||||
|
#Locations for install targets
|
||||||
|
IF(UNIX)
|
||||||
|
#SET(CMAKE_INSTALL_PATH /usr/local)
|
||||||
|
SET(KICAD_BIN bin 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)
|
||||||
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
#Should this go to IF(UNIX)?
|
||||||
|
IF(APPLE)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
IF(wxWidgets_FOUND)
|
IF(wxWidgets_FOUND)
|
||||||
MESSAGE("-- wxWidgets found")
|
MESSAGE("-- wxWidgets found")
|
||||||
|
|
||||||
|
@ -27,3 +47,8 @@ IF(wxWidgets_FOUND)
|
||||||
ELSE(wxWidgets_FOUND)
|
ELSE(wxWidgets_FOUND)
|
||||||
MESSAGE("wxWidgets is required to build KiCad!")
|
MESSAGE("wxWidgets is required to build KiCad!")
|
||||||
ENDIF(wxWidgets_FOUND)
|
ENDIF(wxWidgets_FOUND)
|
||||||
|
|
||||||
|
ADD_SUBDIRECTORY(internat)
|
||||||
|
ADD_SUBDIRECTORY(library)
|
||||||
|
ADD_SUBDIRECTORY(modules)
|
||||||
|
ADD_SUBDIRECTORY(template)
|
||||||
|
|
|
@ -65,4 +65,4 @@ ADD_EXECUTABLE(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVP
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(cvpcb common 3d-viewer ${wxWidgets_LIBRARIES})
|
TARGET_LINK_LIBRARIES(cvpcb common 3d-viewer ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
INSTALL(PROGRAMS cvpcb DESTINATION /bin)
|
INSTALL(TARGETS cvpcb RUNTIME DESTINATION ${KICAD_BIN})
|
||||||
|
|
|
@ -120,6 +120,6 @@ ADD_EXECUTABLE(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SR
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(eeschema common ${wxWidgets_LIBRARIES})
|
TARGET_LINK_LIBRARIES(eeschema common ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
INSTALL(PROGRAMS eeschema DESTINATION /bin)
|
INSTALL(TARGETS eeschema RUNTIME DESTINATION ${KICAD_BIN})
|
||||||
|
|
||||||
#ADD_SUBDIRECTORY(plugins)
|
#ADD_SUBDIRECTORY(plugins)
|
||||||
|
|
|
@ -4,5 +4,5 @@ CHECK_FUNCTION_EXISTS(stricmp HAVE_STRICMP)
|
||||||
IF(HAVE_STRICMP)
|
IF(HAVE_STRICMP)
|
||||||
ADD_EXECUTABLE(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
|
ADD_EXECUTABLE(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
|
||||||
|
|
||||||
INSTALL(PROGRAMS netlist_form_pads-pcb DESTINATION /bin)
|
INSTALL(TARGETS netlist_form_pads-pcb RUNTIME DESTINATION ${KICAD_PLUGINS})
|
||||||
ENDIF(HAVE_STRICMP)
|
ENDIF(HAVE_STRICMP)
|
||||||
|
|
|
@ -66,4 +66,4 @@ ADD_EXECUTABLE(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SR
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(gerbview common 3d-viewer ${wxWidgets_LIBRARIES})
|
TARGET_LINK_LIBRARIES(gerbview common 3d-viewer ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
INSTALL(PROGRAMS gerbview DESTINATION /bin)
|
INSTALL(TARGETS gerbview RUNTIME DESTINATION ${KICAD_BIN})
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
INSTALL(DIRECTORY ca cs de es fr hu it ko pl pt ru sl
|
||||||
|
DESTINATION ${KICAD_INTERNAT}
|
||||||
|
PATTERN ".svn" EXCLUDE)
|
|
@ -27,6 +27,6 @@ ADD_EXECUTABLE(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KIC
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES})
|
TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
INSTALL(PROGRAMS kicad DESTINATION /bin)
|
INSTALL(TARGETS kicad RUNTIME DESTINATION ${KICAD_BIN})
|
||||||
|
|
||||||
#ADD_SUBDIRECTORY(minizip)
|
#ADD_SUBDIRECTORY(minizip)
|
||||||
|
|
|
@ -8,4 +8,4 @@ SET(MINIZIP_SRCS
|
||||||
|
|
||||||
ADD_EXECUTABLE(minizip ${MINIZIP_SRCS})
|
ADD_EXECUTABLE(minizip ${MINIZIP_SRCS})
|
||||||
|
|
||||||
INSTALL(PROGRAMS minizip DESTINATION /bin)
|
INSTALL(TARGETS minizip RUNTIME DESTINATION bin)
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
FILE(GLOB dcm_files "*.dcm")
|
||||||
|
FILE(GLOB lib_files "*.lib")
|
||||||
|
FILE(GLOB sym_files "*.sym")
|
||||||
|
|
||||||
|
INSTALL(FILES ${dcm_files} DESTINATION ${KICAD_LIBRARY})
|
||||||
|
INSTALL(FILES ${lib_files} DESTINATION ${KICAD_LIBRARY})
|
||||||
|
INSTALL(FILES ${sym_files} DESTINATION ${KICAD_LIBRARY})
|
|
@ -0,0 +1,12 @@
|
||||||
|
FILE(GLOB brd_files "*.brd")
|
||||||
|
FILE(GLOB equ_files "*.equ")
|
||||||
|
FILE(GLOB mdc_files "*.mdc")
|
||||||
|
FILE(GLOB mod_files "*.mod")
|
||||||
|
|
||||||
|
INSTALL(FILES ${brd_files} DESTINATION ${KICAD_MODULES})
|
||||||
|
INSTALL(FILES ${equ_files} DESTINATION ${KICAD_MODULES})
|
||||||
|
INSTALL(FILES ${mdc_files} DESTINATION ${KICAD_MODULES})
|
||||||
|
INSTALL(FILES ${mod_files} DESTINATION ${KICAD_MODULES})
|
||||||
|
|
||||||
|
INSTALL(DIRECTORY packages3d DESTINATION ${KICAD_MODULES}
|
||||||
|
PATTERN ".svn" EXCLUDE)
|
|
@ -145,4 +145,4 @@ ADD_EXECUTABLE(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(pcbnew common 3d-viewer ${wxWidgets_LIBRARIES})
|
TARGET_LINK_LIBRARIES(pcbnew common 3d-viewer ${wxWidgets_LIBRARIES})
|
||||||
|
|
||||||
INSTALL(PROGRAMS pcbnew DESTINATION /bin)
|
INSTALL(TARGETS pcbnew RUNTIME DESTINATION ${KICAD_BIN})
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
INSTALL(FILES kicad.pro
|
||||||
|
DESTINATION ${KICAD_TEMPLATE})
|
Loading…
Reference in New Issue