Commit 6b298607 authored by Stephen's avatar Stephen
Browse files

Change install call to use original if not conda build

parent 333510d4
......@@ -574,11 +574,9 @@ target_include_directories(API PUBLIC
generate_mantid_export_header(API TRUE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidAPITargets")
mtd_install_dylib(TARGETS API INSTALL_EXPORT_FILE 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS API INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS API INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
endif()
\ No newline at end of file
......@@ -1073,17 +1073,16 @@ target_include_directories(Algorithms PUBLIC
generate_mantid_export_header(Algorithms FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidAlgorithmsTargets")
mtd_install_dylib(TARGETS
mtd_install_framework_lib(TARGETS
Algorithms
INSTALL_EXPORT_FILE
EXPORT_NAME ${TARGET_EXPORT_NAME}
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
\ No newline at end of file
EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Algorithms
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
\ No newline at end of file
......@@ -67,11 +67,13 @@ target_include_directories(Beamline PUBLIC
generate_mantid_export_header(Beamline FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidBeamlineTargets")
mtd_install_dylib(TARGETS Beamline INSTALL_EXPORT_FILE 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS Beamline INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Beamline
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
\ No newline at end of file
......@@ -180,7 +180,7 @@ if(NOT FULL_PACKAGE_BUILD)
add_subdirectory(PostInstall)
endif()
if (CONDA_BUILD)
configure_package_config_file(${CMAKE_SOURCE_DIR}/buildconfig/CMake/MantidFrameworkConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/MantidFrameworkConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework)
......@@ -196,7 +196,6 @@ install(FILES
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
install(FILES
${CMAKE_SOURCE_DIR}/buildconfig/CMake/FindNexus.cmake
${CMAKE_SOURCE_DIR}/buildconfig/CMake/FindJsonCPP.cmake
......@@ -204,3 +203,4 @@ ${CMAKE_SOURCE_DIR}/buildconfig/CMake/FindTBB.cmake
${CMAKE_SOURCE_DIR}/buildconfig/CMake/FindMuParser.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework/find_modules
)
endif()
\ No newline at end of file
......@@ -71,11 +71,13 @@ target_include_directories(Catalog PUBLIC
generate_mantid_export_header(Catalog TRUE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidCatalogTargets")
mtd_install_dylib(TARGETS Catalog INSTALL_EXPORT_FILE 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS Catalog INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Catalog
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
\ No newline at end of file
......@@ -276,10 +276,13 @@ target_include_directories(Crystal PUBLIC
generate_mantid_export_header(Crystal FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidCrystalTargets")
mtd_install_dylib(TARGETS Crystal INSTALL_EXPORT_FILE 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)
mtd_install_framework_lib(TARGETS Crystal INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Crystal
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
\ No newline at end of file
......@@ -543,11 +543,13 @@ target_include_directories(CurveFitting PUBLIC
generate_mantid_export_header(CurveFitting FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidCurveFittingTargets")
mtd_install_dylib(TARGETS CurveFitting INSTALL_EXPORT_FILE 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS CurveFitting INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
CurveFitting
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
\ No newline at end of file
......@@ -712,11 +712,13 @@ endif()
add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidDataHandlingTargets")
mtd_install_dylib(TARGETS DataHandling 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS DataHandling EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
DataHandling
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
\ No newline at end of file
......@@ -257,11 +257,13 @@ target_link_libraries(DataObjects PUBLIC Mantid::API Mantid::Geometry Mantid::Hi
add_subdirectory(test)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidDataObjectsTargets")
mtd_install_dylib(TARGETS DataObjects 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS DataObjects EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
DataObjects
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
\ No newline at end of file
......@@ -523,11 +523,14 @@ target_include_directories(Geometry PUBLIC
)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidGeometryTargets")
mtd_install_dylib(TARGETS Geometry EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
mtd_install_framework_lib(TARGETS Geometry EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Geometry
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
\ No newline at end of file
......@@ -150,11 +150,14 @@ target_include_directories(HistogramData PUBLIC
generate_mantid_export_header(HistogramData FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidHistogramDataTargets")
mtd_install_dylib(TARGETS HistogramData INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
mtd_install_framework_lib(TARGETS HistogramData INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
HistogramData
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
\ No newline at end of file
......@@ -120,12 +120,14 @@ target_include_directories(ICat PUBLIC
generate_mantid_export_header(ICat True)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidICatTargets")
mtd_install_dylib(TARGETS ICat INSTALL_EXPORT_FILE 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
)
mtd_install_framework_lib(TARGETS ICat INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
ICat
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
......@@ -105,11 +105,14 @@ target_include_directories(Indexing PUBLIC
generate_mantid_export_header(Indexing TRUE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidIndexingTargets")
mtd_install_dylib(TARGETS Indexing INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
mtd_install_framework_lib(TARGETS Indexing INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Indexing
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
......@@ -43,18 +43,6 @@ target_include_directories(Json PUBLIC
generate_mantid_export_header(Json FALSE)
# Installation settings
set(TARGET_EXPORT_NAME "MantidJsonTargets")
mtd_install_dylib(TARGETS Json INSTALL_EXPORT_FILE 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
)
if(CXXTEST_FOUND)
cxxtest_add_test(JsonTest ${TEST_FILES})
......@@ -67,3 +55,15 @@ add_dependencies(FrameworkTests JsonTest)
set_property(TARGET JsonTest PROPERTY FOLDER "UnitTests")
endif()
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidJsonTargets")
mtd_install_framework_lib(TARGETS Json INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Json
INSTALL_DIRS
${LIB_DIR}
${WORKBENCH_LIB_DIR})
endif()
......@@ -614,16 +614,6 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/Mantid.properties.config)
endif()
# Installation settings
set(TARGET_EXPORT_NAME "MantidKernelTargets")
mtd_install_dylib(TARGETS Kernel 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
)
# Create the properties file for the installer
set(MANTID_ROOT_BUILD ${MANTID_ROOT})
......@@ -663,3 +653,10 @@ mtd_install_files(FILES ${CMAKE_CURRENT_BINARY_DIR}/Mantid.properties.install
INSTALL_DIRS ${BIN_DIR} ${WORKBENCH_BIN_DIR}
RENAME Mantid.properties)
# Installation settings
if(CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidKernelTargets")
mtd_install_framework_lib(TARGETS Kernel EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS Kernel INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
endif()
\ No newline at end of file
......@@ -153,11 +153,14 @@ target_include_directories(LiveData PUBLIC
generate_mantid_export_header(LiveData FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidLiveDataTargets")
mtd_install_dylib(TARGETS LiveData INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
mtd_install_framework_lib(TARGETS LiveData INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
LiveData
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
install(EXPORT ${TARGET_EXPORT_NAME}
FILE ${TARGET_EXPORT_NAME}.cmake
NAMESPACE Mantid::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)
\ No newline at end of file
......@@ -399,8 +399,16 @@ target_link_libraries(MDAlgorithms PUBLIC Mantid::API Mantid::DataObjects Mantid
add_subdirectory(test)
# Installation settings
mtd_install_dylib(TARGETS
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMDAlgorithmsTargets")
mtd_install_framework_lib(TARGETS
MDAlgorithms
EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
MDAlgorithms
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
......@@ -36,7 +36,7 @@ target_link_libraries(MPIAlgorithms PUBLIC Mantid::API Mantid::DataObjects PRIVA
add_subdirectory(test)
# Installation settings
mtd_install_dylib(TARGETS
mtd_install_targets(TARGETS
MPIAlgorithms
INSTALL_DIRS
${PLUGINS_DIR}
......
......@@ -120,11 +120,13 @@ target_include_directories(Muon PUBLIC
generate_mantid_export_header(Muon FALSE)
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidMuonTargets")
mtd_install_dylib(TARGETS Muon INSTALL_EXPORT_FILE 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS Muon INSTALL_EXPORT_FILE EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS
Muon
INSTALL_DIRS
${PLUGINS_DIR}
${WORKBENCH_PLUGINS_DIR})
endif()
\ No newline at end of file
......@@ -48,12 +48,9 @@ target_link_libraries(Nexus PUBLIC Mantid::API Mantid::DataObjects Mantid::Kerne
add_subdirectory(test)
# Installation settings
# Installation settings
if (CONDA_BUILD)
set(TARGET_EXPORT_NAME "MantidNexusTargets")
mtd_install_dylib(TARGETS Nexus 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
)
\ No newline at end of file
mtd_install_framework_lib(TARGETS Nexus EXPORT_NAME ${TARGET_EXPORT_NAME})
else()
mtd_install_targets(TARGETS Nexus INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})
endif()
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