Commit 9ffe2943 authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Disable MSVC toolset path on installation

parent 67051a3d
Pipeline #74359 passed with stages
in 24 minutes and 42 seconds
......@@ -22,10 +22,6 @@ if(WIN32)
endif()
endif()
if (${MSVC_TOOLSET_VERSION_LOCAL})
set(LIB_TOOLSET_DIR "/msvc_${MSVC_TOOLSET_VERSION_LOCAL}")
endif()
include(GNUInstallDirs)
set (TEST_DATA_PATH "" CACHE PATH "Test data path")
......@@ -117,6 +113,7 @@ endif()
option(BUILD_PYTHON "Build python bindings" ${BUILD_PYTHON_DEFAULT})
option(BUILD_JAVA "Build java bindings" ${BUILD_JAVA_DEFAULT})
option(ENABLE_OPENMP "Enable the OpenMP codepath" ON)
option(ENABLE_MSVC_TOOLSET_DIR "Enable adding a subdir for the MSVC toolset" ON)
option(BUILD_SHARED_LIBS "Build OpenVDS as a shared library" ON)
option(BUILD_EXAMPLES "Build OpenVDS example projects" ON)
option(BUILD_TESTS "Build OpenVDS tests" ON)
......@@ -164,6 +161,10 @@ define_property(GLOBAL PROPERTY OPENVDS_LINK_LIBRARIES_DEBUG BRIEF_DOCS "OpenV
define_property(GLOBAL PROPERTY OPENVDS_INCLUDE_LIBRARIES BRIEF_DOCS "OpenVDS include libraries" FULL_DOCS "Include paths for 3rdparty")
define_property(GLOBAL PROPERTY OPENVDS_DEPENDENCY_TARGETS BRIEF_DOCS "Dependency targets for OpenVDS" FULL_DOCS "Targets that OpenVDS needs to build first")
if (ENABLE_MSVC_TOOLSET_DIR AND "${MSVC_TOOLSET_VERSION_LOCAL}")
set(LIB_TOOLSET_DIR "/msvc_${MSVC_TOOLSET_VERSION_LOCAL}")
endif()
set(LIB_TOOLSET_DIR "${LIB_TOOLSET_DIR}$<$<NOT:$<CONFIG:Release>>:/$<CONFIG>>")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
......
......@@ -119,9 +119,9 @@ for python_executable in "${python_executables[@]}"; do
echo "Do $python_executable to $skbuild_dir"
if [[ "$platform_name" == "win" ]]; then
cmake -DPython3_ROOT_DIR="$python_root_dir" -DCMAKE_INSTALL_PREFIX=$skbuild_dir/cmake-install $cmake_args -G"$cmake_generator" $toolset $openvds_path
cmake --build . --config Debug --target install
cmake --build . --config Release --target install
cmake -DPython3_ROOT_DIR="$python_root_dir" -DCMAKE_INSTALL_PREFIX=$skbuild_dir/cmake-install -DENABLE_MSVC_TOOLSET_DIR=OFF $cmake_args -G"$cmake_generator" $toolset $openvds_path
cmake --build . --config Debug --parallel --target install
cmake --build . --config Release --parallel --target install
else
cmake -DPython3_ROOT_DIR="$python_root_dir" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$skbuild_dir/cmake-install $cmake_args -G"$cmake_generator" $toolset $openvds_path
cmake --build . --config Release --target install
......@@ -133,8 +133,6 @@ for python_executable in "${python_executables[@]}"; do
"$python_executable" setup.py --skip-cmake bdist_wheel
cp -r $skbuild_dir/cmake-install/* binpackage/$name-$openvds_version
if [[ "$auditwheels" == "yes" ]]; then
old_dir=$PWD
cd $openvds_path/dist
......@@ -173,6 +171,17 @@ for python_executable in "${python_executables[@]}"; do
cp $openvds_path/dist/* $openvds_path/binpackage/$name-$openvds_version/
mv $openvds_path/dist/* $openvds_path/binpackage/python/$distribution/
fi
if [[ "$platform_name" == "win" ]]; then
cd "$build_dir"
rm -rf $skbuild_dir/cmake-install
cmake -DPython3_ROOT_DIR="$python_root_dir" -DCMAKE_INSTALL_PREFIX=$skbuild_dir/cmake-install -DENABLE_MSVC_TOOLSET_DIR=ON $cmake_args -G"$cmake_generator" $toolset $openvds_path
cmake --build . --config Debug --parallel --target install
cmake --build . --config Release --parallel --target install
fi
cd "$openvds_path"
cp -r $skbuild_dir/cmake-install/* binpackage/$name-$openvds_version
rm -rf $openvds_path/dist
done
......
......@@ -79,7 +79,7 @@ setup(
license="Apache License, Version 2.0",
packages=['openvds'],
package_dir={'': 'python'},
cmake_args=[python_root_path],
cmake_args=[python_root_path, "-DENABLE_MSVC_TOOLSET_DIR=OFF"],
install_requires=['numpy']
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment