freecad-python-interface: use absolute-path to install-bin-dir for windows

This commit is contained in:
looooo
2020-06-26 10:15:54 +02:00
committed by wwmayer
parent 6f7118850b
commit 60303f3153
2 changed files with 5 additions and 3 deletions

View File

@@ -5,7 +5,9 @@ SET(PYTHON_MAIN_DIR ${python_libs})
set(NAMESPACE_INIT "${CMAKE_BINARY_DIR}/Ext/freecad/__init__.py")
if (WIN32)
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
get_filename_component(FREECAD_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}"
REALPATH BASE_DIR "${CMAKE_INSTALL_PREFIX}")
set( ${CMAKE_INSTALL_BINDIR})
else()
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
endif()

View File

@@ -12,9 +12,9 @@ except ModuleNotFoundError:
except KeyError:
# 2. we use the default freecad defined for this package
_path_to_freecad_libdir = "${CMAKE_INSTALL_LIBDIR}"
_path_to_freecad_libdir = "${FREECAD_LIBRARY_INSTALL_DIR}"
print("PATH_TO_FREECAD_LIBDIR not specified, using default \
FreeCAD version in {}".format( "${FREECAD_LIBRARY_INSTALL_DIR}"))
FreeCAD version in {}".format("${FREECAD_LIBRARY_INSTALL_DIR}"))
_sys.path.append(_path_to_freecad_libdir) # this is the default version
import FreeCAD as app