diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ffcf669cf..515e0d69cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index eb68a4f6a4..7a0a2203ca 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 1dd4338afc..018bfb0396 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) - install(FILES $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() # auto-generate cmp_library_lexer.h and cmp_library_keywords.cpp for the component diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index e41408813f..11c5e7f745 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) - install(FILES $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt index b3c940aabb..0b8a8de386 100644 --- a/pagelayout_editor/CMakeLists.txt +++ b/pagelayout_editor/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) - install(FILES $ DESTINATION ${KICAD_BIN}) -endif() \ No newline at end of file + install(FILES $ DESTINATION ${KICAD_KIFACE}) +endif() diff --git a/pcb_calculator/CMakeLists.txt b/pcb_calculator/CMakeLists.txt index bd764c55f7..826ff13495 100644 --- a/pcb_calculator/CMakeLists.txt +++ b/pcb_calculator/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) - install(FILES $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() # auto-generate pcb_calculator_datafile.h and pcb_calculator_datafile_keywords.cpp diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 82de09f3ff..364875bcd3 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -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 $ DESTINATION ${KICAD_BIN}) - install(FILES $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() if( NOT APPLE ) diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index 6455ab7120..c5de974098 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -72,18 +72,18 @@ 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 $ DESTINATION ${KICAD_BIN}) + install(FILES $ DESTINATION ${KICAD_KIFACE}) endif() # python shell installation install( DIRECTORY ${PROJECT_SOURCE_DIR}/scripting/kicad_pyshell/ DESTINATION ${KICAD_DATA}/scripting/kicad_pyshell FILE_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ -) \ No newline at end of file +)