From 5a11179d0588328f70ae243a3c6dc08c16ba3c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Fri, 12 Apr 2024 21:41:46 -0300 Subject: [PATCH] Updated pyFLTK build. --- cmake/Modules/BuildpyFLTK.cmake | 22 +++++++++------------- etc/build_dir.sh | 4 ++++ runme.sh | 4 +++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/cmake/Modules/BuildpyFLTK.cmake b/cmake/Modules/BuildpyFLTK.cmake index e7889d5b0..254401e2b 100644 --- a/cmake/Modules/BuildpyFLTK.cmake +++ b/cmake/Modules/BuildpyFLTK.cmake @@ -97,19 +97,15 @@ set(pyFLTK_BUILD ${pyFLTK_ENV} ${PYTHON_EXECUTABLE} setup.py build --enable- # Install steps (on Windows, we can just use setup.py install. # on other platforms we can't, we install a wheel file) # -if(WIN32) - set(pyFLTK_INSTALL ${pyFLTK_ENV} ${PYTHON_EXECUTABLE} setup.py install --enable-shared) -else() - set(pyFLTK_PIP_INSTALL_WHEEL ${PYTHON_EXECUTABLE} -m pip install wheel ) - set(pyFLTK_CREATE_WHEELS ${pyFLTK_ENV} ${PYTHON_EXECUTABLE} setup.py bdist_wheel) - set(pyFLTK_INSTALL_WHEELS ${CMAKE_COMMAND} - -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} - -DWHL_DIRECTORY=${CMAKE_BINARY_DIR}/pyFLTK-prefix/src/pyFLTK/dist - -P "${CMAKE_SOURCE_DIR}/cmake/install_whl_files.cmake" ) - set(pyFLTK_INSTALL "${pyFLTK_PIP_INSTALL_WHEEL}" - COMMAND "${pyFLTK_CREATE_WHEELS}" - COMMAND "${pyFLTK_INSTALL_WHEELS}") -endif() +set(pyFLTK_PIP_INSTALL_WHEEL ${PYTHON_EXECUTABLE} -m pip install wheel ) +set(pyFLTK_CREATE_WHEELS ${pyFLTK_ENV} ${PYTHON_EXECUTABLE} setup.py bdist_wheel) +set(pyFLTK_INSTALL_WHEELS ${CMAKE_COMMAND} + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DWHL_DIRECTORY=${CMAKE_BINARY_DIR}/pyFLTK-prefix/src/pyFLTK/dist + -P "${CMAKE_SOURCE_DIR}/cmake/install_whl_files.cmake" ) +set(pyFLTK_INSTALL "${pyFLTK_PIP_INSTALL_WHEEL}" + COMMAND "${pyFLTK_CREATE_WHEELS}" + COMMAND "${pyFLTK_INSTALL_WHEELS}") ExternalProject_Add( diff --git a/etc/build_dir.sh b/etc/build_dir.sh index 180ccf5c0..4e68743bb 100755 --- a/etc/build_dir.sh +++ b/etc/build_dir.sh @@ -88,6 +88,10 @@ if [ -z "$OLD_DYLD_LIBRARY_PATH" ]; then export OLD_DYLD_LIBRARY_PATH="/usr/local/opt/sqlite/lib:${DYLD_LIBRARY_PATH}" fi +if [ -z "$OLD_PATH" ]; then + export OLD_PATH="$PATH" +fi + # # Set environment variables to point to install directory # diff --git a/runme.sh b/runme.sh index e52d5197a..bfd7c8359 100755 --- a/runme.sh +++ b/runme.sh @@ -16,6 +16,7 @@ # It will also log the compilation on $BUILD_DIR/compile.log # + # # Store the parameters for passing them later # @@ -30,10 +31,11 @@ mkdir -p $BUILD_DIR # -# Clear the flags, as they will be set by runme_nolog.sh. +# Clear the flags, as they will be set again by runme_nolog.sh. # export FLAGS="" export CMAKE_FLAGS="" +export PATH="$OLD_PATH" echo