Skip to content

Commit

Permalink
Refs #10840. Get working with other systems
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Feb 9, 2015
1 parent 21333ae commit a6c85a2
Show file tree
Hide file tree
Showing 31 changed files with 160 additions and 70 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/API/CMakeLists.txt
Expand Up @@ -397,8 +397,12 @@ enable_precompiled_headers( inc/MantidAPI/PrecompiledHeader.h SRC_FILES )
add_library ( API ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( API PROPERTIES OUTPUT_NAME MantidAPI
COMPILE_DEFINITIONS IN_MANTID_API
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS IN_MANTID_API )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( API PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET API PROPERTY FOLDER "MantidFramework" )

Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Expand Up @@ -752,8 +752,12 @@ enable_precompiled_headers ( inc/MantidAlgorithms/PrecompiledHeader.h SRC_FILES
# Add the target for this directory
add_library ( Algorithms ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( Algorithms PROPERTIES OUTPUT_NAME MantidAlgorithms
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
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")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET Algorithms PROPERTY FOLDER "MantidFramework" )

Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/DataHandling/CMakeLists.txt
Expand Up @@ -447,8 +447,12 @@ enable_precompiled_headers( inc/MantidDataHandling/PrecompiledHeader.h SRC_FILES
# Add the target for this directory
add_library ( DataHandling ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( DataHandling PROPERTIES OUTPUT_NAME MantidDataHandling
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
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")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET DataHandling PROPERTY FOLDER "MantidFramework" )

Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/DataObjects/CMakeLists.txt
Expand Up @@ -110,8 +110,11 @@ enable_precompiled_headers( inc/MantidDataObjects/PrecompiledHeader.h SRC_FILES
add_library ( DataObjects ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( DataObjects PROPERTIES OUTPUT_NAME MantidDataObjects
COMPILE_DEFINITIONS IN_MANTID_DATAOBJECTS
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS IN_MANTID_DATAOBJECTS )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( DataObjects PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET DataObjects PROPERTY FOLDER "MantidFramework" )
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/Geometry/CMakeLists.txt
Expand Up @@ -366,8 +366,11 @@ enable_precompiled_headers( inc/MantidGeometry/PrecompiledHeader.h SRC_FILES )
add_library ( Geometry ${SRC_FILES} ${INC_FILES} )
# Set the name of the generated library
set_target_properties ( Geometry PROPERTIES OUTPUT_NAME MantidGeometry
COMPILE_DEFINITIONS IN_MANTID_GEOMETRY
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS IN_MANTID_GEOMETRY )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( Geometry PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET Geometry PROPERTY FOLDER "MantidFramework" )
Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/ICat/CMakeLists.txt
Expand Up @@ -81,8 +81,12 @@ enable_precompiled_headers( inc/MantidICat/PrecompiledHeader.h SRC_FILES )
add_library ( ICat ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( ICat PROPERTIES OUTPUT_NAME MantidICat
COMPILE_DEFINITIONS IN_MANTID_ICAT
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
COMPILE_DEFINITIONS IN_MANTID_ICAT )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( ICat PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET ICat PROPERTY FOLDER "MantidFramework" )

Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/ISISLiveData/CMakeLists.txt
Expand Up @@ -19,8 +19,12 @@ set ( TEST_FILES
add_library ( ISISLiveData ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( ISISLiveData PROPERTIES OUTPUT_NAME MantidISISLiveData
COMPILE_DEFINITIONS IN_MANTID_ISISLIVEDATA
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
COMPILE_DEFINITIONS IN_MANTID_ISISLIVEDATA )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( ISISLiveData PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET ISISLiveData PROPERTY FOLDER "MantidFramework" )

Expand Down
6 changes: 4 additions & 2 deletions Code/Mantid/Framework/Kernel/CMakeLists.txt
Expand Up @@ -377,9 +377,11 @@ enable_precompiled_headers ( inc/MantidKernel/PrecompiledHeader.h SRC_FILES )
add_library ( Kernel ${SRC_FILES} ${INC_FILES} )
# Set the name of the generated library
set_target_properties ( Kernel PROPERTIES OUTPUT_NAME MantidKernel
COMPILE_DEFINITIONS "IN_MANTID_KERNEL;PSAPI_VERSION=1"
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS "IN_MANTID_KERNEL;PSAPI_VERSION=1" )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( Kernel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET Kernel PROPERTY FOLDER "MantidFramework" )
Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/LiveData/CMakeLists.txt
Expand Up @@ -61,8 +61,12 @@ enable_precompiled_headers( inc/MantidLiveData/PrecompiledHeader.h SRC_FILES )
# Add the target for this directory
add_library ( LiveData ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( LiveData PROPERTIES OUTPUT_NAME MantidLiveData
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
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")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET LiveData PROPERTY FOLDER "MantidFramework" )

Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt
Expand Up @@ -256,8 +256,12 @@ enable_precompiled_headers( inc/MantidMDAlgorithms/PrecompiledHeader.h SRC_FILES
add_library ( MDAlgorithms ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( MDAlgorithms PROPERTIES OUTPUT_NAME MantidMDAlgorithms
COMPILE_DEFINITIONS IN_MANTID_MDALGORITHMS
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
COMPILE_DEFINITIONS IN_MANTID_MDALGORITHMS )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( MDAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET MDAlgorithms PROPERTY FOLDER "MantidFramework" )

Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/MDEvents/CMakeLists.txt
Expand Up @@ -182,8 +182,11 @@ enable_precompiled_headers( inc/MantidMDEvents/PrecompiledHeader.h SRC_FILES )
add_library ( MDEvents ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( MDEvents PROPERTIES OUTPUT_NAME MantidMDEvents
COMPILE_DEFINITIONS IN_MANTID_MDEVENT
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS IN_MANTID_MDEVENT )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( MDEvents PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Intensive use of templated libaries can cause large objects to be generated. These require
# an additional flag in MSVC.
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/Nexus/CMakeLists.txt
Expand Up @@ -20,8 +20,11 @@ add_definitions ( -DIN_NEXUS_CPP_LIBRARY )
add_library ( Nexus ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( Nexus PROPERTIES OUTPUT_NAME MantidNexus
COMPILE_DEFINITIONS IN_MANTID_NEXUS
INSTALL_RPATH "@loader_path/../MacOS")
COMPILE_DEFINITIONS IN_MANTID_NEXUS )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( Nexus PROPERTIES INSTALL_RPATH "@loader_path/../MacOS" )
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET Nexus PROPERTY FOLDER "MantidFramework" )
Expand Down
Expand Up @@ -130,7 +130,10 @@ set_target_output_directory ( PythonAPIModule ${OUTPUT_DIR} .pyd )

# Add the required dependencies
target_link_libraries ( PythonAPIModule PythonGeometryModule PythonKernelModule API )
set_target_properties( PythonAPIModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/")

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties( PythonAPIModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/;@loader_path/../geometry/")
endif ()
###########################################################################
# Installation settings
###########################################################################
Expand Down
Expand Up @@ -71,7 +71,11 @@ set_python_properties( PythonGeometryModule _geometry )
set_target_output_directory ( PythonGeometryModule ${OUTPUT_DIR} .pyd )
# Add the required dependencies
target_link_libraries ( PythonGeometryModule PythonKernelModule Geometry )
set_target_properties ( PythonGeometryModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/")

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( PythonGeometryModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS;@loader_path/../kernel/")
endif ()

###########################################################################
# Installation settings
###########################################################################
Expand Down
Expand Up @@ -158,7 +158,11 @@ set_python_properties( PythonKernelModule _kernel )
set_target_output_directory ( PythonKernelModule ${OUTPUT_DIR} .pyd )
# Add the required dependencies
target_link_libraries ( PythonKernelModule Kernel ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${PYTHON_DEPS} )
set_target_properties ( PythonKernelModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS")

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( PythonKernelModule PROPERTIES INSTALL_RPATH "@loader_path/../../../MacOS")
endif ()

###########################################################################
# Installation settings
###########################################################################
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/RemoteAlgorithms/CMakeLists.txt
Expand Up @@ -38,8 +38,11 @@ set( INC_FILES
add_library ( RemoteAlgorithms ${SRC_FILES} ${INC_FILES})

# Set the name of the generated library
set_target_properties ( RemoteAlgorithms PROPERTIES OUTPUT_NAME MantidRemoteAlgorithms
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
set_target_properties ( RemoteAlgorithms PROPERTIES OUTPUT_NAME MantidRemoteAlgorithms )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( RemoteAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET RemoteAlgorithms PROPERTY FOLDER "MantidFramework" )
Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/SINQ/CMakeLists.txt
Expand Up @@ -149,8 +149,12 @@ enable_precompiled_headers ( inc/MantidSINQ/PrecompiledHeader.h SRC_FILES )
add_library ( SINQ ${SRC_FILES} ${INC_FILES} )
# Set the name of the generated library
set_target_properties ( SINQ PROPERTIES OUTPUT_NAME MantidSINQ
COMPILE_DEFINITIONS "IN_MANTID_SINQ"
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
COMPILE_DEFINITIONS "IN_MANTID_SINQ" )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( SINQ PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET SINQ PROPERTY FOLDER "MantidFramework" )

Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/Framework/ScriptRepository/CMakeLists.txt
Expand Up @@ -18,8 +18,11 @@ add_library ( ScriptRepository ${SRC_FILES} ${INC_FILES} )
add_subdirectory ( test )
# Set the name of the generated library
set_target_properties ( ScriptRepository PROPERTIES OUTPUT_NAME MantidScriptRepository
COMPILE_DEFINITIONS IN_MANTID_SCRIPTREPO
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
COMPILE_DEFINITIONS IN_MANTID_SCRIPTREPO )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( ScriptRepository PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

set_property (TARGET ScriptRepository PROPERTY FOLDER "MantidFramework")

Expand Down
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt
Expand Up @@ -98,8 +98,12 @@ enable_precompiled_headers( inc/MantidWorkflowAlgorithms/PrecompiledHeader.h SRC
# Add the target for this directory
add_library ( WorkflowAlgorithms ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( WorkflowAlgorithms PROPERTIES OUTPUT_NAME MantidWorkflowAlgorithms
INSTALL_RPATH "@loader_path/../Contents/MacOS/")
set_target_properties ( WorkflowAlgorithms PROPERTIES OUTPUT_NAME MantidWorkflowAlgorithms )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( WorkflowAlgorithms PROPERTIES INSTALL_RPATH "@loader_path/../Contents/MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET WorkflowAlgorithms PROPERTY FOLDER "MantidFramework" )

Expand Down
35 changes: 17 additions & 18 deletions Code/Mantid/MantidPlot/CMakeLists.txt
Expand Up @@ -903,8 +903,10 @@ target_link_libraries ( MantidPlot
)
# Plugin dependencies
add_dependencies( MantidPlot mantidqtpython )
set_target_properties(MantidPlot PROPERTIES INSTALL_RPATH "@executable_path/")

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties(MantidPlot PROPERTIES INSTALL_RPATH "@executable_path/")
endif ()

###########################################################################
# Custom Info.plist file for OS X
Expand Down Expand Up @@ -1035,21 +1037,18 @@ foreach(PY_FILE ${IPY_FILES} )
endforeach()
install ( FILES ${CONFIG_RESET_SCRIPT} DESTINATION ${BIN_DIR} )

#if ( APPLE )
# configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in
# ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
# @ONLY
# )
#
# install ( SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake )
#endif ()
message ("cmake install prefix: ${CMAKE_INSTALL_PREFIX}")
install ( FILES make_package.rb DESTINATION MantidPlot.app/ )
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixMavericksBundle.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/FixMavericksBundle.cmake
@ONLY
)
install ( SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixMavericksBundle.cmake )

#install( CODE "execute_process(COMMAND \"chmod + x \${CMAKE_INSTALL_PREFIX}/MantidPlot.app/make_package.rb\" )")
if ( APPLE )
if (OSX_VERSION VERSION_LESS 10.9)
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixBundle.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake
@ONLY )

install ( SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake )
else ()
install ( FILES make_package.rb DESTINATION MantidPlot.app/ )
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/FixMavericksBundle.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/FixMavericksBundle.cmake
@ONLY )
install ( SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixMavericksBundle.cmake )
endif ()
endif ()
3 changes: 2 additions & 1 deletion Code/Mantid/MantidPlot/make_package.rb
Expand Up @@ -63,7 +63,8 @@
library_filenames.each do |filename|
basename = File.basename(filename)
if dependency.include? basename
`install_name_tool -change #{filename} @rpath/#{basename} #{library}`
currentname = dependency.strip.split(" ")
`install_name_tool -change #{currentname[0]} @rpath/#{basename} #{library}`
end
end
end
Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/API/CMakeLists.txt
Expand Up @@ -120,8 +120,11 @@ qt4_wrap_ui ( UI_HDRS ${UI_FILES} )
enable_precompiled_headers( inc/MantidQtAPI/PrecompiledHeader.h ALL_SRC )
add_library ( MantidQtAPI ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )

set_target_properties ( MantidQtAPI PROPERTIES COMPILE_DEFINITIONS IN_MANTIDQT_API
INSTALL_RPATH "@loader_path/../MacOS")
set_target_properties ( MantidQtAPI PROPERTIES COMPILE_DEFINITIONS IN_MANTIDQT_API )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( MantidQtAPI PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

target_link_libraries ( MantidQtAPI ${CORE_MANTIDLIBS} ${QT_LIBRARIES} ${QWT_LIBRARIES} )

Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/CustomDialogs/CMakeLists.txt
Expand Up @@ -73,8 +73,11 @@ endif(UNITY_BUILD)
enable_precompiled_headers( inc/MantidQtCustomDialogs/PrecompiledHeader.h ALL_SRC )
add_library ( CustomDialogs ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )
# Set the name of the generated library
set_target_properties ( CustomDialogs PROPERTIES OUTPUT_NAME MantidQtCustomDialogs
INSTALL_RPATH "@loader_path/../../../Contents/MacOS/")
set_target_properties ( CustomDialogs PROPERTIES OUTPUT_NAME MantidQtCustomDialogs )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( CustomDialogs PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/MacOS")
endif ()

target_link_libraries ( CustomDialogs MantidQtAPI MantidWidgets )

Expand Down
7 changes: 5 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt
Expand Up @@ -324,8 +324,11 @@ add_library ( CustomInterfaces ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )

# Set the name of the generated library
set_target_properties ( CustomInterfaces PROPERTIES OUTPUT_NAME MantidQtCustomInterfaces
COMPILE_DEFINITIONS IN_MANTIDQT_CUSTOMINTERFACES
INSTALL_RPATH "@loader_path/../../../Contents/MacOS/")
COMPILE_DEFINITIONS IN_MANTIDQT_CUSTOMINTERFACES )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( CustomInterfaces PROPERTIES INSTALL_RPATH "@loader_path/../../../Contents/MacOS")
endif ()

find_Package(Threads)

Expand Down
4 changes: 3 additions & 1 deletion Code/Mantid/MantidQt/Factory/CMakeLists.txt
Expand Up @@ -39,7 +39,9 @@ add_definitions ( -DIN_MANTIDQT_FACTORY )
# This creates the target library
add_library ( MantidQtFactory ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )

set_target_properties ( MantidQtFactory PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( MantidQtFactory PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# ... and links to other required libs
target_link_libraries ( MantidQtFactory MantidQtAPI MantidQtSliceViewer ${QT_LIBRARIES} ${QWT_LIBRARIES} )
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/MantidQt/MantidWidgets/CMakeLists.txt
Expand Up @@ -151,8 +151,9 @@ add_definitions ( -DIN_MANTIDQT_MANTIDWIDGETS -DQT_QTPROPERTYBROWSER_IMPORT )
enable_precompiled_headers( inc/MantidQtMantidWidgets/PrecompiledHeader.h ALL_SRC )
add_library ( MantidWidgets ${ALL_SRC} ${INC_FILES} ${UI_HDRS} )

set_target_properties ( MantidWidgets PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( MantidWidgets PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

target_link_libraries ( MantidWidgets MantidQtAPI QtPropertyBrowser
${QT_LIBRARIES} ${QWT_LIBRARIES}
Expand Down

0 comments on commit a6c85a2

Please sign in to comment.