Skip to content

Commit

Permalink
win: fix path to freecad library
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo authored and yorikvanhavre committed May 25, 2020
1 parent d4ea5b8 commit 85bfe11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Ext/freecad/CMakeLists.txt
Expand Up @@ -4,6 +4,12 @@ OUTPUT_VARIABLE python_libs OUTPUT_STRIP_TRAILING_WHITESPACE )
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})
else()
set(FREECAD_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
endif()

configure_file(__init__.py.template ${NAMESPACE_INIT})

if (INSTALL_TO_SITEPACKAGES)
Expand Down
2 changes: 1 addition & 1 deletion src/Ext/freecad/__init__.py.template
Expand Up @@ -14,7 +14,7 @@ except ModuleNotFoundError:
# 2. we use the default freecad defined for this package
_path_to_freecad_libdir = "${CMAKE_INSTALL_LIBDIR}"
print("PATH_TO_FREECAD_LIBDIR not specified, using default \
FreeCAD version in {}".format( "${CMAKE_INSTALL_LIBDIR}"))
FreeCAD version in {}".format( "${FREECAD_LIBRARY_INSTALL_DIR}"))

_sys.path.append(_path_to_freecad_libdir) # this is the default version
import FreeCAD as app
Expand Down

0 comments on commit 85bfe11

Please sign in to comment.