Commit 6019ac44 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: update QT4 superbuild configure

parent 604d1d23
if(NOT __EXTERNAL_OPENSSL__)
set(__EXTERNAL_OPENSSL__ 1)
#RK: OPENSSL is deactivated in QT4 build.
#revisit that when you have a clean openssl
message(STATUS "Setup OpenSSL ...")
if(USE_SYSTEM_OPENSSL)
......
if(NOT __EXTERNAL_QT4__)
set(__EXTERNAL_QT4__ 1)
set(__EXTERNAL_QT4__ 1)
message(STATUS "Setup Qt4 ...")
message(STATUS "Setup Qt4 ...")
if(USE_SYSTEM_QT4)
find_package ( Qt4 )
message(STATUS " Using Qt4 system version")
else()
SETUP_SUPERBUILD(PROJECT QT4)
message(STATUS " Using Qt4 SuperBuild version")
if(UNIX AND NOT APPLE)
message(STATUS " SuperBuild may fail to compile Qt4. If so, you should install it via package manager.")
endif()
if(USE_SYSTEM_QT4)
find_package ( Qt4 )
message(STATUS " Using Qt4 system version")
else()
SETUP_SUPERBUILD(PROJECT QT4)
message(STATUS " Using Qt4 SuperBuild version")
if(UNIX AND NOT APPLE)
message(STATUS " SuperBuild may fail to compile Qt4. If so, you should install it via package manager.")
endif()
if(NOT DEFINED git_protocol)
set(git_protocol "git")
endif()
if(NOT DEFINED git_protocol)
set(git_protocol "git")
endif()
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QT4 ZLIB TIFF PNG SQLITE FREETYPE)
# declare dependencies
ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(QT4 ZLIB TIFF PNG SQLITE FREETYPE)
#use system libs always for Qt4 as we build them from source or have already in system
set(QT4_SB_CONFIG)
#use system libs always for Qt4 as we build them from source or have already in system
set(QT4_SB_CONFIG)
#RK: building faling on mac. png include is in a macframework
if(USE_SYSTEM_PNG)
#why this regex below? because when the "awesome" configure of QT4
#is run a ';' remaining part of semicolon is considered as next
# command!
STRING(REGEX REPLACE ";" " " _PNG_INCLUDE_DIR_ ${PNG_INCLUDE_DIR})
set(QT4_SB_CONFIG "-I ${_PNG_INCLUDE_DIR_}")
endif()
if(APPLE)
set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-framework -rpath")
endif()
STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${SB_INSTALL_PREFIX})
STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
if(MSVC)
configure_file(${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.bat.in
${CMAKE_BINARY_DIR}/configure_qt4.bat
@ONLY)
if(MSVC)
configure_file(
${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.bat.in
${CMAKE_BINARY_DIR}/configure_qt4.bat
@ONLY)
ExternalProject_Add(QT4
PREFIX QT4
URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
BINARY_DIR ${QT4_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
configure_qt4.bat
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
ExternalProject_Add(QT4
PREFIX QT4
URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
BINARY_DIR ${QT4_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/configure_qt4.bat
${QT4_SB_SRC}
CONFIGURE_COMMAND
configure_qt4.bat
DEPENDS ${QT4_DEPENDENCIES} )
ExternalProject_Add_Step(QT4 _jpeg_lib_name
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
${QT4_SB_SRC}/src/gui/image/
DEPENDEES patch update
DEPENDERS configure )
ExternalProject_Add_Step(QT4 _jpeg_lib_name
COMMAND
${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
${QT4_SB_SRC}/src/gui/image/
DEPENDEES patch update
DEPENDERS configure )
else()
ExternalProject_Add(QT4
PREFIX QT4
URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
BINARY_DIR ${QT4_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CONFIGURE_COMMAND
${QT4_SB_SRC}/configure -prefix ${SB_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L ${SB_INSTALL_PREFIX}/lib -I ${SB_INSTALL_PREFIX}/include -I ${SB_INSTALL_PREFIX}/include/freetype2 -no-xrender -no-fontconfig -no-sm
DEPENDS ${QT4_DEPENDENCIES}
)
endif()
else()
configure_file(
${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.sh.in
${CMAKE_BINARY_DIR}/configure_qt4.sh
@ONLY)
set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)
ExternalProject_Add(QT4
PREFIX QT4
URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
URL_MD5 d990ee66bf7ab0c785589776f35ba6ad
BINARY_DIR ${QT4_SB_SRC}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/configure_qt4.sh
${QT4_SB_SRC}
CONFIGURE_COMMAND
${CMAKE_BINARY_DIR}/configure_qt4.sh
DEPENDS ${QT4_DEPENDENCIES}
)
endif()
#copying Qt4 to have out-of-source build takes too much disk space
# ExternalProject_Add_Step(QT4 copy_source
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${QT4_SB_SRC} ${QT4_SB_BUILD_DIR}
# DEPENDEES patch update
# DEPENDERS configure
# )
set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)
endif()
endif()
endif()
......@@ -4,7 +4,7 @@ set SB_SAVE_LIB=%LIB%
set INCLUDE=%INCLUDE%;@CMAKE_WIN_INSTALL_PREFIX@\include
set LIB=%LIB%;@CMAKE_WIN_INSTALL_PREFIX@\lib
configure -prefix @CMAKE_WIN_INSTALL_PREFIX@ -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L @CMAKE_WIN_INSTALL_PREFIX@\lib -I @CMAKE_WIN_INSTALL_PREFIX@\include
configure -prefix @CMAKE_WIN_INSTALL_PREFIX@ -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L @CMAKE_WIN_INSTALL_PREFIX@\lib -I @CMAKE_WIN_INSTALL_PREFIX@\include -no-openssl -no-nsis -silent -fast -no-javascript-jit -no-openssl -no-declarative
set INCLUDE=%SB_SAVE_INCLUDE%
set LIB=%SB_SAVE_LIB%
@QT4_SB_SRC@/configure -prefix @SB_INSTALL_PREFIX@ -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L @SB_INSTALL_PREFIX@/lib -I @SB_INSTALL_PREFIX@/include -I @SB_INSTALL_PREFIX@/include/freetype2 @QT4_SB_CONFIG@ -no-xrender -no-fontconfig -no-sm -no-nis -silent -fast -no-javascript-jit -no-openssl -no-declarative
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment