Initial build startup works with one-shot conda script

This commit is contained in:
Jeffrey Zampieron
2020-08-31 14:35:37 -04:00
committed by wwmayer
parent 5cc8ffba41
commit 7d7c0ab99c
8 changed files with 348 additions and 95 deletions

View File

@@ -0,0 +1,31 @@
diff --git a/src/Ext/freecad/CMakeLists.txt b/src/Ext/freecad/CMakeLists.txt
index e03b5527e..d9004275b 100644
--- a/src/Ext/freecad/CMakeLists.txt
+++ b/src/Ext/freecad/CMakeLists.txt
@@ -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()
diff --git a/src/Ext/freecad/__init__.py.template b/src/Ext/freecad/__init__.py.template
index 68ca151a5..d5360b252 100644
--- a/src/Ext/freecad/__init__.py.template
+++ b/src/Ext/freecad/__init__.py.template
@@ -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