diff --git a/CMakeLists.txt b/CMakeLists.txt index a263da35d..9ac5faebb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,13 +69,20 @@ if(WIN32) SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation root directory") else(WIN32) SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory") - SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") endif(WIN32) SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files") SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files") SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files") - +# Don't set it without manual adaption of LibDir variable in src/App/FreeCADInit.py +SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") + +if(NOT WIN32) + if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) + SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + endif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) +endif(NOT WIN32) + SET(PYCXX_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/src" CACHE PATH "Path to the directory containing PyCXX's CXX/Config.hxx include file") @@ -91,6 +98,7 @@ MESSAGE(STATUS "prefix: ${CMAKE_INSTALL_PREFIX}") MESSAGE(STATUS "datadir: ${CMAKE_INSTALL_DATADIR}") MESSAGE(STATUS "docdir: ${CMAKE_INSTALL_DOCDIR}") MESSAGE(STATUS "includedir: ${CMAKE_INSTALL_INCLUDEDIR}") +MESSAGE(STATUS "libdir: ${CMAKE_INSTALL_LIBDIR}") # ============================================================================== # == Win32 is default behaviour use the LibPack copied in Source tree ========== diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake index 9197b2e39..981f43294 100644 --- a/cMake/FreeCadMacros.cmake +++ b/cMake/FreeCadMacros.cmake @@ -230,12 +230,15 @@ MACRO(SET_BIN_DIR ProjectName OutputName) if(WIN32) set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d) else(WIN32) - if(${ARGC} STREQUAL 4) - set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3}) - else(${ARGC} STREQUAL 4) - set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${INSTALL_RPATH}) - endif(${ARGC} STREQUAL 4) - endif(WIN32) + # FreeCADBase, SMDS, Driver and MEFISTO2 libs don't depend on parts from CMAKE_INSTALL_LIBDIR + if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$") + if(${ARGC} STREQUAL 4) + set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3}) + else(${ARGC} STREQUAL 4) + set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR}) + endif(${ARGC} STREQUAL 4) + endif(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$") + endif(WIN32) ENDMACRO(SET_BIN_DIR) # Set python prefix & suffix together diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt index df7360146..a07903f8c 100644 --- a/src/3rdParty/salomesmesh/CMakeLists.txt +++ b/src/3rdParty/salomesmesh/CMakeLists.txt @@ -368,7 +368,7 @@ if(WIN32) ) else(WIN32) INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) @@ -380,7 +380,7 @@ if (FREECAD_BUILD_FEM_NETGEN) ) else(WIN32) INSTALL(TARGETS NETGENPlugin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) endif (FREECAD_BUILD_FEM_NETGEN) diff --git a/src/App/CMakeLists.txt b/src/App/CMakeLists.txt index 713610bd4..238c89b2d 100644 --- a/src/App/CMakeLists.txt +++ b/src/App/CMakeLists.txt @@ -182,10 +182,10 @@ SET_BIN_DIR(FreeCADApp FreeCADApp) if(WIN32) INSTALL(TARGETS FreeCADApp RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADApp - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) diff --git a/src/Base/CMakeLists.txt b/src/Base/CMakeLists.txt index e30d237eb..83b6ae503 100644 --- a/src/Base/CMakeLists.txt +++ b/src/Base/CMakeLists.txt @@ -324,10 +324,10 @@ SET_BIN_DIR(FreeCADBase FreeCADBase) if(WIN32) INSTALL(TARGETS FreeCADBase RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADBase - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 157454454..3a984804c 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -937,11 +937,11 @@ SET_BIN_DIR(FreeCADGui FreeCADGui) if(WIN32) INSTALL(TARGETS FreeCADGui RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADGui - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) INSTALL(FILES Icons/freecad.xpm Icons/freecad-icon-16.png diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt index 7c867df6c..0078b2e0b 100644 --- a/src/Main/CMakeLists.txt +++ b/src/Main/CMakeLists.txt @@ -50,7 +50,7 @@ if(FREECAD_BUILD_GUI) if(WIN32) INSTALL(TARGETS FreeCADMain RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADMain @@ -76,7 +76,7 @@ SET_BIN_DIR(FreeCADMainCmd FreeCADCmd) if(WIN32) INSTALL(TARGETS FreeCADMainCmd RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADMainCmd @@ -100,11 +100,11 @@ SET_PYTHON_PREFIX_SUFFIX(FreeCADMainPy) if(WIN32) INSTALL(TARGETS FreeCADMainPy RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADMainPy - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) @@ -131,11 +131,11 @@ if(FREECAD_BUILD_GUI) if(WIN32) INSTALL(TARGETS FreeCADGuiPy RUNTIME DESTINATION bin - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else(WIN32) INSTALL(TARGETS FreeCADGuiPy - LIBRARY DESTINATION lib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) endif(FREECAD_BUILD_GUI) diff --git a/src/Mod/Assembly/App/CMakeLists.txt b/src/Mod/Assembly/App/CMakeLists.txt index a4f28dbbf..ecf917271 100644 --- a/src/Mod/Assembly/App/CMakeLists.txt +++ b/src/Mod/Assembly/App/CMakeLists.txt @@ -33,4 +33,4 @@ fc_target_copy_resource(Assembly SET_BIN_DIR(Assembly Assembly /Mod/Assembly) SET_PYTHON_PREFIX_SUFFIX(Assembly) -INSTALL(TARGETS Assembly DESTINATION lib) +INSTALL(TARGETS Assembly DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Assembly/Gui/CMakeLists.txt b/src/Mod/Assembly/Gui/CMakeLists.txt index aa0e90504..72abf33f7 100644 --- a/src/Mod/Assembly/Gui/CMakeLists.txt +++ b/src/Mod/Assembly/Gui/CMakeLists.txt @@ -43,4 +43,4 @@ fc_target_copy_resource(AssemblyGui SET_BIN_DIR(AssemblyGui AssemblyGui /Mod/Assembly) SET_PYTHON_PREFIX_SUFFIX(AssemblyGui) -INSTALL(TARGETS AssemblyGui DESTINATION lib) +INSTALL(TARGETS AssemblyGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Cam/App/CMakeLists.txt b/src/Mod/Cam/App/CMakeLists.txt index cc484753f..1320150f6 100644 --- a/src/Mod/Cam/App/CMakeLists.txt +++ b/src/Mod/Cam/App/CMakeLists.txt @@ -99,4 +99,4 @@ if(WIN32) set_target_properties(Cam PROPERTIES SUFFIX ".pyd") endif(WIN32) -INSTALL(TARGETS Cam DESTINATION lib) +INSTALL(TARGETS Cam DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Cam/Gui/CMakeLists.txt b/src/Mod/Cam/Gui/CMakeLists.txt index 1c72e64a2..f5f111f67 100644 --- a/src/Mod/Cam/Gui/CMakeLists.txt +++ b/src/Mod/Cam/Gui/CMakeLists.txt @@ -76,4 +76,4 @@ if(WIN32) set_target_properties(CamGui PROPERTIES SUFFIX ".pyd") endif(WIN32) -INSTALL(TARGETS CamGui DESTINATION lib) +INSTALL(TARGETS CamGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Complete/App/CMakeLists.txt b/src/Mod/Complete/App/CMakeLists.txt index 474cc51bc..6eee6342a 100644 --- a/src/Mod/Complete/App/CMakeLists.txt +++ b/src/Mod/Complete/App/CMakeLists.txt @@ -33,4 +33,4 @@ fc_target_copy_resource(Complete SET_BIN_DIR(Complete Complete /Mod/Complete) SET_PYTHON_PREFIX_SUFFIX(Complete) -INSTALL(TARGETS Complete DESTINATION lib) +INSTALL(TARGETS Complete DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Complete/Gui/CMakeLists.txt b/src/Mod/Complete/Gui/CMakeLists.txt index fcf930872..2f566ceb6 100644 --- a/src/Mod/Complete/Gui/CMakeLists.txt +++ b/src/Mod/Complete/Gui/CMakeLists.txt @@ -39,4 +39,4 @@ fc_target_copy_resource(CompleteGui SET_BIN_DIR(CompleteGui CompleteGui /Mod/Complete) SET_PYTHON_PREFIX_SUFFIX(CompleteGui) -install(TARGETS CompleteGui DESTINATION lib) +install(TARGETS CompleteGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Drawing/App/CMakeLists.txt b/src/Mod/Drawing/App/CMakeLists.txt index d394c568e..d911c6f49 100644 --- a/src/Mod/Drawing/App/CMakeLists.txt +++ b/src/Mod/Drawing/App/CMakeLists.txt @@ -89,4 +89,4 @@ fc_target_copy_resource(Drawing SET_BIN_DIR(Drawing Drawing /Mod/Drawing) SET_PYTHON_PREFIX_SUFFIX(Drawing) -INSTALL(TARGETS Drawing DESTINATION lib) +INSTALL(TARGETS Drawing DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Drawing/Gui/CMakeLists.txt b/src/Mod/Drawing/Gui/CMakeLists.txt index 35b3155bb..dc09180d3 100644 --- a/src/Mod/Drawing/Gui/CMakeLists.txt +++ b/src/Mod/Drawing/Gui/CMakeLists.txt @@ -99,4 +99,4 @@ fc_target_copy_resource(DrawingGui SET_BIN_DIR(DrawingGui DrawingGui /Mod/Drawing) SET_PYTHON_PREFIX_SUFFIX(DrawingGui) -INSTALL(TARGETS DrawingGui DESTINATION lib) +INSTALL(TARGETS DrawingGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt index c320ff8dd..923ca32c8 100755 --- a/src/Mod/Fem/App/CMakeLists.txt +++ b/src/Mod/Fem/App/CMakeLists.txt @@ -159,4 +159,4 @@ fc_target_copy_resource(Fem SET_BIN_DIR(Fem Fem /Mod/Fem) SET_PYTHON_PREFIX_SUFFIX(Fem) -INSTALL(TARGETS Fem DESTINATION lib) +INSTALL(TARGETS Fem DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Fem/Gui/CMakeLists.txt b/src/Mod/Fem/Gui/CMakeLists.txt index dc8988e28..35d93abe5 100755 --- a/src/Mod/Fem/Gui/CMakeLists.txt +++ b/src/Mod/Fem/Gui/CMakeLists.txt @@ -208,4 +208,4 @@ fc_target_copy_resource(FemGui SET_BIN_DIR(FemGui FemGui /Mod/Fem) SET_PYTHON_PREFIX_SUFFIX(FemGui) -INSTALL(TARGETS FemGui DESTINATION lib) +INSTALL(TARGETS FemGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Image/App/CMakeLists.txt b/src/Mod/Image/App/CMakeLists.txt index ba8faa426..81923a36a 100644 --- a/src/Mod/Image/App/CMakeLists.txt +++ b/src/Mod/Image/App/CMakeLists.txt @@ -40,4 +40,4 @@ fc_target_copy_resource(Image SET_BIN_DIR(Image Image /Mod/Image) SET_PYTHON_PREFIX_SUFFIX(Image) -INSTALL(TARGETS Image DESTINATION lib) +INSTALL(TARGETS Image DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Image/Gui/CMakeLists.txt b/src/Mod/Image/Gui/CMakeLists.txt index f455d0d45..572af48fd 100644 --- a/src/Mod/Image/Gui/CMakeLists.txt +++ b/src/Mod/Image/Gui/CMakeLists.txt @@ -72,4 +72,4 @@ fc_target_copy_resource(ImageGui SET_BIN_DIR(ImageGui ImageGui /Mod/Image) SET_PYTHON_PREFIX_SUFFIX(ImageGui) -INSTALL(TARGETS ImageGui DESTINATION lib) +INSTALL(TARGETS ImageGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Import/App/CMakeLists.txt b/src/Mod/Import/App/CMakeLists.txt index e63783971..8b6f6e958 100644 --- a/src/Mod/Import/App/CMakeLists.txt +++ b/src/Mod/Import/App/CMakeLists.txt @@ -73,4 +73,4 @@ fc_target_copy_resource(ImportPy SET_BIN_DIR(Import Import /Mod/Import) SET_PYTHON_PREFIX_SUFFIX(Import) -INSTALL(TARGETS Import DESTINATION lib) +INSTALL(TARGETS Import DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Import/Gui/CMakeLists.txt b/src/Mod/Import/Gui/CMakeLists.txt index 35809df91..02903f9a5 100644 --- a/src/Mod/Import/Gui/CMakeLists.txt +++ b/src/Mod/Import/Gui/CMakeLists.txt @@ -50,4 +50,4 @@ fc_target_copy_resource(ImportGui SET_BIN_DIR(ImportGui ImportGui /Mod/Import) SET_PYTHON_PREFIX_SUFFIX(ImportGui) -INSTALL(TARGETS ImportGui DESTINATION lib) +INSTALL(TARGETS ImportGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Inspection/App/CMakeLists.txt b/src/Mod/Inspection/App/CMakeLists.txt index 73d0e8ae0..c04aa7f12 100644 --- a/src/Mod/Inspection/App/CMakeLists.txt +++ b/src/Mod/Inspection/App/CMakeLists.txt @@ -46,4 +46,4 @@ fc_target_copy_resource(Inspection SET_BIN_DIR(Inspection Inspection /Mod/Inspection) SET_PYTHON_PREFIX_SUFFIX(Inspection) -INSTALL(TARGETS Inspection DESTINATION lib) +INSTALL(TARGETS Inspection DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Inspection/Gui/CMakeLists.txt b/src/Mod/Inspection/Gui/CMakeLists.txt index 162b23cee..b60d0e536 100644 --- a/src/Mod/Inspection/Gui/CMakeLists.txt +++ b/src/Mod/Inspection/Gui/CMakeLists.txt @@ -62,4 +62,4 @@ fc_target_copy_resource(InspectionGui SET_BIN_DIR(InspectionGui InspectionGui /Mod/Inspection) SET_PYTHON_PREFIX_SUFFIX(InspectionGui) -INSTALL(TARGETS InspectionGui DESTINATION lib) +INSTALL(TARGETS InspectionGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Mesh/App/CMakeLists.txt b/src/Mod/Mesh/App/CMakeLists.txt index 4315c6498..270555614 100644 --- a/src/Mod/Mesh/App/CMakeLists.txt +++ b/src/Mod/Mesh/App/CMakeLists.txt @@ -354,4 +354,4 @@ fc_target_copy_resource(Mesh SET_BIN_DIR(Mesh Mesh /Mod/Mesh) SET_PYTHON_PREFIX_SUFFIX(Mesh) -INSTALL(TARGETS Mesh DESTINATION lib) +INSTALL(TARGETS Mesh DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Mesh/Gui/CMakeLists.txt b/src/Mod/Mesh/Gui/CMakeLists.txt index a7018377f..75cde5486 100644 --- a/src/Mod/Mesh/Gui/CMakeLists.txt +++ b/src/Mod/Mesh/Gui/CMakeLists.txt @@ -132,4 +132,4 @@ fc_target_copy_resource(MeshGui SET_BIN_DIR(MeshGui MeshGui /Mod/Mesh) SET_PYTHON_PREFIX_SUFFIX(MeshGui) -INSTALL(TARGETS MeshGui DESTINATION lib) +INSTALL(TARGETS MeshGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/MeshPart/App/CMakeLists.txt b/src/Mod/MeshPart/App/CMakeLists.txt index a102f4607..cc8e92be5 100644 --- a/src/Mod/MeshPart/App/CMakeLists.txt +++ b/src/Mod/MeshPart/App/CMakeLists.txt @@ -70,4 +70,4 @@ fc_target_copy_resource(MeshPart SET_BIN_DIR(MeshPart MeshPart /Mod/MeshPart) SET_PYTHON_PREFIX_SUFFIX(MeshPart) -INSTALL(TARGETS MeshPart DESTINATION lib) +INSTALL(TARGETS MeshPart DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/MeshPart/Gui/CMakeLists.txt b/src/Mod/MeshPart/Gui/CMakeLists.txt index 5af9950bd..4a7363fa2 100644 --- a/src/Mod/MeshPart/Gui/CMakeLists.txt +++ b/src/Mod/MeshPart/Gui/CMakeLists.txt @@ -73,4 +73,4 @@ fc_target_copy_resource(MeshPartGui SET_BIN_DIR(MeshPartGui MeshPartGui /Mod/MeshPart) SET_PYTHON_PREFIX_SUFFIX(MeshPartGui) -INSTALL(TARGETS MeshPartGui DESTINATION lib) +INSTALL(TARGETS MeshPartGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Part/App/CMakeLists.txt b/src/Mod/Part/App/CMakeLists.txt index 89100d3c0..16d115300 100644 --- a/src/Mod/Part/App/CMakeLists.txt +++ b/src/Mod/Part/App/CMakeLists.txt @@ -266,4 +266,4 @@ fc_target_copy_resource(Part SET_BIN_DIR(Part Part /Mod/Part) SET_PYTHON_PREFIX_SUFFIX(Part) -INSTALL(TARGETS Part DESTINATION lib) +INSTALL(TARGETS Part DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt index 78754685d..c2d66d30f 100644 --- a/src/Mod/Part/Gui/CMakeLists.txt +++ b/src/Mod/Part/Gui/CMakeLists.txt @@ -234,4 +234,4 @@ fc_target_copy_resource(PartGui SET_BIN_DIR(PartGui PartGui /Mod/Part) SET_PYTHON_PREFIX_SUFFIX(PartGui) -INSTALL(TARGETS PartGui DESTINATION lib) +INSTALL(TARGETS PartGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/PartDesign/App/CMakeLists.txt b/src/Mod/PartDesign/App/CMakeLists.txt index b9028502f..544e97184 100644 --- a/src/Mod/PartDesign/App/CMakeLists.txt +++ b/src/Mod/PartDesign/App/CMakeLists.txt @@ -108,6 +108,7 @@ SET(PartDesign_Scripts Scripts/Gear.py Scripts/DistanceBolt.py Scripts/Epitrochoid.py + Scripts/FilletArc.py Scripts/RadialCopy.py Scripts/Parallelepiped.py Scripts/Spring.py @@ -127,11 +128,8 @@ fc_target_copy_resource(PartDesign ${CMAKE_BINARY_DIR}/Mod/PartDesign ${PartDesign_Scripts}) -# See link for why this module is installed differently from the other modules: -# http://forum.freecadweb.org/viewtopic.php?f=19&t=5444 -SET_BIN_DIR(PartDesign PartDesign /Mod/PartDesign /Mod/PartDesign) +SET_BIN_DIR(PartDesign PartDesign /Mod/PartDesign) SET_PYTHON_PREFIX_SUFFIX(PartDesign) -# The PartDesign module must go to where the __init__.py file is -INSTALL(TARGETS PartDesign DESTINATION Mod/PartDesign) +INSTALL(TARGETS PartDesign DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/PartDesign/Gui/CMakeLists.txt b/src/Mod/PartDesign/Gui/CMakeLists.txt index 7c0d720ff..33a78e24d 100644 --- a/src/Mod/PartDesign/Gui/CMakeLists.txt +++ b/src/Mod/PartDesign/Gui/CMakeLists.txt @@ -189,11 +189,8 @@ fc_target_copy_resource(PartDesignGui ${CMAKE_BINARY_DIR}/Mod/PartDesign ${PartDesignGui_Scripts}) -# See link for why this module is installed differently from the other modules: -# http://forum.freecadweb.org/viewtopic.php?f=19&t=5444 -SET_BIN_DIR(PartDesignGui PartDesignGui /Mod/PartDesign /Mod/PartDesign) +SET_BIN_DIR(PartDesignGui PartDesignGui /Mod/PartDesign) SET_PYTHON_PREFIX_SUFFIX(PartDesignGui) -# The PartDesign module must go to where the __init__.py file is -INSTALL(TARGETS PartDesignGui DESTINATION Mod/PartDesign) +INSTALL(TARGETS PartDesignGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/PartDesign/Init.py b/src/Mod/PartDesign/Init.py index 2cf4ef54f..3095dda99 100644 --- a/src/Mod/PartDesign/Init.py +++ b/src/Mod/PartDesign/Init.py @@ -25,7 +25,6 @@ #* Juergen Riegel 2002 * #***************************************************************************/ - class PartDesignDocument: "PartDesign document" def Info(self): diff --git a/src/Mod/PartDesign/__init__.py b/src/Mod/PartDesign/__init__.py index 90aa3f7b5..6c19fb5af 100644 --- a/src/Mod/PartDesign/__init__.py +++ b/src/Mod/PartDesign/__init__.py @@ -1,2 +1,2 @@ -import PartDesign -makeFilletArc = PartDesign.makeFilletArc +import Scripts.FilletArc +makeFilletArc = Scripts.FilletArc.makeFilletArc diff --git a/src/Mod/Points/App/CMakeLists.txt b/src/Mod/Points/App/CMakeLists.txt index 9a8991a5a..eee2f08ab 100644 --- a/src/Mod/Points/App/CMakeLists.txt +++ b/src/Mod/Points/App/CMakeLists.txt @@ -53,4 +53,4 @@ fc_target_copy_resource(Points SET_BIN_DIR(Points Points /Mod/Points) SET_PYTHON_PREFIX_SUFFIX(Points) -INSTALL(TARGETS Points DESTINATION lib) +INSTALL(TARGETS Points DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Points/Gui/CMakeLists.txt b/src/Mod/Points/Gui/CMakeLists.txt index 9e6a55c05..e3e61c935 100644 --- a/src/Mod/Points/Gui/CMakeLists.txt +++ b/src/Mod/Points/Gui/CMakeLists.txt @@ -64,4 +64,4 @@ fc_target_copy_resource(PointsGui SET_BIN_DIR(PointsGui PointsGui /Mod/Points) SET_PYTHON_PREFIX_SUFFIX(PointsGui) -INSTALL(TARGETS PointsGui DESTINATION lib) +INSTALL(TARGETS PointsGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Raytracing/App/CMakeLists.txt b/src/Mod/Raytracing/App/CMakeLists.txt index c2e416584..7808c5156 100644 --- a/src/Mod/Raytracing/App/CMakeLists.txt +++ b/src/Mod/Raytracing/App/CMakeLists.txt @@ -87,4 +87,4 @@ fc_target_copy_resource(Raytracing SET_BIN_DIR(Raytracing Raytracing /Mod/Raytracing) SET_PYTHON_PREFIX_SUFFIX(Raytracing) -INSTALL(TARGETS Raytracing DESTINATION lib) +INSTALL(TARGETS Raytracing DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Raytracing/Gui/CMakeLists.txt b/src/Mod/Raytracing/Gui/CMakeLists.txt index 46bab51f0..51f5115fa 100644 --- a/src/Mod/Raytracing/Gui/CMakeLists.txt +++ b/src/Mod/Raytracing/Gui/CMakeLists.txt @@ -88,4 +88,4 @@ fc_target_copy_resource(RaytracingGui SET_BIN_DIR(RaytracingGui RaytracingGui /Mod/Raytracing) SET_PYTHON_PREFIX_SUFFIX(RaytracingGui) -INSTALL(TARGETS RaytracingGui DESTINATION lib) +INSTALL(TARGETS RaytracingGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/ReverseEngineering/App/CMakeLists.txt b/src/Mod/ReverseEngineering/App/CMakeLists.txt index bd04a57a8..4cbf02bc4 100644 --- a/src/Mod/ReverseEngineering/App/CMakeLists.txt +++ b/src/Mod/ReverseEngineering/App/CMakeLists.txt @@ -42,4 +42,4 @@ fc_target_copy_resource(ReverseEngineering SET_BIN_DIR(ReverseEngineering ReverseEngineering /Mod/ReverseEngineering) SET_PYTHON_PREFIX_SUFFIX(ReverseEngineering) -INSTALL(TARGETS ReverseEngineering DESTINATION lib) +INSTALL(TARGETS ReverseEngineering DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/ReverseEngineering/Gui/CMakeLists.txt b/src/Mod/ReverseEngineering/Gui/CMakeLists.txt index 3be82525a..a16c12dc0 100644 --- a/src/Mod/ReverseEngineering/Gui/CMakeLists.txt +++ b/src/Mod/ReverseEngineering/Gui/CMakeLists.txt @@ -50,4 +50,4 @@ fc_target_copy_resource(ReverseEngineeringGui SET_BIN_DIR(ReverseEngineeringGui ReverseEngineeringGui /Mod/ReverseEngineering) SET_PYTHON_PREFIX_SUFFIX(ReverseEngineeringGui) -install(TARGETS ReverseEngineeringGui DESTINATION lib) +install(TARGETS ReverseEngineeringGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Robot/App/CMakeLists.txt b/src/Mod/Robot/App/CMakeLists.txt index 1bc575668..ee3588c33 100644 --- a/src/Mod/Robot/App/CMakeLists.txt +++ b/src/Mod/Robot/App/CMakeLists.txt @@ -142,4 +142,4 @@ fc_target_copy_resource(Robot SET_BIN_DIR(Robot Robot /Mod/Robot) SET_PYTHON_PREFIX_SUFFIX(Robot) -INSTALL(TARGETS Robot DESTINATION lib) +INSTALL(TARGETS Robot DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Robot/Gui/CMakeLists.txt b/src/Mod/Robot/Gui/CMakeLists.txt index 443c5565c..059b338b3 100644 --- a/src/Mod/Robot/Gui/CMakeLists.txt +++ b/src/Mod/Robot/Gui/CMakeLists.txt @@ -157,4 +157,4 @@ fc_target_copy_resource(RobotGui SET_BIN_DIR(RobotGui RobotGui /Mod/Robot) SET_PYTHON_PREFIX_SUFFIX(RobotGui) -INSTALL(TARGETS RobotGui DESTINATION lib) +INSTALL(TARGETS RobotGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Sandbox/App/CMakeLists.txt b/src/Mod/Sandbox/App/CMakeLists.txt index 7add1bf0c..44cf01783 100644 --- a/src/Mod/Sandbox/App/CMakeLists.txt +++ b/src/Mod/Sandbox/App/CMakeLists.txt @@ -41,4 +41,4 @@ fc_target_copy_resource(Sandbox SET_BIN_DIR(Sandbox Sandbox /Mod/Sandbox) SET_PYTHON_PREFIX_SUFFIX(Sandbox) -INSTALL(TARGETS Sandbox DESTINATION lib) +INSTALL(TARGETS Sandbox DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Sandbox/Gui/CMakeLists.txt b/src/Mod/Sandbox/Gui/CMakeLists.txt index a7a43f2c9..ee9598b6e 100644 --- a/src/Mod/Sandbox/Gui/CMakeLists.txt +++ b/src/Mod/Sandbox/Gui/CMakeLists.txt @@ -52,4 +52,4 @@ fc_target_copy_resource(SandboxGui SET_BIN_DIR(SandboxGui SandboxGui /Mod/Sandbox) SET_PYTHON_PREFIX_SUFFIX(SandboxGui) -INSTALL(TARGETS SandboxGui DESTINATION lib) +INSTALL(TARGETS SandboxGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Sketcher/App/CMakeLists.txt b/src/Mod/Sketcher/App/CMakeLists.txt index 8e53a859f..04cec9d7b 100644 --- a/src/Mod/Sketcher/App/CMakeLists.txt +++ b/src/Mod/Sketcher/App/CMakeLists.txt @@ -121,4 +121,4 @@ fc_target_copy_resource(Sketcher SET_BIN_DIR(Sketcher Sketcher /Mod/Sketcher) SET_PYTHON_PREFIX_SUFFIX(Sketcher) -INSTALL(TARGETS Sketcher DESTINATION lib) +INSTALL(TARGETS Sketcher DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Sketcher/Gui/CMakeLists.txt b/src/Mod/Sketcher/Gui/CMakeLists.txt index 092921edc..cd34b9eed 100644 --- a/src/Mod/Sketcher/Gui/CMakeLists.txt +++ b/src/Mod/Sketcher/Gui/CMakeLists.txt @@ -118,4 +118,4 @@ fc_target_copy_resource(SketcherGui SET_BIN_DIR(SketcherGui SketcherGui /Mod/Sketcher) SET_PYTHON_PREFIX_SUFFIX(SketcherGui) -INSTALL(TARGETS SketcherGui DESTINATION lib) +INSTALL(TARGETS SketcherGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Start/App/CMakeLists.txt b/src/Mod/Start/App/CMakeLists.txt index b5c92c820..123d72bbc 100644 --- a/src/Mod/Start/App/CMakeLists.txt +++ b/src/Mod/Start/App/CMakeLists.txt @@ -32,4 +32,4 @@ fc_target_copy_resource(Start SET_BIN_DIR(Start Start /Mod/Start) SET_PYTHON_PREFIX_SUFFIX(Start) -INSTALL(TARGETS Start DESTINATION lib) +INSTALL(TARGETS Start DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Start/Gui/CMakeLists.txt b/src/Mod/Start/Gui/CMakeLists.txt index c05bed84e..9c8b49737 100644 --- a/src/Mod/Start/Gui/CMakeLists.txt +++ b/src/Mod/Start/Gui/CMakeLists.txt @@ -78,4 +78,4 @@ fc_target_copy_resource(StartGui SET_BIN_DIR(StartGui StartGui /Mod/Start) SET_PYTHON_PREFIX_SUFFIX(StartGui) -INSTALL(TARGETS StartGui DESTINATION lib) +INSTALL(TARGETS StartGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt index ed75439c0..0fb6199f7 100644 --- a/src/Mod/Test/Gui/CMakeLists.txt +++ b/src/Mod/Test/Gui/CMakeLists.txt @@ -58,6 +58,6 @@ fc_copy_sources(QtUnitGui "${CMAKE_BINARY_DIR}/Mod/Test" qtunittest.py) SET_BIN_DIR(QtUnitGui QtUnitGui /Mod/Test) SET_PYTHON_PREFIX_SUFFIX(QtUnitGui) -INSTALL(TARGETS QtUnitGui DESTINATION lib) +INSTALL(TARGETS QtUnitGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(FILES ${TestGuiPy_SRCS} DESTINATION Mod/Test) diff --git a/src/Mod/Web/App/CMakeLists.txt b/src/Mod/Web/App/CMakeLists.txt index 25ad98ed7..e7195e5a1 100644 --- a/src/Mod/Web/App/CMakeLists.txt +++ b/src/Mod/Web/App/CMakeLists.txt @@ -49,4 +49,4 @@ fc_target_copy_resource(Web SET_BIN_DIR(Web Web /Mod/Web) SET_PYTHON_PREFIX_SUFFIX(Web) -install(TARGETS Web DESTINATION lib) +install(TARGETS Web DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Web/Gui/CMakeLists.txt b/src/Mod/Web/Gui/CMakeLists.txt index e4a67bf97..6edbce296 100644 --- a/src/Mod/Web/Gui/CMakeLists.txt +++ b/src/Mod/Web/Gui/CMakeLists.txt @@ -46,4 +46,4 @@ fc_target_copy_resource(WebGui SET_BIN_DIR(WebGui WebGui /Mod/Web) SET_PYTHON_PREFIX_SUFFIX(WebGui) -INSTALL(TARGETS WebGui DESTINATION lib) +INSTALL(TARGETS WebGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Tools/_TEMPLATE_/App/CMakeLists.txt b/src/Tools/_TEMPLATE_/App/CMakeLists.txt index 6a00bebf7..fb0e772ae 100644 --- a/src/Tools/_TEMPLATE_/App/CMakeLists.txt +++ b/src/Tools/_TEMPLATE_/App/CMakeLists.txt @@ -30,4 +30,4 @@ fc_target_copy_resource(_TEMPLATE_ SET_BIN_DIR(_TEMPLATE_ _TEMPLATE_ /Mod/_TEMPLATE_) SET_PYTHON_PREFIX_SUFFIX(_TEMPLATE_) -install(TARGETS _TEMPLATE_ DESTINATION lib) +install(TARGETS _TEMPLATE_ DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt b/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt index d37869e5e..c985f388d 100644 --- a/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt +++ b/src/Tools/_TEMPLATE_/Gui/CMakeLists.txt @@ -40,4 +40,4 @@ fc_target_copy_resource(_TEMPLATE_Gui SET_BIN_DIR(_TEMPLATE_Gui _TEMPLATE_Gui /Mod/_TEMPLATE_) SET_PYTHON_PREFIX_SUFFIX(_TEMPLATE_Gui) -install(TARGETS _TEMPLATE_Gui DESTINATION lib) +install(TARGETS _TEMPLATE_Gui DESTINATION ${CMAKE_INSTALL_LIBDIR})