Commit e1246f95 authored by Stephen's avatar Stephen
Browse files

Fix plugin install directory

parent fab12fec
......@@ -1072,6 +1072,8 @@ 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})
else()
mtd_install_targets(TARGETS
......
......@@ -278,7 +278,11 @@ 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})
mtd_install_framework_lib(TARGETS Crystal
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
Crystal
......
......@@ -545,7 +545,11 @@ 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})
mtd_install_framework_lib(TARGETS CurveFitting INSTALL_EXPORT_FILE
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
CurveFitting
......
......@@ -712,7 +712,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})
mtd_install_framework_lib(TARGETS DataHandling EXPORT_NAME ${TARGET_EXPORT_NAME} LIB_DIR lib BIN_DIR ${PLUGINS_DIR})
else()
mtd_install_targets(TARGETS
DataHandling
......
......@@ -122,7 +122,11 @@ 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})
mtd_install_framework_lib(TARGETS ICat
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
ICat
......
......@@ -155,7 +155,11 @@ 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})
mtd_install_framework_lib(TARGETS LiveData
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
LiveData
......
......@@ -403,7 +403,9 @@ if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMDAlgorithmsTargets")
mtd_install_framework_lib(TARGETS
MDAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME})
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib)
else()
mtd_install_targets(TARGETS
MDAlgorithms
......
......@@ -122,7 +122,11 @@ 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 EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS Muon INSTALL_EXPORT_FILE
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
Muon
......
......@@ -125,7 +125,11 @@ 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})
mtd_install_framework_lib(TARGETS Reflectometry
INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
Reflectometry
......
......@@ -82,7 +82,11 @@ 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})
mtd_install_framework_lib(TARGETS RemoteAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
RemoteAlgorithms
......
......@@ -59,7 +59,11 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidRemoteJobManagersTargets")
mtd_install_framework_lib(TARGETS RemoteJobManagers EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS RemoteJobManagers
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
RemoteJobManagers
......
......@@ -178,7 +178,11 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidSINQTargets")
mtd_install_framework_lib(TARGETS SINQ EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS SINQ
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
SINQ
......
......@@ -49,7 +49,11 @@ target_link_libraries(ScriptRepository PUBLIC Mantid::Kernel Mantid::API PRIVATE
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidScriptRepositoryTargets")
mtd_install_framework_lib(TARGETS ScriptRepository EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS ScriptRepository
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
ScriptRepository
......
......@@ -145,7 +145,11 @@ add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidWorkflowAlgorithmsTargets")
mtd_install_framework_lib(TARGETS WorkflowAlgorithms EXPORT_NAME ${TARGET_EXPORT_NAME})
mtd_install_framework_lib(TARGETS WorkflowAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME}
BIN_DIR ${PLUGINS_DIR}
LIB_DIR lib
)
else()
mtd_install_targets(TARGETS
WorkflowAlgorithms
......
......@@ -25,7 +25,7 @@ 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)
set (oneValueArgs TARGETS EXPORT_NAME BIN_DIR LIB_DIR)
set (multiValueArgs INSTALL_DIRS)
cmake_parse_arguments (PARSED "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
......@@ -40,11 +40,15 @@ 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 lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
LIBRARY DESTINATION ${PARSED_LIB_DIR}
ARCHIVE DESTINATION ${PARSED_LIB_DIR}
RUNTIME DESTINATION ${PARSED_BIN_DIR})
install(EXPORT ${PARSED_EXPORT_NAME}
FILE ${PARSED_EXPORT_NAME}.cmake
......
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