Skip to content

Commit 4f7a5fd

Browse files
committed
Fix intel-mkl for dynamic
1 parent af752f2 commit 4f7a5fd

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

ports/intel-mkl/portfile.cmake

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,19 @@ vcpkg_execute_required_process(
128128
set(mkl_dir "${extract_1_dir}/_installdir/mkl/${mkl_short_version}")
129129
file(COPY "${mkl_dir}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
130130
file(COPY "${mkl_dir}/${package_libdir}/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/")
131+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
132+
file(COPY "${mkl_dir}/${runtime_dir}/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/")
133+
endif()
131134

132135
file(COPY_FILE "${mkl_dir}/lib/pkgconfig/${main_pc_file}" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${main_pc_file}")
133136
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${main_pc_file}" "\${exec_prefix}/${package_libdir}" "\${exec_prefix}/lib/" IGNORE_UNCHANGED)
134137

135138
set(compiler_dir "${extract_1_dir}/_installdir/compiler/${mkl_short_version}")
136139
if(threading STREQUAL "intel_thread")
137140
file(COPY "${compiler_dir}/lib/" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/")
141+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
142+
file(COPY "${compiler_dir}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/")
143+
endif()
138144
file(COPY_FILE "${compiler_dir}/lib/pkgconfig/openmp.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libiomp5.pc")
139145
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${main_pc_file}" "openmp" "libiomp5")
140146
endif()
@@ -171,11 +177,8 @@ endif()
171177
file(COPY "${mkl_dir}/lib/cmake/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/")
172178
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mkl/MKLConfig.cmake" "MKL_CMAKE_PATH}/../../../" "MKL_CMAKE_PATH}/../../")
173179
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mkl/MKLConfig.cmake" "redist/\${MKL_ARCH}" "bin")
174-
if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static")
175-
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mkl/MKLConfig.cmake" "define_param(MKL_LINK DEFAULT_MKL_LINK MKL_LINK_LIST)"
176-
[[define_param(MKL_LINK DEFAULT_MKL_LINK MKL_LINK_LIST)
177-
set(MKL_LINK "static")
178-
]])
180+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
181+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/mkl/MKLConfig.cmake" "set(DEFAULT_MKL_LINK dynamic)" "set(DEFAULT_MKL_LINK static)")
179182
endif()
180183
#TODO: Hardcode settings from portfile in config.cmake
181184
#TODO: Give lapack/blas information about the correct BLA_VENDOR depending on settings.
@@ -187,6 +190,8 @@ vcpkg_install_copyright(FILE_LIST "${package_path}/licenses/license.htm")
187190
file(REMOVE_RECURSE
188191
"${extract_0_dir}"
189192
"${extract_1_dir}"
193+
"${CURRENT_PACKAGES_DIR}/bin/compiler"
194+
"${CURRENT_PACKAGES_DIR}/lib/cmake"
190195
)
191196

192197
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

ports/intel-mkl/vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "intel-mkl",
33
"version": "2025.2.0",
4+
"port-version": 1,
45
"description": "Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors.",
56
"homepage": "https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html",
67
"license": null,

versions/baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3966,7 +3966,7 @@
39663966
},
39673967
"intel-mkl": {
39683968
"baseline": "2025.2.0",
3969-
"port-version": 0
3969+
"port-version": 1
39703970
},
39713971
"intelrdfpmathlib": {
39723972
"baseline": "20U2",

versions/i-/intel-mkl.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "ca8f97137b014da2035602ce9a8c7d96757dc143",
5+
"version": "2025.2.0",
6+
"port-version": 1
7+
},
38
{
49
"git-tree": "68757c04f7759c50a2cd81b097e862da93673334",
510
"version": "2025.2.0",

0 commit comments

Comments
 (0)