From 8cc04600d2aa72358af46d923938ff8371eb0236 Mon Sep 17 00:00:00 2001 From: Stuart Campbell <campbellsi@ornl.gov> Date: Mon, 19 Mar 2012 17:10:05 -0400 Subject: [PATCH] Separated out the Windows and Mac OS X 3rd Party stuff. refs #4472 --- Code/Mantid/CMakeLists.txt | 48 ++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/Code/Mantid/CMakeLists.txt b/Code/Mantid/CMakeLists.txt index 7a62ce674c5..4e7e582f1dd 100644 --- a/Code/Mantid/CMakeLists.txt +++ b/Code/Mantid/CMakeLists.txt @@ -24,16 +24,44 @@ find_package ( Qt4 COMPONENTS QtCore QtGui QtOpenGL QtXml QtSvg Qt3Support REQUI include ( UseSystemQt4 ) ########################################################################### -# Set paths to Third_Party for Windows and Mac builds -########################################################################### -if ( NOT THIRD_PARTY ) - set ( THIRD_PARTY "${PROJECT_SOURCE_DIR}/../Third_Party" ) - if ( WIN32 ) - include ( WindowsSetup ) - elseif ( APPLE ) - include ( DarwinSetup ) - endif () -endif () +# Set paths to Third_Party for Windows builds +########################################################################### +IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + if ( NOT THIRD_PARTY ) + set ( THIRD_PARTY "${PROJECT_SOURCE_DIR}/../Third_Party" ) + endif () + # Print out were we think we are looking for 3rd party stuff + message (STATUS "Setting THIRD_PARTY to be ${THIRD_PARTY}." ) + + # Check that the 3rd party directory exists. + if (NOT IS_DIRECTORY "${THIRD_PARTY}") + message ( FATAL_ERROR "Specified THIRD_PARTY directory doesn't exist!" ) + endif() + + include ( WindowsSetup ) + +ENDIF() + +########################################################################### +# Set paths to Third_Party for Mac builds +########################################################################### +IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + if ( NOT THIRD_PARTY ) + set ( THIRD_PARTY "${PROJECT_SOURCE_DIR}/../Third_Party" ) + endif () + + # Print out were we think we are looking for 3rd party stuff + message (STATUS "Setting THIRD_PARTY to be ${THIRD_PARTY}." ) + + # Check that the 3rd party directory exists. + if (NOT IS_DIRECTORY "${THIRD_PARTY}") + message ( FATAL_ERROR "Specified THIRD_PARTY directory doesn't exist!" ) + endif() + + include ( DarwinSetup ) + +ENDIF() ########################################################################### # Call our setup script -- GitLab