Commit 6aaaa8e1 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'install-additional-boost-libraries'

581fc325 Patch moab to set hdf5 library type flag
a443e7db Moab: add patch to MOAB's custom FindHDF5 to work in SB
a007b083 Bundle user-added additional boost libraries
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !485
parents 4182af10 581fc325
Pipeline #132748 failed with stage
......@@ -95,7 +95,6 @@ function (superbuild_find_projects var)
pythonrequests
pythonrequeststoolbelt
pythonsetuptools
pythonsix
qt
qt4
qt5
......@@ -184,6 +183,9 @@ function (superbuild_add_packaging)
list(APPEND superbuild_export_variables
qt5_version)
list(APPEND superbuild_export_variables
BOOST_ADDITIONAL_LIBRARIES)
include(cmb.suffix)
list(APPEND superbuild_export_variables
CMB_PACKAGE_SUFFIX)
......@@ -233,7 +235,7 @@ set(qt5_skip_modules
qtwebengine
qtwebsockets)
set(BOOST_ADDITIONAL_LIBRARIES "" CACHE STRING "Additional boost libraries to build")
set(BOOST_ADDITIONAL_LIBRARIES "" CACHE STRING "Additional boost libraries to build and package")
mark_as_advanced(BOOST_ADDITIONAL_LIBRARIES)
set(boost_minimum_version 1.64.0)
......
foreach(program IN LISTS cmb_programs_to_install)
set(additional_libraries)
set(plugins)
set(plugin_paths)
if (program STREQUAL "modelbuilder")
# Install additional libraries in modelbuilder app
foreach(library IN LISTS cmb_additional_libraries)
list(APPEND additional_libraries "${superbuild_install_location}/lib/lib${library}.dylib")
endforeach()
# Install CMB plugins in modelbuilder app
foreach(plugin IN LISTS cmb_plugins_cmb)
list(APPEND plugin_paths "${superbuild_install_location}/Applications/modelbuilder.app/Contents/Plugins/lib${plugin}.dylib")
......@@ -11,8 +17,7 @@ foreach(program IN LISTS cmb_programs_to_install)
# Install CMB plugins in modelbuilder app
foreach(plugin IN LISTS cmb_plugins_standalone)
find_library(plugin_path "lib${plugin}.dylib" ${superbuild_install_location}/lib)
list(APPEND plugin_paths ${plugin_path})
list(APPEND plugin_paths "${superbuild_install_location}/lib/lib${plugin}.dylib")
endforeach()
list(APPEND plugins ${cmb_plugins_standalone})
......@@ -29,6 +34,7 @@ foreach(program IN LISTS cmb_programs_to_install)
"${superbuild_install_location}/Applications/${program}.app/Contents/MacOS/${program}"
CLEAN
PLUGINS ${plugin_paths}
ADDITIONAL_LIBRARIES ${additional_libraries}
SEARCH_DIRECTORIES
"${superbuild_install_location}/lib")
foreach (icon_filename MacIcon.icns pvIcon.icns)
......
......@@ -120,6 +120,11 @@ if (cumulus_enabled)
)
endif()
set(cmb_additional_libraries)
foreach (boost_lib IN LISTS BOOST_ADDITIONAL_LIBRARIES)
list(APPEND cmb_additional_libraries boost_${boost_lib})
endforeach ()
set(cmb_python_modules
smtk
paraview
......
......@@ -25,6 +25,9 @@ superbuild_apply_patch(moab disable-fortran
superbuild_apply_patch(moab export-include-dir
"Set MOAB and iMesh targets to export their installed include directories")
superbuild_apply_patch(moab find-hdf5-default-path
"When using CMake to look for HDF5, use the default path")
# By default, linux and os x cmake looks in <INSTALL_DIR>/lib/cmake for
# things. On windows, it does not. So, we set MOAB_DIR to point to the
# location of MOABConfig.cmake for everyone.
......
diff --git a/config/FindHDF5_MOAB.cmake b/config/FindHDF5_MOAB.cmake
index a29375c3..22688942 100644
--- a/config/FindHDF5_MOAB.cmake
+++ b/config/FindHDF5_MOAB.cmake
@@ -11,7 +11,7 @@ set( SZIP_ROOT "" CACHE PATH "Path to search for SZIP header and library files"
# Try to find HDF5 with the CMake finder
set(ENV{HDF5_ROOT} ${HDF5_ROOT})
-find_package(HDF5 COMPONENTS C HL NO_DEFAULT_PATH)
+find_package(HDF5 COMPONENTS C HL)
if (HDF5_FOUND)
# Translate to MOAB variables
......@@ -80,6 +80,17 @@ foreach (plugin IN LISTS cmb_plugins_paraview)
)
endforeach ()
foreach (library IN LISTS cmb_additional_libraries)
superbuild_unix_install_plugin("lib${plugin}.so"
"lib"
"lib"
SEARCH_DIRECTORIES "${library_paths}"
LOCATION "lib"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
)
endforeach ()
superbuild_unix_install_python(
LIBDIR "lib/cmb-${cmb_version}"
MODULES ${cmb_python_modules}
......
......@@ -97,6 +97,14 @@ foreach (plugin IN LISTS cmb_plugins_paraview)
"${plugin_library_paths}")
endforeach ()
foreach (library IN LISTS cmb_additional_libraries)
set(additional_library_paths ${library_paths})
list(APPEND additional_library_paths "bin/${library}")
superbuild_windows_install_plugin("${plugin}.dll"
"bin"
"${plugin_library_paths}")
endforeach ()
superbuild_windows_install_python(
MODULES ${cmb_python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/bin/Lib/site-packages"
......
......@@ -6,5 +6,8 @@ superbuild_apply_patch(moab quote-compiler-path
superbuild_apply_patch(moab remove-flags-from-link-list
"Remove CMake error where linker flags are a part of the link library list")
superbuild_apply_patch(moab hdf5-library-type
"Explicitly state that hdf5's library is shared as a build flag")
superbuild_apply_patch(moab msvc-fixes
"Many windows-specific fixes for moab (not developed on windows).")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5dbd4517..0ee987ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,6 +272,7 @@ if ( ENABLE_HDF5 )
endif ( CURL_FOUND )
set( MOAB_LIBS ${HDF5_LIBRARIES} ${MOAB_LIBS} )
include_directories( ${HDF5_INCLUDE_DIR} src/io/mhdf/include )
+ add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
endif ( ENABLE_HDF5 )
set (MOAB_HAVE_NETCDF OFF CACHE INTERNAL "Found necessary NetCDF components. Configure MOAB with it." )
Subproject commit d51aaaf67210dc0b8e7bce3078dfdbc157e641d3
Subproject commit 3e0749c8db90b4642c72ee9e8fb8a26255884a6e
Markdown is supported
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