← Back to team overview

kicad-developers team mailing list archive

[PATCH] [Build] Remove redundant data in defines.

 

* Using CMAKE_INSTALL_PREFIX in KICAD_* install paths is redundant,
  because they are allready relative to CMAKE_INSTALL_PREFIX when no
  absolute path is given.
  Using an absolute path makes it harder to change the install
  path on the fly, without either rebuilding, or manually editing
  CMakeCache.txt

Signed-off-by: Niki Guldbrand <niki.guldbrand@xxxxxxxxx>
---
 CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14325dd..3972a0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -325,7 +325,7 @@ set( KIFACE_PREFIX  "_" )
 #================================================
 if( NOT APPLE )
     # Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
-    set( KICAD_BIN ${CMAKE_INSTALL_PREFIX}/bin
+    set( KICAD_BIN bin
         CACHE PATH "Location of KiCad binaries." )
 
     if( WIN32 )
@@ -341,10 +341,10 @@ if( NOT APPLE )
         set( KICAD_PLUGINS lib/kicad/plugins
             CACHE PATH "Location of KiCad plugins." )
 
-        set( KICAD_LIB ${CMAKE_INSTALL_PREFIX}/lib
+        set( KICAD_LIB lib
             CACHE PATH "Location of KiCad shared objects" )
 
-        set( KICAD_USER_PLUGIN ${CMAKE_INSTALL_PREFIX}/lib/kicad/plugins
+        set( KICAD_USER_PLUGIN lib/kicad/plugins
             CACHE PATH "Location of KiCad user-loaded plugins" )
     endif()
 

Follow ups