Commit ef27a939 authored by Stephen's avatar Stephen
Browse files

final exports

parent c12936d2
......@@ -143,8 +143,11 @@ target_link_libraries(WorkflowAlgorithms PUBLIC Mantid::Nexus Mantid::API Mantid
add_subdirectory(test)
# Installation settings
mtd_install_dylib(TARGETS
WorkflowAlgorithms
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
set(TARGET_EXPORT_NAME "MantidWorkflowAlgorithmsTargets")
mtd_install_dylib(TARGETS WorkflowAlgorithms EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
......@@ -99,6 +99,10 @@ endif()
find_package(Doxygen) # optional
# This is far more complicated than it has to be.
# The issue is the library is found in different ways on all three OS platforms
# Once we move to conda build we can just use the cmake finder...
# At the moment this is necessary so we can link to targets rather than a library list..
if(CMAKE_HOST_WIN32 AND NOT CONDA_BUILD)
find_package(ZLIB REQUIRED CONFIGS zlib-config.cmake)
set(HDF5_DIR "${THIRD_PARTY_DIR}/cmake/hdf5")
......@@ -108,9 +112,16 @@ if(CMAKE_HOST_WIN32 AND NOT CONDA_BUILD)
REQUIRED CONFIGS hdf5-config.cmake
)
set(HDF5_LIBRARIES hdf5::hdf5_cpp-shared hdf5::hdf5_hl-shared)
add_library(hdf5::hdf5_cpp ALIAS hdf5::hdf5_cpp-shared)
add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-shared)
add_library(hdf5::hdf5 ALIAS hdf5::hdf5-shared)
elseif(CONDA_BUILD)
# We'll use the cmake finder
find_package(ZLIB REQUIRED)
find_package(
HDF5
COMPONENTS C CXX HL
REQUIRED
)
set(HDF5_LIBRARIES hdf5::hdf5_cpp hdf5::hdf5)
set(HDF5_HL_LIBRARIES hdf5::hdf5_hl)
else()
# We'll use the cmake finder
find_package(ZLIB REQUIRED)
......@@ -429,7 +440,7 @@ if (ENABLE_PRECOMMIT)
message ( FATAL_ERROR "Failed to find pre-commit see https://developer.mantidproject.org/GettingStarted.html" )
endif ()
if (MSVC)
if (WIN32)
if(CONDA_BUILD)
execute_process(COMMAND "${PRE_COMMIT_EXE}" install --overwrite WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE PRE_COMMIT_RESULT)
else()
......
......@@ -27,23 +27,36 @@ find_dependency(MuParser)
set(CMAKE_MODULE_PATH "${_mypackage_module_path_save}")
unset(_mypackage_module_path_save)
include("${CMAKE_CURRENT_LIST_DIR}/MantidTypesTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidJsonTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidKernelTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidParallelTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidHistogramDataTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidIndexingTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidBeamlineTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidGeometryTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/MantidAPITargets.cmake")
check_required_components(MantidTypesTargets)
check_required_components(MantidJsonTargets)
check_required_components(MantidKernelTargets)
check_required_components(MantidParallelTargets)
check_required_components(MantidHistogramDataTargets)
check_required_components(MantidIndexingTargets)
check_required_components(MantidBeamlineTargets)
check_required_components(MantidGeometryTargets)
check_required_components(MantidAPITargets)
\ No newline at end of file
set(MODULES
Types
Json
Kernel
Parallel
HistogramData
Indexing
Beamline
Geometry
API
NexusGeometry
DataObjects
Catalog
Nexus
DataHandling
Algorithms
WorkflowAlgorithms
CurveFitting
Crystal
ICat
LiveData
RemoteAlgorithms
RemoteJobManagers
SINQ
Muon
Reflectometry
)
foreach(module ${MODULES})
include("${CMAKE_CURRENT_LIST_DIR}/Mantid${module}Targets.cmake")
check_required_components(Mantid${module}Targets)
list(APPEND MantidFramework_Libraries "Mantid::${module}")
endforeach()
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