diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c218814a..0c0ab2b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -158,6 +158,10 @@ jobs: mingw-w64-x86_64-gsl mingw-w64-x86_64-gl2ps mingw-w64-x86_64-boost + mingw-w64-x86_64-unittest-cpp + mingw-w64-x86_64-sip + mingw-w64-x86_64-python-pyqt5 + mingw-w64-x86_64-python-numpy - name: Download Qwt5 and QwtPlot3D run: | @@ -169,15 +173,6 @@ jobs: tar -xzf qwtplot3d-qt5_0.2.7.orig.tar.gz && rm qwtplot3d-qt5_0.2.7.orig.tar.gz patch -p1 < qwtplot3d.diff - - name: Install UnitTest++ - run: | - git clone --single-branch --branch master --depth 1 https://github.com/unittest-cpp/unittest-cpp - cd unittest-cpp - mkdir build && cd build - cmake .. -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64 - make -j$(nproc) - make install - - name: Configuring run: | mkdir build && cd build diff --git a/CMakeLists.txt b/CMakeLists.txt index 95b5b7c6..08aa4a94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,11 +67,11 @@ option( SCRIPTING_MUPARSER "Enable muParser Scripting" ON ) option( ENABLE_Testing "Enable testing" ON ) -if( WIN32 ) +if( MSVC ) option( ENABLE_Python3 "Enable Python3 support" OFF ) -else( WIN32 ) +else() option( ENABLE_Python3 "Enable Python3 support" ON ) -endif( WIN32 ) +endif() if( ENABLE_Python3 ) if( MINGW ) diff --git a/libscidavis/CMakeLists.txt b/libscidavis/CMakeLists.txt index d09962aa..178dacc6 100644 --- a/libscidavis/CMakeLists.txt +++ b/libscidavis/CMakeLists.txt @@ -427,6 +427,17 @@ if( ENABLE_Python3 ) PYTHON_UTIL_PATH="${CMAKE_INSTALL_PREFIX}/share/scidavis" SCRIPTING_PYTHON ) + if( MINGW ) + get_filename_component( PYTHON_DIR ${Python3_EXECUTABLE} DIRECTORY ) + file( REAL_PATH "${PYTHON_DIR}/.." PYTHON_ROOT_DIR ) + set( PYTHONHOME "${PYTHON_ROOT_DIR}" CACHE PATH "Python Home" ) + message( STATUS "PYTHONHOME = ${PYTHONHOME}" ) + set_property( SOURCE "src/PythonScripting.cpp" + APPEND + PROPERTY COMPILE_DEFINITIONS + PYTHONHOME=${PYTHONHOME} + ) + endif() endif( ENABLE_Python3 ) if( SEARCH_FOR_UPDATE OR DOWNLOAD_LINKS )