diff --git a/Framework/API/CMakeLists.txt b/Framework/API/CMakeLists.txt index 94ed3d4ef037105f540199cd69cac2063d0a9572..5afd011c1e9098f940964d4f6c9d9d7cc0e8d749 100644 --- a/Framework/API/CMakeLists.txt +++ b/Framework/API/CMakeLists.txt @@ -497,7 +497,9 @@ set_target_properties ( API PROPERTIES OUTPUT_NAME MantidAPI COMPILE_DEFINITIONS IN_MANTID_API ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( API PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(API PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(API PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/Algorithms/CMakeLists.txt b/Framework/Algorithms/CMakeLists.txt index bcaa79250a4f638057efe0ec903937c64c0f87eb..5ecfac48d9482a8f4e31436084f61b53f4eaf60c 100644 --- a/Framework/Algorithms/CMakeLists.txt +++ b/Framework/Algorithms/CMakeLists.txt @@ -1008,7 +1008,9 @@ set_target_properties ( Algorithms PROPERTIES OUTPUT_NAME MantidAlgorithms ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Algorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") + set_target_properties(Algorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Algorithms PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/Beamline/CMakeLists.txt b/Framework/Beamline/CMakeLists.txt index bfca80bd321400136038456e6e0e48a70a429392..5d3253bff2446886aa79de5643db8249d09314d2 100644 --- a/Framework/Beamline/CMakeLists.txt +++ b/Framework/Beamline/CMakeLists.txt @@ -34,7 +34,9 @@ add_library ( Beamline ${SRC_FILES} ${INC_FILES} ) set_target_properties ( Beamline PROPERTIES OUTPUT_NAME MantidBeamline COMPILE_DEFINITIONS IN_MANTID_BEAMLINE ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Beamline PROPERTIES INSTALL_RPATH "@loader_path/../MacOS" ) + set_target_properties(Beamline PROPERTIES INSTALL_RPATH "@loader_path/../MacOS" ) +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Beamline PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif() target_include_directories( Beamline SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) diff --git a/Framework/Crystal/CMakeLists.txt b/Framework/Crystal/CMakeLists.txt index 042587f8647dd711390f9094ff3e794c0f50ec2b..fcc6c95a1e9b4c2b76a5f5a34cd12231012b0234 100644 --- a/Framework/Crystal/CMakeLists.txt +++ b/Framework/Crystal/CMakeLists.txt @@ -230,7 +230,9 @@ add_library ( Crystal ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library set_target_properties ( Crystal PROPERTIES OUTPUT_NAME MantidCrystal ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Crystal PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS/" ) + set_target_properties(Crystal PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS/" ) +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Crystal PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif() # Add to the 'Framework' group in VS diff --git a/Framework/CurveFitting/CMakeLists.txt b/Framework/CurveFitting/CMakeLists.txt index 18aa84dbcfa919e253f8369bb664e7b6643adedf..010f0e4dfd3fc781d2c2fa98a96915aaabfa7e75 100644 --- a/Framework/CurveFitting/CMakeLists.txt +++ b/Framework/CurveFitting/CMakeLists.txt @@ -475,13 +475,15 @@ enable_precompiled_headers( inc/MantidCurveFitting/PrecompiledHeader.h SRC_FILES # Add the target for this directory add_library ( CurveFitting ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library -set_target_properties ( CurveFitting PROPERTIES OUTPUT_NAME MantidCurveFitting +set_target_properties ( CurveFitting PROPERTIES OUTPUT_NAME MantidCurveFitting COMPILE_DEFINITIONS IN_MANTID_CURVEFITTING ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( CurveFitting PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () + set_target_properties(CurveFitting PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(CurveFitting PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET CurveFitting PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/DataHandling/CMakeLists.txt b/Framework/DataHandling/CMakeLists.txt index 166f7bf3d97f6b8852f7caab0b2ce631cfbf5d77..fafc115113f161a5f6c6a3ce11b45d6f592b4664 100644 --- a/Framework/DataHandling/CMakeLists.txt +++ b/Framework/DataHandling/CMakeLists.txt @@ -541,7 +541,9 @@ set_target_properties ( DataHandling PROPERTIES OUTPUT_NAME MantidDataHandling ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( DataHandling PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") + set_target_properties(DataHandling PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(DataHandling PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/DataObjects/CMakeLists.txt b/Framework/DataObjects/CMakeLists.txt index b9a065d1afe30590005f047b1be54ceff64adc68..473e431a63ef38275c811c3c33180ca2cf021851 100644 --- a/Framework/DataObjects/CMakeLists.txt +++ b/Framework/DataObjects/CMakeLists.txt @@ -51,7 +51,7 @@ set ( SRC_FILES src/WorkspaceSingleValue.cpp ) -set ( SRC_UNITY_IGNORE_FILES +set ( SRC_UNITY_IGNORE_FILES src/Workspace2D.cpp src/WorkspaceSingleValue.cpp src/EventWorkspace.cpp @@ -209,11 +209,13 @@ enable_precompiled_headers( inc/MantidDataObjects/PrecompiledHeader.h SRC_FILES # Add the target for this directory add_library ( DataObjects ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library -set_target_properties ( DataObjects PROPERTIES OUTPUT_NAME MantidDataObjects +set_target_properties ( DataObjects PROPERTIES OUTPUT_NAME MantidDataObjects COMPILE_DEFINITIONS IN_MANTID_DATAOBJECTS ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( DataObjects PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(DataObjects PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(DataObjects PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Intensive use of templated libaries can cause large objects to be generated. These require @@ -235,4 +237,3 @@ add_subdirectory ( test ) ########################################################################### install ( TARGETS DataObjects ${SYSTEM_PACKAGE_TARGET} DESTINATION ${LIB_DIR} ) - diff --git a/Framework/Geometry/CMakeLists.txt b/Framework/Geometry/CMakeLists.txt index 3b142099c6db0fa9ffbf3a0e0ec27319f7839548..365ea79647e770eebdb981f260e32d71ec4b6474 100644 --- a/Framework/Geometry/CMakeLists.txt +++ b/Framework/Geometry/CMakeLists.txt @@ -466,7 +466,9 @@ set_target_properties ( Geometry PROPERTIES OUTPUT_NAME MantidGeometry COMPILE_DEFINITIONS IN_MANTID_GEOMETRY ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Geometry PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(Geometry PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Geometry PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () if (ENABLE_OPENCASCADE) diff --git a/Framework/HistogramData/CMakeLists.txt b/Framework/HistogramData/CMakeLists.txt index fdaf4a9d8f5e1079f25206c1768493673211e172..ff1c37cb30dc19f3dc35a824d4f6bd56e03b323d 100644 --- a/Framework/HistogramData/CMakeLists.txt +++ b/Framework/HistogramData/CMakeLists.txt @@ -113,13 +113,15 @@ set_target_properties ( HistogramData PROPERTIES OUTPUT_NAME MantidHistogramData COMPILE_DEFINITIONS IN_MANTID_HISTOGRAMDATA ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( HistogramData PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(HistogramData PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(HistogramData PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS set_property ( TARGET HistogramData PROPERTY FOLDER "MantidFramework" ) -target_link_libraries ( HistogramData LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries ( HistogramData LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${GSL_LIBRARIES} ${MANTIDLIBS} ) # Add the unit tests directory diff --git a/Framework/ICat/CMakeLists.txt b/Framework/ICat/CMakeLists.txt index 9cf18d5c27b9488f7e46e271e3d72b2e8ab45eb4..310192d2c714b1ccdf8d76ca0dda067b8b75a6c9 100644 --- a/Framework/ICat/CMakeLists.txt +++ b/Framework/ICat/CMakeLists.txt @@ -85,13 +85,15 @@ enable_precompiled_headers( inc/MantidICat/PrecompiledHeader.h SRC_FILES ) # Add the target for this directory add_library ( ICat ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library -set_target_properties ( ICat PROPERTIES OUTPUT_NAME MantidICat +set_target_properties ( ICat PROPERTIES OUTPUT_NAME MantidICat COMPILE_DEFINITIONS IN_MANTID_ICAT ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( ICat PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () + set_target_properties(ICat PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(ICat PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET ICat PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/Indexing/CMakeLists.txt b/Framework/Indexing/CMakeLists.txt index 33fc4cf478c8e7f3b4bc0bbc1c926f33bde33f77..22e60287516dcefb055f21b0c13adb887784e800 100644 --- a/Framework/Indexing/CMakeLists.txt +++ b/Framework/Indexing/CMakeLists.txt @@ -66,7 +66,9 @@ set_target_properties ( Indexing PROPERTIES OUTPUT_NAME MantidIndexing COMPILE_DEFINITIONS IN_MANTID_INDEXING ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Indexing PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(Indexing PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Indexing PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/Kernel/CMakeLists.txt b/Framework/Kernel/CMakeLists.txt index 56ab06f8885661c12027d8c84fda57409fc4032a..830960caf7ceb49f36451c24efd3a80307594736 100644 --- a/Framework/Kernel/CMakeLists.txt +++ b/Framework/Kernel/CMakeLists.txt @@ -489,7 +489,9 @@ target_include_directories ( Kernel SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${POCO_I PRIVATE ${NEXUS_INCLUDE_DIR} ${GSL_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Kernel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(Kernel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Kernel PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/LiveData/CMakeLists.txt b/Framework/LiveData/CMakeLists.txt index c4c01fcc85f397234de6c3ef0cf57aa2d1a8db29..092a44aa84b6b2322d45990434ebe7bdd2ecd308 100644 --- a/Framework/LiveData/CMakeLists.txt +++ b/Framework/LiveData/CMakeLists.txt @@ -106,7 +106,9 @@ set_target_properties ( LiveData PROPERTIES OUTPUT_NAME MantidLiveData ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( LiveData PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") + set_target_properties(LiveData PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(LiveData PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/MDAlgorithms/CMakeLists.txt b/Framework/MDAlgorithms/CMakeLists.txt index eaabe33c98e4c9bf03d755364a3cf19cc57a982f..20b3cfbe911f6b4164ca141a535f12f669ca97f6 100644 --- a/Framework/MDAlgorithms/CMakeLists.txt +++ b/Framework/MDAlgorithms/CMakeLists.txt @@ -400,13 +400,15 @@ enable_precompiled_headers( inc/MantidMDAlgorithms/PrecompiledHeader.h SRC_FILES # Add the target for this directory add_library ( MDAlgorithms ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library -set_target_properties ( MDAlgorithms PROPERTIES OUTPUT_NAME MantidMDAlgorithms +set_target_properties ( MDAlgorithms PROPERTIES OUTPUT_NAME MantidMDAlgorithms COMPILE_DEFINITIONS IN_MANTID_MDALGORITHMS ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MDAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () + set_target_properties(MDAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MDAlgorithms PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET MDAlgorithms PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/Nexus/CMakeLists.txt b/Framework/Nexus/CMakeLists.txt index b4ec93352419ee8dd2309e96477993f48fd183fe..6a4b974cfdbfd8fd644a7f691c32d07a2026fe61 100644 --- a/Framework/Nexus/CMakeLists.txt +++ b/Framework/Nexus/CMakeLists.txt @@ -25,12 +25,14 @@ add_definitions ( -DIN_NEXUS_CPP_LIBRARY ) # Add the target for this directory add_library ( Nexus ${SRC_FILES} ${INC_FILES}) # Set the name of the generated library -set_target_properties ( Nexus PROPERTIES OUTPUT_NAME MantidNexus +set_target_properties ( Nexus PROPERTIES OUTPUT_NAME MantidNexus COMPILE_DEFINITIONS IN_MANTID_NEXUS ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Nexus PROPERTIES INSTALL_RPATH "@loader_path/../MacOS" ) -endif () + set_target_properties(Nexus PROPERTIES INSTALL_RPATH "@loader_path/../MacOS" ) +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Nexus PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET Nexus PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/Parallel/CMakeLists.txt b/Framework/Parallel/CMakeLists.txt index 24668373bbe2a0674a3d95a2a4ba650297fc7cee..a504d4df2c8bf1b4395898b6d8fd57a875b973cd 100644 --- a/Framework/Parallel/CMakeLists.txt +++ b/Framework/Parallel/CMakeLists.txt @@ -57,7 +57,9 @@ set_target_properties ( Parallel PROPERTIES OUTPUT_NAME MantidParallel COMPILE_DEFINITIONS IN_MANTID_PARALLEL ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( Parallel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(Parallel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(Parallel PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/Framework/PythonInterface/mantid/_plugins/CMakeLists.txt b/Framework/PythonInterface/mantid/_plugins/CMakeLists.txt index 8425cf15d05172774f4b2d2c360f500c883b91bf..8a7afcaeb06c630e0aa29d1b29fb259b95e9414a 100644 --- a/Framework/PythonInterface/mantid/_plugins/CMakeLists.txt +++ b/Framework/PythonInterface/mantid/_plugins/CMakeLists.txt @@ -67,6 +67,9 @@ target_link_libraries ( PythonCurveFittingModule LINK_PRIVATE ${TCMALLOC_LIBRARI if (OSX_VERSION VERSION_GREATER 10.8) set_target_properties( PythonCurveFittingModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/;@loader_path/../api/") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties( PythonCurveFittingModule PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR};\$ORIGIN/../kernel/;\$ORIGIN/../geometry/;\$ORIGIN/../api/") endif () ########################################################################### # Installation settings diff --git a/Framework/PythonInterface/mantid/api/CMakeLists.txt b/Framework/PythonInterface/mantid/api/CMakeLists.txt index e9f764bd072c2655d72a593b3e793562ab53a78b..ceff8f34f5952a884bdab6b4a3647aab6589758b 100644 --- a/Framework/PythonInterface/mantid/api/CMakeLists.txt +++ b/Framework/PythonInterface/mantid/api/CMakeLists.txt @@ -156,7 +156,11 @@ target_link_libraries ( PythonAPIModule LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTI ${Boost_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties( PythonAPIModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/") + set_target_properties( PythonAPIModule PROPERTIES + INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties( PythonAPIModule PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR};\$ORIGIN/../kernel/;\$ORIGIN/../geometry/") endif () ########################################################################### # Installation settings diff --git a/Framework/PythonInterface/mantid/dataobjects/CMakeLists.txt b/Framework/PythonInterface/mantid/dataobjects/CMakeLists.txt index fd060ab0bf17b35f0202f07bcf17b689160fcbb6..c62dff44d9f4bfff8a37f70c17122a61324f4f97 100644 --- a/Framework/PythonInterface/mantid/dataobjects/CMakeLists.txt +++ b/Framework/PythonInterface/mantid/dataobjects/CMakeLists.txt @@ -84,6 +84,9 @@ target_link_libraries ( PythonDataObjectsModule LINK_PRIVATE ${TCMALLOC_LIBRARIE if (OSX_VERSION VERSION_GREATER 10.8) set_target_properties( PythonDataObjectsModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/;@loader_path/../api/") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties( PythonDataObjectsModule PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR};\$ORIGIN/../kernel/;\$ORIGIN/../geometry/;\$ORIGIN/../api/") endif () ########################################################################### # Installation settings diff --git a/Framework/PythonInterface/mantid/geometry/CMakeLists.txt b/Framework/PythonInterface/mantid/geometry/CMakeLists.txt index fa91f99ab62d6d008cb92cbf1c54f746d3cffa6e..7034d098719d25ec1f94e1ce2e685de3c94b29db 100644 --- a/Framework/PythonInterface/mantid/geometry/CMakeLists.txt +++ b/Framework/PythonInterface/mantid/geometry/CMakeLists.txt @@ -89,12 +89,16 @@ target_link_libraries ( PythonGeometryModule LINK_PRIVATE ${TCMALLOC_LIBRARIES_L ${PYTHON_LIBRARIES} ${POCO_LIBRARIES} ${Boost_LIBRARIES} - ${TBB_LIBRARIES} + ${TBB_LIBRARIES} ${TBB_MALLOC_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( PythonGeometryModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/") + set_target_properties ( PythonGeometryModule PROPERTIES + INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties ( PythonGeometryModule PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR};\$ORIGIN/../kernel/") endif () ########################################################################### diff --git a/Framework/PythonInterface/mantid/kernel/CMakeLists.txt b/Framework/PythonInterface/mantid/kernel/CMakeLists.txt index 9b540e18692ffd5dfc8ece5dab2c773d49896332..b7f0589931fca6b907c0ed4b3037ae394ee9a4fd 100644 --- a/Framework/PythonInterface/mantid/kernel/CMakeLists.txt +++ b/Framework/PythonInterface/mantid/kernel/CMakeLists.txt @@ -200,7 +200,9 @@ target_link_libraries ( PythonKernelModule LINK_PRIVATE ${TCMALLOC_LIBRARIES_LIN ${TBB_MALLOC_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( PythonKernelModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS") + set_target_properties(PythonKernelModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(PythonKernelModule PROPERTIES INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () ########################################################################### diff --git a/Framework/RemoteAlgorithms/CMakeLists.txt b/Framework/RemoteAlgorithms/CMakeLists.txt index 2c57e7f243d902718eaab71c0672aa4756549919..7b2ad0fb0d4b281ffa26f5f0e137e1470de1efc2 100644 --- a/Framework/RemoteAlgorithms/CMakeLists.txt +++ b/Framework/RemoteAlgorithms/CMakeLists.txt @@ -95,8 +95,10 @@ set_target_properties ( RemoteAlgorithms PROPERTIES OUTPUT_NAME MantidRemoteAlgo ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( RemoteAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () + set_target_properties(RemoteAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(RemoteAlgorithms PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET RemoteAlgorithms PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/RemoteJobManagers/CMakeLists.txt b/Framework/RemoteJobManagers/CMakeLists.txt index 197bbc0054c0b7fa0361a633ba0fc36497929c00..4bd444b58becd53ca3835a486b1f309afb2a763f 100644 --- a/Framework/RemoteJobManagers/CMakeLists.txt +++ b/Framework/RemoteJobManagers/CMakeLists.txt @@ -44,7 +44,9 @@ set_target_properties ( RemoteJobManagers PROPERTIES OUTPUT_NAME MantidRemoteJob if (OSX_VERSION VERSION_GREATER 10.8) set_target_properties ( RemoteJobManagers PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties ( RemoteJobManagers PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET RemoteJobManagers PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/SINQ/CMakeLists.txt b/Framework/SINQ/CMakeLists.txt index d9ff0695430a0ee2568ca25e8b7c29c676ed2a75..23141ba462e7d4b35098e20ec0ba7033aa94be7d 100644 --- a/Framework/SINQ/CMakeLists.txt +++ b/Framework/SINQ/CMakeLists.txt @@ -141,13 +141,15 @@ enable_precompiled_headers ( inc/MantidSINQ/PrecompiledHeader.h SRC_FILES ) # Add the target for this directory add_library ( SINQ ${SRC_FILES} ${INC_FILES} ) # Set the name of the generated library -set_target_properties ( SINQ PROPERTIES OUTPUT_NAME MantidSINQ +set_target_properties ( SINQ PROPERTIES OUTPUT_NAME MantidSINQ COMPILE_DEFINITIONS "IN_MANTID_SINQ" ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( SINQ PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") -endif () + set_target_properties(SINQ PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(SINQ PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") +endif () # Add to the 'Framework' group in VS set_property ( TARGET SINQ PROPERTY FOLDER "MantidFramework" ) diff --git a/Framework/ScriptRepository/CMakeLists.txt b/Framework/ScriptRepository/CMakeLists.txt index f70964c5520a457e0c22f10280894f22226ea0d1..30daa6f690d014962bd7963957004e99fec6c3f7 100644 --- a/Framework/ScriptRepository/CMakeLists.txt +++ b/Framework/ScriptRepository/CMakeLists.txt @@ -23,11 +23,13 @@ add_library ( ScriptRepository ${SRC_FILES} ${INC_FILES} ) # Add the unit tests directory add_subdirectory ( test ) # Set the name of the generated library -set_target_properties ( ScriptRepository PROPERTIES OUTPUT_NAME MantidScriptRepository +set_target_properties ( ScriptRepository PROPERTIES OUTPUT_NAME MantidScriptRepository COMPILE_DEFINITIONS IN_MANTID_SCRIPTREPO ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( ScriptRepository PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") + set_target_properties(ScriptRepository PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(ScriptRepository PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () set_property (TARGET ScriptRepository PROPERTY FOLDER "MantidFramework") diff --git a/Framework/WorkflowAlgorithms/CMakeLists.txt b/Framework/WorkflowAlgorithms/CMakeLists.txt index 9a83e8febbbff622f8470428999233ed6f77fe00..7bdb72de478154de29dec5ea24968c3423065de9 100644 --- a/Framework/WorkflowAlgorithms/CMakeLists.txt +++ b/Framework/WorkflowAlgorithms/CMakeLists.txt @@ -126,7 +126,9 @@ set_target_properties ( WorkflowAlgorithms PROPERTIES OUTPUT_NAME MantidWorkflow ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( WorkflowAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") + set_target_properties(WorkflowAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(WorkflowAlgorithms PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Add to the 'Framework' group in VS diff --git a/MantidPlot/CMakeLists.txt b/MantidPlot/CMakeLists.txt index cff02fdbb024d42e9815dcd26b2d77f10c982658..14147fcf7c18fde969c2d50b0897df1be755348e 100644 --- a/MantidPlot/CMakeLists.txt +++ b/MantidPlot/CMakeLists.txt @@ -825,6 +825,13 @@ add_dependencies( MantidPlot mantidqtpython CompilePyUI ) if (OSX_VERSION VERSION_GREATER 10.8) set_target_properties(MantidPlot PROPERTIES INSTALL_RPATH "@executable_path;@executable_path/../Libraries") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + if(MAKE_VATES) + set_target_properties(MantidPlot PROPERTIES + INSTALL_RPATH "\$ORIGIN/../${LIB_DIR};\$ORIGIN/../${LIB_DIR}/paraview-${ParaView_VERSION_MAJOR}.${ParaView_VERSION_MINOR}") + else() + set_target_properties(MantidPlot PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") + endif() endif () set_target_properties ( MantidPlot PROPERTIES FOLDER "Qt4" ) diff --git a/buildconfig/CMake/LinuxPackageScripts.cmake b/buildconfig/CMake/LinuxPackageScripts.cmake index b8430a01d7f4d5a6a481164b19f6058686746e4a..98ebd356d2735c71303f760625a32248f5ffc2fc 100644 --- a/buildconfig/CMake/LinuxPackageScripts.cmake +++ b/buildconfig/CMake/LinuxPackageScripts.cmake @@ -24,13 +24,9 @@ if ( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ) endif() # We are only generating Qt4 packages at the moment -# ../lib gets from bin -> lib -# ../../lib gets from plugins/qt4 -> lib -# ../../../lib gets from bin/mantid/kernel -> lib -set ( CMAKE_INSTALL_RPATH \$ORIGIN/../${LIB_DIR};\$ORIGIN/../../../${LIB_DIR};\$ORIGIN/../../../${LIB_DIR};$ORIGIN/../${PLUGINS_DIR};\$ORIGIN/../${PLUGINS_DIR}/qt4; ) -if ( MAKE_VATES ) - list ( APPEND CMAKE_INSTALL_RPATH \$ORIGIN/../${LIB_DIR}/paraview-${ParaView_VERSION_MAJOR}.${ParaView_VERSION_MINOR} ) -endif () +#if ( MAKE_VATES ) +# list ( APPEND CMAKE_INSTALL_RPATH \$ORIGIN/../${LIB_DIR}/paraview-${ParaView_VERSION_MAJOR}.${ParaView_VERSION_MINOR} ) +#endif () # Tell rpm that this package does not own /opt /usr/share/{applications,pixmaps} # Required for Fedora >= 18 and RHEL >= 7 diff --git a/buildconfig/CMake/QtTargetFunctions.cmake b/buildconfig/CMake/QtTargetFunctions.cmake index 9dbb8ff160caa03b2d5b6b3e02548ce18d125914..f94b71258d21aed553c2fbe10068a8e4ddca21bd 100644 --- a/buildconfig/CMake/QtTargetFunctions.cmake +++ b/buildconfig/CMake/QtTargetFunctions.cmake @@ -88,6 +88,7 @@ endfunction() # keyword: INSTALL_DIR A destination directory for the install command. # keyword: INSTALL_DIR_BASE Base directory the build output. The final product goes into a subdirectory based on the Qt version. # keyword: OSX_INSTALL_RPATH Install path for osx version > 10.8 +# keyword: LINUX_INSTALL_RPATH Install path for CMAKE_SYSTEM_NAME == Linux function (mtd_add_qt_target) set (options LIBRARY EXECUTABLE NO_SUFFIX EXCLUDE_FROM_ALL) set (oneValueArgs @@ -95,7 +96,7 @@ function (mtd_add_qt_target) INSTALL_DIR INSTALL_DIR_BASE PRECOMPILED) set (multiValueArgs SRC UI MOC NOMOC RES DEFS QT4_DEFS QT5_DEFS INCLUDE_DIRS SYSTEM_INCLUDE_DIRS LINK_LIBS - QT4_LINK_LIBS QT5_LINK_LIBS MTD_QT_LINK_LIBS OSX_INSTALL_RPATH) + QT4_LINK_LIBS QT5_LINK_LIBS MTD_QT_LINK_LIBS OSX_INSTALL_RPATH LINUX_INSTALL_RPATH) cmake_parse_arguments (PARSED "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if (PARSED_UNPARSED_ARGUMENTS) @@ -194,6 +195,10 @@ function (mtd_add_qt_target) if (PARSED_OSX_INSTALL_RPATH) set_target_properties ( ${_target} PROPERTIES INSTALL_RPATH "${PARSED_OSX_INSTALL_RPATH}" ) endif() + elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + if (PARSED_LINUX_INSTALL_RPATH) + set_target_properties ( ${_target} PROPERTIES INSTALL_RPATH "${PARSED_LINUX_INSTALL_RPATH}" ) + endif () endif () if ( PARSED_EXCLUDE_FROM_ALL ) @@ -223,7 +228,7 @@ function (mtd_add_qt_target) else () add_custom_target ( ${_alltarget} DEPENDS ${_target} ) endif() - + endfunction() function (mtd_add_qt_tests) @@ -405,7 +410,7 @@ function (_disable_suggest_override _qt_version _target) endif() endfunction () -# Homebrew on macOS symlinks Qt4 into /usr/local so that the +# Homebrew on macOS symlinks Qt4 into /usr/local so that the # include directories are on the standard paths. When we add # /usr/local/include using target_include_directories clang sees # the duplicate but removes them from the end and keeps the paths @@ -427,5 +432,5 @@ function ( prune_usr_local_include ) set_property ( TARGET ${_it} PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_tmp}" ) endif () endif () - endforeach () + endforeach () endfunction () diff --git a/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/CMakeLists.txt index e0971994ed1fd95ee37d23991abf9351463358dc..3615a8391602c18e00bf195c58da96898b72977b 100644 --- a/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/CMakeLists.txt @@ -5,7 +5,7 @@ SERVER_MANAGER_XML PeaksFilter.xml SERVER_MANAGER_SOURCES vtkPeaksFilter.cxx vtkPeaksFilter.h) set_pvplugin_properties (MantidParaViewPeaksFilterSMPlugin QT_VERSION 4) -target_link_libraries( MantidParaViewPeaksFilterSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewPeaksFilterSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -15,7 +15,11 @@ ${vtkjsoncpp_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewPeaksFilterSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewPeaksFilterSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewPeaksFilterSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewPeaksFilterSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/CMakeLists.txt index ba3867bd51718e26d338fe6e8d93107919ba53be..c8c5f7b6d108c609b81d5a4dda1f656dad5ab942 100644 --- a/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/CMakeLists.txt @@ -5,7 +5,7 @@ SERVER_MANAGER_XML ScaleWorkspace.xml SERVER_MANAGER_SOURCES vtkScaleWorkspace.cxx) set_pvplugin_properties (MantidParaViewScaleWorkspaceSMPlugin QT_VERSION 4) -target_link_libraries( MantidParaViewScaleWorkspaceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewScaleWorkspaceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -13,7 +13,11 @@ ${vtkjsoncpp_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewScaleWorkspaceSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewScaleWorkspaceSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewScaleWorkspaceSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewScaleWorkspaceSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/CMakeLists.txt index 5c8b6c4eba7f8b2cd1770209b511718afa78a75b..af27f2a7b8020c71d4737b8b4a03feb3c996cf89 100644 --- a/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/CMakeLists.txt @@ -9,7 +9,7 @@ set_pvplugin_properties (MantidParaViewSplatterPlotSMPlugin QT_VERSION 4) include_directories ( SYSTEM ${QWT5_INCLUDE_DIR} ) -target_link_libraries( MantidParaViewSplatterPlotSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewSplatterPlotSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -20,8 +20,11 @@ ${vtkjsoncpp_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewSplatterPlotSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewSplatterPlotSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewSplatterPlotSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewSplatterPlotSMPlugin QT_VERSION 4) - diff --git a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/CMakeLists.txt index 8b0b72ddb5c4867bffec1498b6e6e85ba408efbe..4c370ea7821d84fe21e00f7cee66a8066d5d5d66 100644 --- a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/CMakeLists.txt @@ -8,7 +8,7 @@ set_pvplugin_properties (MantidParaViewMDEWNexusReaderSMPlugin QT_VERSION 4) include_directories ( SYSTEM ${QWT5_INCLUDE_DIR} ) -target_link_libraries( MantidParaViewMDEWNexusReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewMDEWNexusReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${vtkjsoncpp_LIBRARIES} ${CORE_MANTIDLIBS} DataObjects @@ -20,7 +20,11 @@ Qt4::QtCore ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewMDEWNexusReaderSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewMDEWNexusReaderSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewMDEWNexusReaderSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewMDEWNexusReaderSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/CMakeLists.txt index ab78ea7f66eee6b29dff2924078c8ad0d9ae9d2e..1766734e929e019289446f6d660851de7bdede12 100644 --- a/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/CMakeLists.txt @@ -8,7 +8,7 @@ set_pvplugin_properties (MantidParaViewMDHWNexusReaderSMPlugin QT_VERSION 4) include_directories ( SYSTEM ${QWT5_INCLUDE_DIR} ) -target_link_libraries( MantidParaViewMDHWNexusReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewMDHWNexusReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -20,7 +20,10 @@ Qt4::QtCore ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewMDHWNexusReaderSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewMDHWNexusReaderSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewMDHWNexusReaderSMPlugin PROPERTIES INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewMDHWNexusReaderSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/CMakeLists.txt index 1f81b8f7361bf47822c08fbb5d0f6937f6bb1d9b..16747038fd737a84b763e8d330917c09cc397b8e 100644 --- a/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/CMakeLists.txt @@ -6,7 +6,7 @@ add_paraview_plugin( MantidParaViewNexusPeaksReaderSMPlugin "1.0" ) set_pvplugin_properties (MantidParaViewNexusPeaksReaderSMPlugin QT_VERSION 4) -target_link_libraries( MantidParaViewNexusPeaksReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewNexusPeaksReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -16,9 +16,11 @@ ${NEXUS_LIBRARIES} ${NEXUS_C_LIBRARIES}) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewNexusPeaksReaderSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewNexusPeaksReaderSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewNexusPeaksReaderSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewNexusPeaksReaderSMPlugin QT_VERSION 4) - - diff --git a/qt/paraview_ext/PVPlugins/Readers/PeaksReader/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Readers/PeaksReader/CMakeLists.txt index 5aeb1d90d62e8425f243aef747021cf20a11a3a7..657645ecb22dc84136ff49b84fae81c0dc616cac 100644 --- a/qt/paraview_ext/PVPlugins/Readers/PeaksReader/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Readers/PeaksReader/CMakeLists.txt @@ -9,7 +9,7 @@ set_pvplugin_properties (MantidParaViewPeaksReaderSMPlugin QT_VERSION 4) # Add to the 'VatesParaViewPlugins' group in VS set_property( TARGET MantidParaViewPeaksReaderSMPlugin PROPERTY FOLDER "MantidVatesParaViewPlugins" ) -target_link_libraries( MantidParaViewPeaksReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewPeaksReaderSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -18,9 +18,11 @@ ${Boost_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewPeaksReaderSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewPeaksReaderSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewPeaksReaderSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewPeaksReaderSMPlugin QT_VERSION 4) - - diff --git a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/CMakeLists.txt index 0e2c165d463c65113472a66d5028143dabcb7073..8ad774a160cedca017ebaf49b1970675d9da29ad 100644 --- a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/CMakeLists.txt @@ -6,7 +6,7 @@ ADD_PARAVIEW_PLUGIN(MantidParaViewMDEWSourceSMPlugin "1.0" set_pvplugin_properties (MantidParaViewMDEWSourceSMPlugin QT_VERSION 4) include_directories ( SYSTEM ${QWT5_INCLUDE_DIR} ) -target_link_libraries( MantidParaViewMDEWSourceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewMDEWSourceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -18,7 +18,10 @@ Qt4::QtCore ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewMDEWSourceSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewMDEWSourceSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewMDEWSourceSMPlugin PROPERTIES INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewMDEWSourceSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Sources/MDHWSource/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Sources/MDHWSource/CMakeLists.txt index 394c47275404da2b8eb29b908d2eaf36f8c2c409..fc08e675b6b62dc7f887c0a612da270171cfe270 100644 --- a/qt/paraview_ext/PVPlugins/Sources/MDHWSource/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Sources/MDHWSource/CMakeLists.txt @@ -7,7 +7,7 @@ set_pvplugin_properties (MantidParaViewMDHWSourceSMPlugin QT_VERSION 4) include_directories ( SYSTEM ${QWT5_INCLUDE_DIR} ) -target_link_libraries( MantidParaViewMDHWSourceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} +target_link_libraries( MantidParaViewMDHWSourceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} DataObjects VatesAPI @@ -19,7 +19,11 @@ Qt4::QtCore ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewMDHWSourceSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewMDHWSourceSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewMDHWSourceSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewMDHWSourceSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Sources/PeaksSource/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Sources/PeaksSource/CMakeLists.txt index e0ba945b3b93645fb36731b30f6c95f7b5037760..eb87a67ae27ddfb4b8f0c6bfef1f134e67f56ace 100644 --- a/qt/paraview_ext/PVPlugins/Sources/PeaksSource/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Sources/PeaksSource/CMakeLists.txt @@ -14,7 +14,11 @@ ${Boost_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewPeaksSourceSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewPeaksSourceSMPlugin + PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewPeaksSourceSMPlugin + PROPERTIES INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewPeaksSourceSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/CMakeLists.txt b/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/CMakeLists.txt index 3e3e60f7816f60a2d3b36ca5acdc461f2b0148f5..fbed014965eee65537f8a2313e18bd9db5666781 100644 --- a/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/CMakeLists.txt +++ b/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/CMakeLists.txt @@ -8,7 +8,11 @@ set_pvplugin_properties (MantidParaViewSinglePeakMarkerSourceSMPlugin QT_VERSION target_link_libraries( MantidParaViewSinglePeakMarkerSourceSMPlugin LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${CORE_MANTIDLIBS} VatesAPI ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidParaViewSinglePeakMarkerSourceSMPlugin PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") + set_target_properties(MantidParaViewSinglePeakMarkerSourceSMPlugin PROPERTIES + INSTALL_RPATH "@loader_path/../../../Contents/Libraries;@loader_path/../../../Contents/MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidParaViewSinglePeakMarkerSourceSMPlugin PROPERTIES + INSTALL_RPATH "\$ORIGIN/../../../${LIB_DIR}") endif () install_pvplugin (MantidParaViewSinglePeakMarkerSourceSMPlugin QT_VERSION 4) diff --git a/qt/paraview_ext/VatesAPI/CMakeLists.txt b/qt/paraview_ext/VatesAPI/CMakeLists.txt index 7acc8ef11f826bee09ee3d8482afd8a97824f124..567ab71d3a97c1c4566bc8bdff3165f77208f349 100644 --- a/qt/paraview_ext/VatesAPI/CMakeLists.txt +++ b/qt/paraview_ext/VatesAPI/CMakeLists.txt @@ -220,7 +220,9 @@ endif() if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( VatesAPI PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Libraries") + set_target_properties(VatesAPI PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Libraries") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(VatesAPI PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Create test file projects diff --git a/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt b/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt index 253e8da2af0c7b365943673b627d94a358585678..5fc54adb2eeddf14972e2714d1fd9130b6818eda 100644 --- a/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt +++ b/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt @@ -48,7 +48,9 @@ ${POCO_LIBRARIES} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( VatesAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS;@loader_path/../Libraries") + set_target_properties(VatesAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS;@loader_path/../Libraries") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(VatesAlgorithms PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () # Create test file projects diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/CMakeLists.txt b/qt/paraview_ext/VatesSimpleGui/QtWidgets/CMakeLists.txt index 763427c635981b5e9a0dbaa7231a8f2e2e5ca886..a67121969ada40ca346a259ce484deffb4e4b62f 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/CMakeLists.txt +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/CMakeLists.txt @@ -51,6 +51,8 @@ mtd_add_qt_library (TARGET_NAME VatesSimpleGuiQtWidgets OSX_INSTALL_RPATH @loader_path/../../Contents/Libraries @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) # Set the name of the generated library diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/CMakeLists.txt b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/CMakeLists.txt index e0ad791bf97402bae7c8fe7d62687cd4e61bc693..fd315f848220acce656e2ec9544f7e9d00429a9a 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/CMakeLists.txt +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/CMakeLists.txt @@ -135,6 +135,8 @@ mtd_add_qt_library (TARGET_NAME VatesSimpleGuiViewWidgets OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS @loader_path/../../Contents/Libraries + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) # Set the name of the generated library diff --git a/qt/scientific_interfaces/DynamicPDF/CMakeLists.txt b/qt/scientific_interfaces/DynamicPDF/CMakeLists.txt index 44b0c90ddc870dbf622dedd3d738145d57a67375..6214e1311802b822d713fa1522b8ce3339b3708f 100644 --- a/qt/scientific_interfaces/DynamicPDF/CMakeLists.txt +++ b/qt/scientific_interfaces/DynamicPDF/CMakeLists.txt @@ -21,7 +21,7 @@ set ( INC_FILES SliceSelector.h ) -set ( MOC_FILES +set ( MOC_FILES DPDFBackgroundRemover.h DPDFDisplayControl.h DPDFFitControl.h @@ -32,7 +32,7 @@ set ( MOC_FILES ) -set ( UI_FILES +set ( UI_FILES DPDFBackgroundRemover.ui DPDFFitControl.ui DPDFFourierTransform.ui @@ -64,4 +64,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesDynamicPDF ${PLUGINS_DIR} OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) diff --git a/qt/scientific_interfaces/EnggDiffraction/CMakeLists.txt b/qt/scientific_interfaces/EnggDiffraction/CMakeLists.txt index 2964ad6239ba82b8d00c012f7d938c94aeae0fbd..af61739f60d81589913c22fa37faf1218178de04 100644 --- a/qt/scientific_interfaces/EnggDiffraction/CMakeLists.txt +++ b/qt/scientific_interfaces/EnggDiffraction/CMakeLists.txt @@ -94,5 +94,7 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesEnggDiffraction OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS @loader_path/../../plugins/qt4 -) + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR};\$ORIGIN/../../plugins/qt4/" +) diff --git a/qt/scientific_interfaces/General/CMakeLists.txt b/qt/scientific_interfaces/General/CMakeLists.txt index 527a2876ce5f98bce4aa6e55f04ebd0a5d916ddc..6668881e838e6e44d0c864def01f75faad5839fe 100644 --- a/qt/scientific_interfaces/General/CMakeLists.txt +++ b/qt/scientific_interfaces/General/CMakeLists.txt @@ -62,4 +62,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesGeneral ${PLUGINS_DIR} OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) diff --git a/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt b/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt index 4c15320d8d1699d8d96b4f433cf7aed65b882150..c19ec5c7672d3fa9f5623d32a1612c43a7ceff4c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt +++ b/qt/scientific_interfaces/ISISReflectometry/CMakeLists.txt @@ -129,4 +129,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesISISReflectometry ${PLUGINS_DIR} OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) diff --git a/qt/scientific_interfaces/ISISSANS/CMakeLists.txt b/qt/scientific_interfaces/ISISSANS/CMakeLists.txt index 1a1ef18afcddebbfe3cf7e06da196adb6750f509..28a21f52ff145d5cd50228b0bd4a0e86a94f520c 100644 --- a/qt/scientific_interfaces/ISISSANS/CMakeLists.txt +++ b/qt/scientific_interfaces/ISISSANS/CMakeLists.txt @@ -66,4 +66,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesISISSANS OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS @loader_path/../../plugins/qt4 + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR};\$ORIGIN/../../plugins/qt4/" ) diff --git a/qt/scientific_interfaces/Indirect/CMakeLists.txt b/qt/scientific_interfaces/Indirect/CMakeLists.txt index 31048973c77f011131e0b45fe7bb93be0aab72d3..46087632e35ffc2eb8406676a5519a5655a0f867 100644 --- a/qt/scientific_interfaces/Indirect/CMakeLists.txt +++ b/qt/scientific_interfaces/Indirect/CMakeLists.txt @@ -196,4 +196,7 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesIndirect OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS @loader_path/../../plugins/qt4 + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR};\$ORIGIN/../../plugins/qt4/" + ) diff --git a/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt b/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt index 9c403e3c37ba47be2ab5fa11c3dae6c84141bd3c..f921ef1f547de321a890914d06a4f959f8e97e0a 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt +++ b/qt/scientific_interfaces/MultiDatasetFit/CMakeLists.txt @@ -69,4 +69,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesMultiDatasetFit ${PLUGINS_DIR} OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) diff --git a/qt/scientific_interfaces/Muon/CMakeLists.txt b/qt/scientific_interfaces/Muon/CMakeLists.txt index f8c390d5e06514b6a07f916b1d043979315f19de..a926cd64dbd50f6cd3baa0f5a6ea8f526398079d 100644 --- a/qt/scientific_interfaces/Muon/CMakeLists.txt +++ b/qt/scientific_interfaces/Muon/CMakeLists.txt @@ -109,4 +109,6 @@ mtd_add_qt_library (TARGET_NAME MantidScientificInterfacesMuon OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS @loader_path/../../plugins/qt4 + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR};\$ORIGIN/../../plugins/qt4/" ) diff --git a/qt/widgets/common/CMakeLists.txt b/qt/widgets/common/CMakeLists.txt index d69a7d1c144fecc0434a54494ed4b4ae456c16d6..9524c4ba0525ec3b1b87608642237e2bcf00ab21 100644 --- a/qt/widgets/common/CMakeLists.txt +++ b/qt/widgets/common/CMakeLists.txt @@ -497,6 +497,8 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsCommon OSX_INSTALL_RPATH @loader_path/../MacOS @loader_path/../Libraries + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) ########################################################################### diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CMakeLists.txt b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CMakeLists.txt index f85d832d13679b9d99258e93e1d52e6347252a44..dc988a282d6666dd20ec4b5f10554232c70837ad 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CMakeLists.txt +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CMakeLists.txt @@ -45,7 +45,7 @@ qt4_generate_moc ( ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cpp ) qt4_generate_moc ( - src/qteditorfactory.h + src/qteditorfactory.h ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cpp ) qt4_generate_moc ( @@ -108,7 +108,7 @@ set ( ) qt4_wrap_cpp ( EXTRA_MOCS src/ButtonEditorFactory.h - src/DoubleEditorFactory.h + src/DoubleEditorFactory.h src/DoubleDialogEditor.h src/FormulaDialogEditor.h src/FilenameDialogEditor.h @@ -138,7 +138,9 @@ set ( SRCS add_library ( ${PROJECT_NAME} SHARED ${SRCS} ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( ${PROJECT_NAME} PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () target_link_libraries ( ${PROJECT_NAME} LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${QT_LIBRARIES} ) diff --git a/qt/widgets/instrumentview/CMakeLists.txt b/qt/widgets/instrumentview/CMakeLists.txt index 80a0417f190fefb9e2c7a55d844f41a59e410a3e..04520f23ba7b3144942462938bbafc22889f97e5 100644 --- a/qt/widgets/instrumentview/CMakeLists.txt +++ b/qt/widgets/instrumentview/CMakeLists.txt @@ -153,5 +153,7 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsInstrumentView ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidQtWidgetsInstrumentViewQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Libraries") + set_target_properties(MantidQtWidgetsInstrumentViewQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Libraries") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidQtWidgetsInstrumentViewQt4 PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () diff --git a/qt/widgets/legacyqwt/CMakeLists.txt b/qt/widgets/legacyqwt/CMakeLists.txt index c19b086755e1d545262ff38fa8783053ae670be8..ad33de02b3aa1c7794eeb637e0e626078f41b7f7 100644 --- a/qt/widgets/legacyqwt/CMakeLists.txt +++ b/qt/widgets/legacyqwt/CMakeLists.txt @@ -79,6 +79,8 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsLegacyQwt MantidQtWidgetsCommon OSX_INSTALL_RPATH @loader_path/../MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) ########################################################################### diff --git a/qt/widgets/plugins/algorithm_dialogs/CMakeLists.txt b/qt/widgets/plugins/algorithm_dialogs/CMakeLists.txt index bd3d6b916abcdc6f8859c8a94b891d5f593d243f..7bd1de7ee9559d20fcffaf77f163de52ea85f1fc 100644 --- a/qt/widgets/plugins/algorithm_dialogs/CMakeLists.txt +++ b/qt/widgets/plugins/algorithm_dialogs/CMakeLists.txt @@ -75,6 +75,8 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsPluginsAlgorithmDialogs MantidQtWidgetsCommon OSX_INSTALL_RPATH @loader_path/../../Contents/MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" INSTALL_DIR_BASE ${PLUGINS_DIR} ) diff --git a/qt/widgets/refdetectorview/CMakeLists.txt b/qt/widgets/refdetectorview/CMakeLists.txt index 23f6d45c89abe0c2fe10d969d50f13d3f1635000..e0f806beb037465e0332b81c78721d8cc9d769e8 100644 --- a/qt/widgets/refdetectorview/CMakeLists.txt +++ b/qt/widgets/refdetectorview/CMakeLists.txt @@ -53,7 +53,9 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsRefDetectorView ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidQtWidgetsRefDetectorViewQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties( MantidQtWidgetsRefDetectorViewQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties( MantidQtWidgetsRefDetectorViewQt4 PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif () ########################################################################### diff --git a/qt/widgets/sliceviewer/CMakeLists.txt b/qt/widgets/sliceviewer/CMakeLists.txt index 597f9066dab5d3cd0f27eddc7356c51fefa2657c..3d55564e41298d9f585f0b2c9020480e95f78865 100644 --- a/qt/widgets/sliceviewer/CMakeLists.txt +++ b/qt/widgets/sliceviewer/CMakeLists.txt @@ -139,6 +139,8 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsSliceViewer MantidQtWidgetsLegacyQwt OSX_INSTALL_RPATH loader_path/../MacOS + LINUX_INSTALL_RPATH + "\$ORIGIN/../../${LIB_DIR}" ) ########################################################################### diff --git a/qt/widgets/spectrumviewer/CMakeLists.txt b/qt/widgets/spectrumviewer/CMakeLists.txt index 71a326f782df23c1b5b73f6021f5944977e6abb1..233088f1c7a150dfbf97d02d72335167420906f2 100644 --- a/qt/widgets/spectrumviewer/CMakeLists.txt +++ b/qt/widgets/spectrumviewer/CMakeLists.txt @@ -77,5 +77,7 @@ mtd_add_qt_library (TARGET_NAME MantidQtWidgetsSpectrumViewer ) if (OSX_VERSION VERSION_GREATER 10.8) - set_target_properties ( MantidQtWidgetsSpectrumViewerQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") + set_target_properties(MantidQtWidgetsSpectrumViewerQt4 PROPERTIES INSTALL_RPATH "@loader_path/../MacOS") +elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) + set_target_properties(MantidQtWidgetsSpectrumViewerQt4 PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}") endif ()