From a0e2852beb25cc70f53b23fbd4d17a7d85f55caa Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Fri, 1 Dec 2023 17:57:34 -0700 Subject: [PATCH] Fix install locations and rpaths for pip installs --- CMakeLists.txt | 41 +++- bindings/Python/CMakeLists.txt | 31 +-- cmake/DetectOptions.cmake | 38 ++-- pyproject.toml | 8 +- source/adios2/toolkit/remote/CMakeLists.txt | 26 +-- source/adios2/toolkit/sst/util/CMakeLists.txt | 36 ++-- source/utils/CMakeLists.txt | 187 +++++++++--------- source/utils/adios_iotest/CMakeLists.txt | 17 +- thirdparty/EVPath/CMakeLists.txt | 3 + 9 files changed, 216 insertions(+), 171 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbf6895741..075f38e689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,39 @@ setup_version(2.9.0) project(ADIOS2 VERSION ${ADIOS2_VERSION}) +# Advanced option to tell CMake the build is on behalf of pip +set(ADIOS2_PIP_INSTALL OFF CACHE BOOL "Turn on for pip install") +mark_as_advanced(ADIOS2_PIP_INSTALL) + +if (ADIOS2_PIP_INSTALL) + # Required for shared library placement. + if (WIN32) + # Defaults are fine; handled by `delvewheel`. + elseif (APPLE) + set(CMAKE_INSTALL_LIBDIR + # Store libraries in a subdirectory here. + "adios2/.dylibs") + else () + set(CMAKE_INSTALL_LIBDIR + # Linux bundles what libraries we have when they're put beside the modules. + "adios2") + endif () + + if (APPLE) + # macOS loader settings. + set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) + set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) + set(CMAKE_INSTALL_NAME_DIR "@rpath") + list(APPEND CMAKE_INSTALL_RPATH + "@loader_path") + elseif (UNIX) + # ELF loader settings. + set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) + list(APPEND CMAKE_INSTALL_RPATH + "$ORIGIN") + endif () +endif () + #------------------------------------------------------------------------------# # Some boilerplate to setup nice output directories #------------------------------------------------------------------------------# @@ -109,10 +142,6 @@ set(ADIOS2_EXECUTABLE_SUFFIX "${ADIOS2_LIBRARY_SUFFIX}" CACHE STRING "Suffix to append to executable names") mark_as_advanced(ADIOS2_LIBRARY_SUFFIX ADIOS2_EXECUTABLE_SUFFIX) -# Advanced option to tell CMake the build is on behalf of pip -set(ADIOS2_PIP_INSTALL OFF CACHE BOOL "Turn on for pip install") -mark_as_advanced(ADIOS2_PIP_INSTALL) - # Use meta-compile features if available, otherwise use specific language # features if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Intel|Clang|AppleClang|MSVC)$") @@ -287,12 +316,12 @@ if(BUILD_SHARED_LIBS AND ADIOS2_RUN_INSTALL_TEST) set(ADIOS2_RUN_INSTALL_TEST FALSE) endif() else() - set(CMAKE_INSTALL_RPATH "@loader_path/${relative_base}/${CMAKE_INSTALL_LIBDIR}") + list(APPEND CMAKE_INSTALL_RPATH "@loader_path/${relative_base}/${CMAKE_INSTALL_LIBDIR}") endif() elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") # Linux needs some specialized RPATH handling - set(CMAKE_INSTALL_RPATH "$ORIGIN/${relative_base}/${CMAKE_INSTALL_LIBDIR}") + list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/${relative_base}/${CMAKE_INSTALL_LIBDIR}") endif() endif() diff --git a/bindings/Python/CMakeLists.txt b/bindings/Python/CMakeLists.txt index 782cd509d3..9e2f530e5c 100644 --- a/bindings/Python/CMakeLists.txt +++ b/bindings/Python/CMakeLists.txt @@ -47,12 +47,11 @@ set_target_properties(adios2_py PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2 ) - if(CMAKE_SYSTEM_NAME MATCHES "Linux") if (ADIOS2_PIP_INSTALL) - set_target_properties(adios2_py PROPERTIES - INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}" - ) + set_target_properties(adios2_py PROPERTIES + INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" + ) else() string(REGEX REPLACE "[^/]+" ".." relative_base "${CMAKE_INSTALL_PYTHONDIR}/adios2") set_target_properties(adios2_py PROPERTIES @@ -61,11 +60,21 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") endif() endif() -install(TARGETS adios2_py - DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/adios2 - COMPONENT adios2_python-python -) -install(FILES ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/__init__.py - DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/adios2 - COMPONENT adios2_python-python +if (ADIOS2_PIP_INSTALL) + install(TARGETS adios2_py + DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT adios2_python-python) + install(FILES ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/__init__.py + DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT adios2_python-python) +else () + install(TARGETS adios2_py + DESTINATION ${CMAKE_INSTALL_PYTHONDIR} + COMPONENT adios2_python-python + ) + install(FILES ${CMAKE_PYTHON_OUTPUT_DIRECTORY}/adios2/__init__.py + DESTINATION ${CMAKE_INSTALL_PYTHONDIR} + COMPONENT adios2_python-python ) +endif () + diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake index fd63ede3d9..d335dbb4e1 100644 --- a/cmake/DetectOptions.cmake +++ b/cmake/DetectOptions.cmake @@ -398,7 +398,9 @@ if(NOT SHARED_LIBS_SUPPORTED) endif() endif() -if(ADIOS2_USE_Python STREQUAL AUTO) +if(ADIOS2_PIP_INSTALL) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module NumPy) +elseif(ADIOS2_USE_Python STREQUAL AUTO) find_package(Python 3 COMPONENTS Interpreter Development NumPy) if(Python_FOUND AND ADIOS2_HAVE_MPI) find_package(PythonModule COMPONENTS mpi4py mpi4py/mpi4py.h) @@ -426,29 +428,21 @@ endif() if(Python_Interpreter_FOUND) # Setup output directories - if (ADIOS2_PIP_INSTALL) - # do it the pip way - set(CMAKE_INSTALL_PYTHONDIR ${Python_SITEARCH}) - set(CMAKE_PYTHON_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/${Python_SITEARCH} - ) + if(Python_Development_FOUND) + lists_get_prefix("Python_INCLUDE_DIRS;Python_LIBRARIES;Python_SITEARCH" _Python_DEVPREFIX) else() - if(Python_Development_FOUND) - lists_get_prefix("Python_INCLUDE_DIRS;Python_LIBRARIES;Python_SITEARCH" _Python_DEVPREFIX) - else() - lists_get_prefix("Python_EXECUTABLE;Python_SITEARCH" _Python_DEVPREFIX) - endif() - message("This is borked! _Python_DEVPREFIX = ${_Python_DEVPREFIX}, Python_SITEARCH = ${Python_SITEARCH}") - string_strip_prefix( - "${_Python_DEVPREFIX}" "${Python_SITEARCH}" CMAKE_INSTALL_PYTHONDIR_DEFAULT - ) - set(CMAKE_INSTALL_PYTHONDIR "${CMAKE_INSTALL_PYTHONDIR_DEFAULT}" - CACHE PATH "Install directory for python modules" - ) - set(CMAKE_PYTHON_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_PYTHONDIR} - ) + lists_get_prefix("Python_EXECUTABLE;Python_SITEARCH" _Python_DEVPREFIX) endif() + message("This is borked! _Python_DEVPREFIX = ${_Python_DEVPREFIX}, Python_SITEARCH = ${Python_SITEARCH}") + string_strip_prefix( + "${_Python_DEVPREFIX}" "${Python_SITEARCH}" CMAKE_INSTALL_PYTHONDIR_DEFAULT + ) + set(CMAKE_INSTALL_PYTHONDIR "${CMAKE_INSTALL_PYTHONDIR_DEFAULT}" + CACHE PATH "Install directory for python modules" + ) + set(CMAKE_PYTHON_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_PYTHONDIR} + ) mark_as_advanced(CMAKE_INSTALL_PYTHONDIR) endif() diff --git a/pyproject.toml b/pyproject.toml index 3f02b358fc..5d60e04485 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,9 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", ] +dependencies = [ + "numpy", +] [project.urls] Homepage = "https://github.com/ornladios/adios2" @@ -28,7 +31,6 @@ Issues = "https://github.com/ornladios/adios2/issues" [tool.scikit-build] wheel.packages = ["adios2"] -build-dir = "/data/scott/Documents/adios2/pip_build" [tool.scikit-build.cmake.define] ADIOS2_USE_Python = "ON" @@ -37,9 +39,11 @@ ADIOS2_USE_MPI = "OFF" ADIOS2_USE_HDF5 = "OFF" ADIOS2_USE_HDF5_VOL = "OFF" ADIOS2_USE_BZip2 = "OFF" -ADIOS2_USE_Blosc = "OFF" +ADIOS2_USE_Blosc2 = "OFF" ADIOS2_USE_DataMan = "OFF" ADIOS2_USE_SZ = "OFF" ADIOS2_USE_ZeroMQ = "OFF" ADIOS2_USE_ZFP = "OFF" ADIOS2_PIP_INSTALL = "ON" +BUILD_TESTING = "OFF" +ADIOS2_INSTALL_GENERATE_CONFIG = "OFF" diff --git a/source/adios2/toolkit/remote/CMakeLists.txt b/source/adios2/toolkit/remote/CMakeLists.txt index b3b49d6159..9971799724 100644 --- a/source/adios2/toolkit/remote/CMakeLists.txt +++ b/source/adios2/toolkit/remote/CMakeLists.txt @@ -3,19 +3,21 @@ # accompanying file Copyright.txt for details. #------------------------------------------------------------------------------# -add_executable(remote_server ./remote_server.cpp remote_common.cpp) +if (NOT ADIOS2_PIP_INSTALL) + add_executable(remote_server ./remote_server.cpp remote_common.cpp) -target_link_libraries(remote_server PUBLIC EVPath::EVPath adios2_core adios2sys - PRIVATE $<$:shlwapi>) + target_link_libraries(remote_server PUBLIC EVPath::EVPath adios2_core adios2sys + PRIVATE $<$:shlwapi>) -get_property(pugixml_headers_path - TARGET pugixml - PROPERTY INTERFACE_INCLUDE_DIRECTORIES -) + get_property(pugixml_headers_path + TARGET pugixml + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + ) -target_include_directories(remote_server PRIVATE ${PROJECT_BINARY_DIR} ${pugixml_headers_path}) + target_include_directories(remote_server PRIVATE ${PROJECT_BINARY_DIR} ${pugixml_headers_path}) -set_property(TARGET remote_server PROPERTY OUTPUT_NAME remote_server${ADIOS2_EXECUTABLE_SUFFIX}) -install(TARGETS remote_server EXPORT adios2 - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime -) + set_property(TARGET remote_server PROPERTY OUTPUT_NAME remote_server${ADIOS2_EXECUTABLE_SUFFIX}) + install(TARGETS remote_server EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime + ) +endif () diff --git a/source/adios2/toolkit/sst/util/CMakeLists.txt b/source/adios2/toolkit/sst/util/CMakeLists.txt index 7f7ec99db9..8e2700fa95 100644 --- a/source/adios2/toolkit/sst/util/CMakeLists.txt +++ b/source/adios2/toolkit/sst/util/CMakeLists.txt @@ -3,25 +3,27 @@ # accompanying file Copyright.txt for details. #------------------------------------------------------------------------------# -if(ADIOS2_HAVE_MPI) - set(maybe_adios2_core_mpi adios2_core_mpi) -else() - set(maybe_adios2_core_mpi) -endif() +if (NOT ADIOS2_PIP_INSTALL) + if(ADIOS2_HAVE_MPI) + set(maybe_adios2_core_mpi adios2_core_mpi) + else() + set(maybe_adios2_core_mpi) + endif() -# stt_conn_tool -add_executable(sst_conn_tool sst_conn_tool.c sst_conn_tool.cxx) -target_link_libraries(sst_conn_tool ${maybe_adios2_core_mpi} adios2_core) -set_property(TARGET sst_conn_tool PROPERTY OUTPUT_NAME sst_conn_tool${ADIOS2_EXECUTABLE_SUFFIX}) + # stt_conn_tool + add_executable(sst_conn_tool sst_conn_tool.c sst_conn_tool.cxx) + target_link_libraries(sst_conn_tool ${maybe_adios2_core_mpi} adios2_core) + set_property(TARGET sst_conn_tool PROPERTY OUTPUT_NAME sst_conn_tool${ADIOS2_EXECUTABLE_SUFFIX}) -if(WIN32) - target_link_libraries(sst_conn_tool getopt) -endif() + if(WIN32) + target_link_libraries(sst_conn_tool getopt) + endif() -target_link_libraries(sst_conn_tool sst adios2::thirdparty::EVPath) + target_link_libraries(sst_conn_tool sst adios2::thirdparty::EVPath) -target_include_directories(sst_conn_tool PRIVATE .. ../cp ) + target_include_directories(sst_conn_tool PRIVATE .. ../cp ) -install(TARGETS sst_conn_tool EXPORT adios2 - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime -) + install(TARGETS sst_conn_tool EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime + ) +endif () diff --git a/source/utils/CMakeLists.txt b/source/utils/CMakeLists.txt index 5d46d91c23..3ac709099c 100644 --- a/source/utils/CMakeLists.txt +++ b/source/utils/CMakeLists.txt @@ -3,115 +3,116 @@ # accompanying file Copyright.txt for details. #------------------------------------------------------------------------------# -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/verinfo.h.in - ${PROJECT_BINARY_DIR}/verinfo.h - @ONLY -) +if (NOT ADIOS2_PIP_INSTALL) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/verinfo.h.in + ${PROJECT_BINARY_DIR}/verinfo.h + @ONLY + ) -# BPLS -add_executable(bpls ./bpls/bpls.cpp) -target_link_libraries(bpls - PUBLIC adios2_core adios2sys - PRIVATE $<$:shlwapi>) + # BPLS + add_executable(bpls ./bpls/bpls.cpp) + target_link_libraries(bpls + PUBLIC adios2_core adios2sys + PRIVATE $<$:shlwapi>) -get_property(pugixml_headers_path - TARGET pugixml - PROPERTY INTERFACE_INCLUDE_DIRECTORIES -) + get_property(pugixml_headers_path + TARGET pugixml + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + ) -target_include_directories(bpls PRIVATE - ${PROJECT_BINARY_DIR} - ${PROJECT_SOURCE_DIR}/bindings/C - ${pugixml_headers_path} -) + target_include_directories(bpls PRIVATE + ${PROJECT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}/bindings/C + ${pugixml_headers_path} + ) -set_property(TARGET bpls PROPERTY OUTPUT_NAME bpls${ADIOS2_EXECUTABLE_SUFFIX}) -install(TARGETS bpls EXPORT adios2 - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime -) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/bpls/bpls.cmake.gen.in - ${PROJECT_BINARY_DIR}/bpls.cmake.gen - @ONLY -) -file(GENERATE - OUTPUT ${PROJECT_BINARY_DIR}/$/bpls.cmake - INPUT ${PROJECT_BINARY_DIR}/bpls.cmake.gen -) + set_property(TARGET bpls PROPERTY OUTPUT_NAME bpls${ADIOS2_EXECUTABLE_SUFFIX}) + install(TARGETS bpls EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime + ) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/bpls/bpls.cmake.gen.in + ${PROJECT_BINARY_DIR}/bpls.cmake.gen + @ONLY + ) + file(GENERATE + OUTPUT ${PROJECT_BINARY_DIR}/$/bpls.cmake + INPUT ${PROJECT_BINARY_DIR}/bpls.cmake.gen + ) + # BPSPLIT + #add_executable(bpsplit ./bpsplit/bpsplit.cpp) + #target_link_libraries(bpsplit adios2::cxx11 adios2sys_interface adios2::thirdparty::pugixml) + #install(TARGETS bpsplit EXPORT adios2 + # RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + #) -# BPSPLIT -#add_executable(bpsplit ./bpsplit/bpsplit.cpp) -#target_link_libraries(bpsplit adios2::cxx11 adios2sys_interface adios2::thirdparty::pugixml) -#install(TARGETS bpsplit EXPORT adios2 -# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -#) + # ADIOS_REORGANIZE + set(adios_reorganize_srcs + adios_reorganize/main.cpp + adios_reorganize/Reorganize.cpp + Utils.cpp + ) + if(ADIOS2_HAVE_MGARD) + set(maybe_mgard mgard::mgard) + else() + set(maybe_mgard) + endif() + add_executable(adios_reorganize ${adios_reorganize_srcs}) + target_link_libraries(adios_reorganize PRIVATE adios2_core ${maybe_mgard}) + set_property(TARGET adios_reorganize PROPERTY OUTPUT_NAME adios2_reorganize${ADIOS2_EXECUTABLE_SUFFIX}) -# ADIOS_REORGANIZE -set(adios_reorganize_srcs - adios_reorganize/main.cpp - adios_reorganize/Reorganize.cpp - Utils.cpp - ) -if(ADIOS2_HAVE_MGARD) - set(maybe_mgard mgard::mgard) -else() - set(maybe_mgard) -endif() -add_executable(adios_reorganize ${adios_reorganize_srcs}) -target_link_libraries(adios_reorganize PRIVATE adios2_core ${maybe_mgard}) -set_property(TARGET adios_reorganize PROPERTY OUTPUT_NAME adios2_reorganize${ADIOS2_EXECUTABLE_SUFFIX}) + if(ADIOS2_HAVE_MPI) + add_executable(adios_reorganize_mpi ${adios_reorganize_srcs}) + target_link_libraries(adios_reorganize_mpi PRIVATE adios2_core_mpi ${maybe_mgard}) + set_property(TARGET adios_reorganize_mpi PROPERTY OUTPUT_NAME adios2_reorganize_mpi${ADIOS2_EXECUTABLE_SUFFIX}) + set(maybe_adios_reorganize_mpi adios_reorganize_mpi) + else() + set(maybe_adios_reorganize_mpi) + endif() -if(ADIOS2_HAVE_MPI) - add_executable(adios_reorganize_mpi ${adios_reorganize_srcs}) - target_link_libraries(adios_reorganize_mpi PRIVATE adios2_core_mpi ${maybe_mgard}) - set_property(TARGET adios_reorganize_mpi PROPERTY OUTPUT_NAME adios2_reorganize_mpi${ADIOS2_EXECUTABLE_SUFFIX}) - set(maybe_adios_reorganize_mpi adios_reorganize_mpi) -else() - set(maybe_adios_reorganize_mpi) -endif() + install(TARGETS adios_reorganize + ${maybe_adios_reorganize_mpi} + EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime + ) -install(TARGETS adios_reorganize - ${maybe_adios_reorganize_mpi} - EXPORT adios2 - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime -) + if(ADIOS2_HAVE_MPI) + add_subdirectory(adios_iotest) + endif() -if(ADIOS2_HAVE_MPI) - add_subdirectory(adios_iotest) -endif() + if(Python_Interpreter_FOUND) + add_subdirectory(bp4dbg) + add_subdirectory(bp5dbg) + install(PROGRAMS adios2_json_pp.py + RENAME adios2_json_pp + DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT adios2_scripts-runtime) + endif() -if(Python_Interpreter_FOUND) - add_subdirectory(bp4dbg) - add_subdirectory(bp5dbg) - install(PROGRAMS adios2_json_pp.py - RENAME adios2_json_pp + install(PROGRAMS adios2_deactivate_bp + RENAME adios2_deactivate_bp DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_scripts-runtime) -endif() -install(PROGRAMS adios2_deactivate_bp - RENAME adios2_deactivate_bp - DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT adios2_scripts-runtime) - -# Simplified wrappers for adios2_reorganize -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/adios_reorganize/adios2_reorganize_wrapper - ${PROJECT_BINARY_DIR}/adios2_reorganize_wrapper - @ONLY -) - -if(ADIOS2_HAVE_HDF5) - install(PROGRAMS ${PROJECT_BINARY_DIR}/adios2_reorganize_wrapper - RENAME bp2h5${ADIOS2_EXECUTABLE_SUFFIX} - DESTINATION ${CMAKE_INSTALL_BINDIR} + # Simplified wrappers for adios2_reorganize + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/adios_reorganize/adios2_reorganize_wrapper + ${PROJECT_BINARY_DIR}/adios2_reorganize_wrapper + @ONLY ) - if(ADIOS2_HAVE_MPI) + + if(ADIOS2_HAVE_HDF5) install(PROGRAMS ${PROJECT_BINARY_DIR}/adios2_reorganize_wrapper - RENAME bp2h5_mpi${ADIOS2_EXECUTABLE_SUFFIX} + RENAME bp2h5${ADIOS2_EXECUTABLE_SUFFIX} DESTINATION ${CMAKE_INSTALL_BINDIR} ) + if(ADIOS2_HAVE_MPI) + install(PROGRAMS ${PROJECT_BINARY_DIR}/adios2_reorganize_wrapper + RENAME bp2h5_mpi${ADIOS2_EXECUTABLE_SUFFIX} + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + endif() endif() -endif() +endif () diff --git a/source/utils/adios_iotest/CMakeLists.txt b/source/utils/adios_iotest/CMakeLists.txt index fc490e63b4..8711a3c664 100644 --- a/source/utils/adios_iotest/CMakeLists.txt +++ b/source/utils/adios_iotest/CMakeLists.txt @@ -29,11 +29,12 @@ if(ADIOS2_HAVE_HDF5 AND HDF5_IS_PARALLEL) endif() - -install(TARGETS adios_iotest EXPORT adios2 - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime -) - -install(DIRECTORY iotest-config/ - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config COMPONENT adios2_tools-data -) +if (not ADIOS2_PIP_INSTALL) + install(TARGETS adios_iotest EXPORT adios2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime + ) + + install(DIRECTORY iotest-config/ + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/iotest-config COMPONENT adios2_tools-data + ) +endif() diff --git a/thirdparty/EVPath/CMakeLists.txt b/thirdparty/EVPath/CMakeLists.txt index 42de1109e6..0ea63102cf 100644 --- a/thirdparty/EVPath/CMakeLists.txt +++ b/thirdparty/EVPath/CMakeLists.txt @@ -17,6 +17,9 @@ set(EVPATH_LIBRARY_COMPONENT adios2_evpath-libraries) set(EVPATH_ARCHIVE_COMPONENT adios2_evpath-development) set(EVPATH_HEADER_COMPONENT adios2_evpath-development) +string(REGEX REPLACE "[^/]+" ".." relative_base "${EVPATH_INSTALL_MODULE_DIR}") +list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/${relative_base}/${CMAKE_INSTALL_LIBDIR}") + add_subdirectory(EVPath) set(EVPath_DIR ${CMAKE_CURRENT_BINARY_DIR}/EVPath CACHE INTERNAL "") setup_libversion_dir(EVPath)