53 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
 | 
						|
    message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there. You may need to remove CMakeCache.txt." )
 | 
						|
endif()
 | 
						|
 | 
						|
project(ubuntu-sdk C CXX)
 | 
						|
 | 
						|
include(ExternalProject)
 | 
						|
 | 
						|
cmake_minimum_required(VERSION 2.8.9)
 | 
						|
set (ubuntu_sdk_VERSION_MAJOR 3)
 | 
						|
set (ubuntu_sdk_VERSION_MINOR 5)
 | 
						|
 | 
						|
# configure a header file to pass some of the CMake settings
 | 
						|
# to the source code
 | 
						|
configure_file (
 | 
						|
  "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
 | 
						|
  "${PROJECT_BINARY_DIR}/TutorialConfig.h"
 | 
						|
  )
 | 
						|
 
 | 
						|
# add the binary tree to the search path for include files
 | 
						|
# so that we will find TutorialConfig.h
 | 
						|
include_directories("${PROJECT_BINARY_DIR}")
 | 
						|
 | 
						|
 | 
						|
add_executable(ubuntu-sdk ubuntu-sdk.cpp)
 | 
						|
 | 
						|
#ExternalProject_Add(qt-everywhere-opensource-src-5.5.0
 | 
						|
#  URL http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.gz
 | 
						|
#  PREFIX "${CMAKE_SOURCE_DIR}/qt"
 | 
						|
#)
 | 
						|
 | 
						|
ExternalProject_Add(qt-everywhere-opensource-src-5.4.2
 | 
						|
  PREFIX "${CMAKE_SOURCE_DIR}/qt"
 | 
						|
  #URL http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.gz
 | 
						|
  URL /home/balogh/qt-everywhere-opensource-src-5.4.2.tar.gz
 | 
						|
  PATCH_COMMAND sh -c "dget https://launchpad.net/ubuntu/+archive/primary/+files/qtfeedback-opensource-src_5.0~git20130529-0ubuntu11.dsc"
 | 
						|
  COMMAND sh -c "mv qtfeedback-opensource-src-* qtfeedback"
 | 
						|
  COMMAND sh -c "mkdir qtfeedback/.git"
 | 
						|
  COMMAND sh -c "dget https://launchpad.net/ubuntu/+archive/primary/+files/qtpim-opensource-src_5.0~git20140515~29475884-0ubuntu11.dsc"
 | 
						|
  COMMAND sh -c "mv qtpim-opensource-src-* qtpim"
 | 
						|
  COMMAND sh -c "mkdir qtpim/.git"
 | 
						|
  COMMAND sh -c "bzr branch lp:ubuntu-ui-toolkit ubuntu-sdk"
 | 
						|
  COMMAND sh -c "echo \"addModule(ubuntu-sdk,qtdeclarative qtfeedback qtpim)\" >>  qt.pro"
 | 
						|
  COMMAND sh -c "mkdir -p ${CMAKE_BINARY_DIR}/qt"
 | 
						|
  COMMAND sh -c "./configure `cat ${CMAKE_SOURCE_DIR}/qt5config `"
 | 
						|
  COMMAND sh -c "make -j 4"
 | 
						|
  COMMAND sh -c "make install"
 | 
						|
)
 | 
						|
 | 
						|
 | 
						|
#bzoltan: what should happen is:   pull qt, pull uitk into qt, build qt, install qt to builddir/qt, pull qtc, pull ubuntu pluign into qtc, build qtc, install qtc and qt with (make deployqt)
 | 
						|
#bzoltan: qtc buildfiles have a "deployqt" target that _should_ do the right thing
 |