Commit d7522dc4 authored by Stephen's avatar Stephen
Browse files

Amend plugin lib install

Amend target functions
parent e1246f95
......@@ -1068,13 +1068,7 @@ generate_mantid_export_header(Algorithms FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidAlgorithmsTargets")
mtd_install_framework_lib(TARGETS
Algorithms
INSTALL_EXPORT_FILE
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS Algorithms PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
Algorithms
......
......@@ -277,12 +277,7 @@ generate_mantid_export_header(Crystal FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidCrystalTargets")
mtd_install_framework_lib(TARGETS Crystal
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS Crystal PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
Crystal
......
......@@ -544,12 +544,7 @@ generate_mantid_export_header(CurveFitting FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidCurveFittingTargets")
mtd_install_framework_lib(TARGETS CurveFitting INSTALL_EXPORT_FILE
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS CurveFitting PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
CurveFitting
......
......@@ -711,8 +711,7 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidDataHandlingTargets")
mtd_install_framework_lib(TARGETS DataHandling EXPORT_NAME ${TARGET_EXPORT_NAME} LIB_DIR lib BIN_DIR ${PLUGINS_DIR})
mtd_install_framework_lib(TARGETS DataHandling PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
DataHandling
......
......@@ -121,12 +121,7 @@ generate_mantid_export_header(ICat True)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidICatTargets")
mtd_install_framework_lib(TARGETS ICat
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS ICat PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
ICat
......
......@@ -154,12 +154,7 @@ generate_mantid_export_header(LiveData FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidLiveDataTargets")
mtd_install_framework_lib(TARGETS LiveData
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS LiveData PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
LiveData
......
......@@ -400,12 +400,7 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMDAlgorithmsTargets")
mtd_install_framework_lib(TARGETS
MDAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib)
mtd_install_framework_lib(TARGETS MDAlgorithms PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
MDAlgorithms
......
......@@ -122,10 +122,8 @@ generate_mantid_export_header(Muon FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMuonTargets")
mtd_install_framework_lib(TARGETS Muon INSTALL_EXPORT_FILE
mtd_install_framework_lib(TARGETS Muon PLUGIN_LIB INSTALL_EXPORT_FILE
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
......
......@@ -124,12 +124,7 @@ generate_mantid_export_header(Reflectometry FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidReflectometryTargets")
mtd_install_framework_lib(TARGETS Reflectometry
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS Reflectometry PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
Reflectometry
......
......@@ -81,12 +81,7 @@ add_subdirectory(test) # Note: No tests yet for many remote algorithms...
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidRemoteAlgorithmsTargets")
mtd_install_framework_lib(TARGETS RemoteAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS RemoteAlgorithms PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
RemoteAlgorithms
......
......@@ -58,12 +58,7 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidRemoteJobManagersTargets")
mtd_install_framework_lib(TARGETS RemoteJobManagers
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS RemoteJobManagers PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
RemoteJobManagers
......
......@@ -177,12 +177,7 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidSINQTargets")
mtd_install_framework_lib(TARGETS SINQ
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS SINQ PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
SINQ
......
......@@ -48,12 +48,7 @@ set_property(TARGET ScriptRepository PROPERTY FOLDER "MantidFramework")
target_link_libraries(ScriptRepository PUBLIC Mantid::Kernel Mantid::API PRIVATE Mantid::Json)
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidScriptRepositoryTargets")
mtd_install_framework_lib(TARGETS ScriptRepository
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS ScriptRepository PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
ScriptRepository
......
......@@ -144,12 +144,7 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidWorkflowAlgorithmsTargets")
mtd_install_framework_lib(TARGETS WorkflowAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
mtd_install_framework_lib(TARGETS WorkflowAlgorithms PLUGIN_LIB)
else()
mtd_install_targets(TARGETS
WorkflowAlgorithms
......
......@@ -42,20 +42,6 @@ set(MODULES
DataObjects
Catalog
Nexus
DataHandling
Algorithms
WorkflowAlgorithms
CurveFitting
MDAlgorithms
Crystal
ICat
LiveData
RemoteAlgorithms
RemoteJobManagers
SINQ
ScriptRepository
Muon
Reflectometry
PythonInterfaceCore
)
......
......@@ -24,11 +24,16 @@ endfunction()
# Install a framework library (used primarily for a conda install)
function (mtd_install_framework_lib)
set (options INSTALL_EXPORT_FILE)
set (oneValueArgs TARGETS EXPORT_NAME BIN_DIR LIB_DIR)
set (options INSTALL_EXPORT_FILE PLUGIN_LIB)
set (oneValueArgs TARGETS EXPORT_NAME)
set (multiValueArgs INSTALL_DIRS)
cmake_parse_arguments (PARSED "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
# if its a plugin we don't need to headers or .lib file
# we also don't need to export the cmake targets
if (PARSED_PLUGIN_LIB)
install(TARGETS ${PARSED_TARGETS} RUNTIME DESTINATION plugins)
else()
install(
DIRECTORY inc/
DESTINATION include/Mantid
......@@ -40,15 +45,11 @@ if(PARSED_INSTALL_EXPORT_FILE)
DESTINATION include/Mantid/Mantid${PARSED_TARGETS}
COMPONENT Devel)
endif()
if (NOT PARSED_LIB_DIR)
set(LIB_DIR lib)
set(BIN_DIR bin)
endif()
install ( TARGETS ${PARSED_TARGETS}
EXPORT ${PARSED_EXPORT_NAME}
LIBRARY DESTINATION ${PARSED_LIB_DIR}
ARCHIVE DESTINATION ${PARSED_LIB_DIR}
RUNTIME DESTINATION ${PARSED_BIN_DIR})
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
install(EXPORT ${PARSED_EXPORT_NAME}
FILE ${PARSED_EXPORT_NAME}.cmake
......@@ -56,6 +57,7 @@ install(EXPORT ${PARSED_EXPORT_NAME}
COMPONENT Devel
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
endif()
endfunction()
......
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