Skip to content

Commit

Permalink
Add missing build byproducts to enable support for Ninja on Windows (#…
Browse files Browse the repository at this point in the history
…6971)

* Added missing build byproduct for BoringSSL
* Added missing build byproduct for libcurl
* Added missing build byproduct for ipp
* Fixed incorrect build byproduct for UVAtlas
* Added missing build byproduct for VTK
  • Loading branch information
dbs4261 authored Sep 17, 2024
1 parent 165ff2b commit a71ab5e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 18 deletions.
4 changes: 3 additions & 1 deletion 3rdparty/boringssl/boringssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ ExternalProject_Add(
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ""
BUILD_BYPRODUCTS
<SOURCE_DIR>/$<$<BOOL:${WIN32}>:$<IF:$<CONFIG:Debug>,Debug,Release>/>lib/${CMAKE_STATIC_LIBRARY_PREFIX}ssl${CMAKE_STATIC_LIBRARY_SUFFIX}
<SOURCE_DIR>/$<$<BOOL:${WIN32}>:$<IF:$<CONFIG:Debug>,Debug,Release>/>lib/${CMAKE_STATIC_LIBRARY_PREFIX}crypto${CMAKE_STATIC_LIBRARY_SUFFIX}
)

ExternalProject_Get_Property(ext_boringssl SOURCE_DIR)
Expand Down
5 changes: 4 additions & 1 deletion 3rdparty/curl/curl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ if(BUILD_CURL_FROM_SOURCE)
${ExternalProject_CMAKE_ARGS_hidden}
BUILD_BYPRODUCTS
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${curl_lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${curl_lib_name}-d${CMAKE_STATIC_LIBRARY_SUFFIX}
)

ExternalProject_Get_Property(ext_curl INSTALL_DIR)
Expand Down Expand Up @@ -79,7 +80,9 @@ else()
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ""
BUILD_BYPRODUCTS
<SOURCE_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${curl_lib_name}${CMAKE_STATIC_LIBRARY_SUFFIX}
<SOURCE_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${curl_lib_name}-d${CMAKE_STATIC_LIBRARY_SUFFIX}
)

ExternalProject_Get_Property(ext_curl SOURCE_DIR)
Expand Down
28 changes: 18 additions & 10 deletions 3rdparty/ipp/ipp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ else()
set(IPP_SUBPATH "")
endif()

# Threading layer libs must be linked first.
# https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2021-11/ipp-performace-benefits-with-tl-functions.html
# Library dependency order:
# https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2021-11/library-dependencies-by-domain.html
if (WIN32)
set(IPP_LIBRARIES ipp_iw ippcvmt_tl_tbb ippcvmt ippimt_tl_tbb ippimt ippccmt_tl_tbb ippccmt ippsmt ippvmmt ippcoremt_tl_tbb ippcoremt)
else()
set(IPP_LIBRARIES ipp_iw ippcv_tl_tbb ippcv ippi_tl_tbb ippi ippcc_tl_tbb ippcc ipps ippvm ippcore_tl_tbb ippcore)
endif()

foreach(item IN LISTS IPP_LIBRARIES)
list(APPEND IPP_BUILD_BYPRODUCTS <SOURCE_DIR>/${IPP_SUBPATH}lib/${CMAKE_STATIC_LIBRARY_PREFIX}${item}${CMAKE_STATIC_LIBRARY_SUFFIX})
endforeach()

ExternalProject_Add(ext_ipp
PREFIX ipp
URL ${IPP_URL}
Expand All @@ -45,16 +59,10 @@ ExternalProject_Add(ext_ipp
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
BUILD_BYPRODUCTS
${IPP_BUILD_BYPRODUCTS}
)

ExternalProject_Get_Property(ext_ipp SOURCE_DIR)
set(IPP_INCLUDE_DIR "${SOURCE_DIR}/${IPP_SUBPATH}include/")
# Threading layer libs must be linked first.
# https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2021-11/ipp-performace-benefits-with-tl-functions.html
# Library dependency order:
# https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-reference/2021-11/library-dependencies-by-domain.html
if (WIN32)
set(IPP_LIBRARIES ipp_iw ippcvmt_tl_tbb ippcvmt ippimt_tl_tbb ippimt ippccmt_tl_tbb ippccmt ippsmt ippvmmt ippcoremt_tl_tbb ippcoremt)
else()
set(IPP_LIBRARIES ipp_iw ippcv_tl_tbb ippcv ippi_tl_tbb ippi ippcc_tl_tbb ippcc ipps ippvm ippcore_tl_tbb ippcore)
endif()
set(IPP_LIB_DIR "${SOURCE_DIR}/${IPP_SUBPATH}lib")
2 changes: 1 addition & 1 deletion 3rdparty/uvatlas/uvatlas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ExternalProject_Add(
-Ddirectxmath_DIR=<INSTALL_DIR>
DEPENDS ext_directxheaders ext_directxmath
BUILD_BYPRODUCTS
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}uvatlas${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}UVAtlas${CMAKE_STATIC_LIBRARY_SUFFIX}
)


Expand Down
15 changes: 10 additions & 5 deletions 3rdparty/vtk/vtk_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ set(VTK_LIBRARIES
vtksys-${VTK_VERSION}${VTK_LIB_SUFFIX}
)

foreach(item IN LISTS VTK_LIBRARIES)
list(APPEND VTK_BUILD_BYPRODUCTS <INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${item}${CMAKE_STATIC_LIBRARY_SUFFIX})
endforeach()


if(BUILD_VTK_FROM_SOURCE)

foreach(item IN LISTS VTK_LIBRARIES)
list(APPEND VTK_BUILD_BYPRODUCTS <INSTALL_DIR>/${Open3D_INSTALL_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${item}${CMAKE_STATIC_LIBRARY_SUFFIX})
endforeach()

ExternalProject_Add(
ext_vtk
PREFIX vtk
Expand Down Expand Up @@ -294,6 +294,10 @@ if(BUILD_VTK_FROM_SOURCE)

else() #### download prebuilt vtk

foreach(item IN LISTS VTK_LIBRARIES)
list(APPEND VTK_BUILD_BYPRODUCTS <SOURCE_DIR>/lib/${item}${CMAKE_STATIC_LIBRARY_SUFFIX})
endforeach()

if(LINUX_AARCH64)
message(FATAL "No precompiled vtk for platform. Enable BUILD_VTK_FROM_SOURCE")
elseif(APPLE_AARCH64)
Expand Down Expand Up @@ -334,7 +338,8 @@ else() #### download prebuilt vtk
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ""
BUILD_BYPRODUCTS
${VTK_BUILD_BYPRODUCTS}
)

ExternalProject_Get_Property(ext_vtk SOURCE_DIR)
Expand Down

0 comments on commit a71ab5e

Please sign in to comment.