Permalink
Browse files

install qt 4.8 sdk into dependencies/linux directory

  • Loading branch information...
1 parent ec169d9 commit 6d11db11fd8a373a24c658ebd1a1f94c537a161a @jjallaire jjallaire committed Feb 22, 2012
Showing with 32 additions and 10 deletions.
  1. +3 −2 CMakeGlobals.txt
  2. +1 −0 dependencies/linux/.gitignore
  3. +21 −7 dependencies/linux/older/install-qt-48-sdk
  4. +7 −1 src/cpp/desktop/CMakeLists.txt
View
@@ -88,9 +88,10 @@ endif()
get_filename_component(ROOT_SRC_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
set(CMAKE_MODULE_PATH "${ROOT_SRC_DIR}/cmake/modules/")
-# windows dependencies
+# dependencies
+set(RSTUDIO_DEPENDENCIES_DIR "${ROOT_SRC_DIR}/dependencies")
if(WIN32)
- set(RSTUDIO_WINDOWS_DEPENDENCIES_DIR "${ROOT_SRC_DIR}/dependencies/windows")
+ set(RSTUDIO_WINDOWS_DEPENDENCIES_DIR "${RSTUDIO_DEPENDENCIES_DIR}/windows")
endif()
# special install directories for apple desktop
@@ -0,0 +1 @@
+QtSDK
@@ -13,26 +13,40 @@
#
#
+# This archive includes the files required to build against Qt 4.8. It was
+# created by:
+#
+# 1) Installing the Qt 4.8 SDK into the default location in the home folder
+# 2) Removing all folders in the QtSDK folder except for the Desktop folder
+# 3) Creating an archive from ~ using:
+#
+# tar czf QtSDK-4.8.0-x86_64.tar.gz QtSDK/
+#
+
+# install dir
+INSTALL_DIR=`pwd`
+
# define QT archive to download
SYSTEM_ARCH=`getconf LONG_BIT`
if [ "$SYSTEM_ARCH" == "64" ]
then
- QT_ARCH=64
+ QT_ARCH=x86_64
else
- QT_ARCH=32
+ QT_ARCH=x86
fi
-QT_SDK_BINARY=Qt_SDK_Lin${QT_ARCH}_offline_v1_2_en.run
+QT_SDK_BINARY=QtSDK-4.8.0-${QT_ARCH}.tar.gz
QT_SDK_URL=https://s3.amazonaws.com/rstudio-buildtools/$QT_SDK_BINARY
-QT_SDK_DIR=$HOME/QtSDK/Desktop/Qt/4.8.0
+QT_SDK_DIR=$INSTALL_DIR/../QtSDK
if ! test -e $QT_SDK_DIR
then
# download and install
+ cd ..
wget $QT_SDK_URL -O $QT_SDK_BINARY
- chmod +x $QT_SDK_BINARY
- ./$QT_SDK_BINARY
+ tar xf $QT_SDK_BINARY
rm $QT_SDK_BINARY
+ cd $INSTALL_DIR
else
- echo "Qt 4.8.0 SDK already installed at $QT_SDK_DIR"
+ echo "Qt 4.8.0 SDK already installed"
fi
@@ -16,10 +16,16 @@ project(DESKTOP)
# include qt (on linux prefer sdk installation of qt 4.8.0 if it exists)
if (UNIX AND NOT APPLE)
if(NOT QT_QMAKE_EXECUTABLE)
- set(QMAKE_QT48_SDK "$ENV{HOME}/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake")
+ set(QMAKE_QT48_SDK "${RSTUDIO_DEPENDENCIES_DIR}/linux/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake")
if(EXISTS ${QMAKE_QT48_SDK})
set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
set(RSTUDIO_USING_QT48_SDK TRUE)
+ else()
+ set(QMAKE_QT48_SDK "$ENV{HOME}/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake")
+ if(EXISTS ${QMAKE_QT48_SDK})
+ set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
+ set(RSTUDIO_USING_QT48_SDK TRUE)
+ endif()
endif()
endif()
endif()

0 comments on commit 6d11db1

Please sign in to comment.