Introduce new CMake variable to store kiface install location

This commit is contained in:
Ian McInerney 2022-06-22 22:33:46 +01:00
parent 3ddd287004
commit b51d8c9825
8 changed files with 28 additions and 18 deletions

View File

@ -550,8 +550,17 @@ set( KIFACE_PREFIX "_" )
#================================================
if( NOT APPLE )
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set( KICAD_BIN bin
CACHE PATH "Location of KiCad binaries." )
if( WIN32 )
set( KICAD_BIN bin
CACHE PATH "Location of KiCad binaries." )
else()
set( KICAD_BIN ${CMAKE_INSTALL_BINDIR}
CACHE PATH "Location of KiCad binaries." )
endif()
# For now, the kifaces are just in the normal bin folder
set( KICAD_KIFACE ${KICAD_BIN}
CACHE PATH "Location of KiCad kifaces." )
# Do not make these variables "PATH" b/c cmake will truncate them and we need the full path
if( NOT IS_ABSOLUTE ${CMAKE_INSTALL_DATADIR} )
@ -663,6 +672,7 @@ else()
endif()
mark_as_advanced( KICAD_BIN
KICAD_KIFACE
KICAD_PLUGINS
KICAD_USER_PLUGIN
KICAD_LIB

View File

@ -106,12 +106,12 @@ if( APPLE )
)
else()
install( TARGETS cvpcb_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:cvpcb_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:cvpcb_kiface> DESTINATION ${KICAD_KIFACE})
endif()

View File

@ -527,7 +527,7 @@ else()
install( TARGETS eeschema_kiface
# actual filename subject to change at milestone C)
# modular-kicad blueprint.
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
@ -536,7 +536,7 @@ endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:eeschema> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:eeschema_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:eeschema_kiface> DESTINATION ${KICAD_KIFACE})
endif()
# auto-generate cmp_library_lexer.h and cmp_library_keywords.cpp for the component

View File

@ -205,7 +205,7 @@ else()
COMPONENT binary
)
install( TARGETS gerbview_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
@ -214,5 +214,5 @@ endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:gerbview> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:gerbview_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:gerbview_kiface> DESTINATION ${KICAD_KIFACE})
endif()

View File

@ -168,7 +168,7 @@ else()
COMPONENT binary
)
install( TARGETS pl_editor_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
@ -176,5 +176,5 @@ endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pl_editor> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pl_editor_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pl_editor_kiface> DESTINATION ${KICAD_KIFACE})
endif()

View File

@ -161,7 +161,7 @@ else()
COMPONENT binary
)
install( TARGETS pcb_calculator_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
@ -169,7 +169,7 @@ endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pcb_calculator> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcb_calculator_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcb_calculator_kiface> DESTINATION ${KICAD_KIFACE})
endif()
# auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp

View File

@ -783,7 +783,7 @@ else()
COMPONENT binary
)
install( TARGETS pcbnew_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
@ -791,7 +791,7 @@ endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:pcbnew> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:pcbnew_kiface> DESTINATION ${KICAD_KIFACE})
endif()
if( NOT APPLE )

View File

@ -72,14 +72,14 @@ if( APPLE )
)
else()
install( TARGETS scripting_kiface
DESTINATION ${KICAD_BIN}
DESTINATION ${KICAD_KIFACE}
COMPONENT binary
)
endif()
if( KICAD_WIN32_INSTALL_PDBS )
# Get the PDBs to copy over for MSVC
install(FILES $<TARGET_PDB_FILE:scripting_kiface> DESTINATION ${KICAD_BIN})
install(FILES $<TARGET_PDB_FILE:scripting_kiface> DESTINATION ${KICAD_KIFACE})
endif()
# python shell installation