diff --git a/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx b/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx index 6e4d60d92759ec96b4a23130c515ff352f99bc9f..40db99f6b6e483b6c860b6ea9f4cb3a56658038d 100644 --- a/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx +++ b/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx @@ -28,7 +28,7 @@ namespace Wrapper QtApplication::QtApplication(int& argcc, char** argvv) : QApplication(argcc, argvv) { - + std::cout<<QApplication::font().defaultFamily().toStdString()<<std::endl; } bool diff --git a/SuperBuild/CMake/External_qt5.cmake b/SuperBuild/CMake/External_qt5.cmake index e7dab50979307768e27928413c0ad43d64c713e3..934caa492f1a55bcea1c189c739b5a9cd4c4df58 100644 --- a/SuperBuild/CMake/External_qt5.cmake +++ b/SuperBuild/CMake/External_qt5.cmake @@ -57,7 +57,7 @@ set(QT5_SB_CONFIG "-prefix ${QT5_INSTALL_PREFIX_NATIVE} -L ${QT5_LIB_PREFIX_NATIVE} \ -I ${QT5_INCLUDE_PREFIX_NATIVE} -I ${QT5_INCLUDE_FREETYPE_NATIVE} \ -opensource -confirm-license -release -shared \ - -nomake examples -nomake tools -no-openssl \ + -nomake examples -make tools -no-openssl \ -skip qtgamepad \ -skip qt3d \ -skip qtactiveqt \ @@ -194,3 +194,11 @@ configure_file( ${QT5_CONFIGURE_COMMAND_IN} ${QT5_CONFIGURE_COMMAND} @ONLY ) SUPERBUILD_PATCH_SOURCE(QT5) set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake) + +if(UNIX AND NOT APPLE) + ExternalProject_Add_Step(QT5 adding_font + COMMAND ${CMAKE_COMMAND} + -D BUILD_DIR=${QT5_SB_BUILD_DIR} -D INSTALL_DIR=${SB_INSTALL_PREFIX} -D DOWNLOAD_LOCATION=${DOWNLOAD_LOCATION} -P /home/antoine/dev/off_otbL/otb/SuperBuild/CMake/font_qt.cmake + DEPENDEES install + WORKING_DIRECTORY ${SB_INSTALL_PREFIX} ) +endif() diff --git a/SuperBuild/CMake/font_qt.cmake b/SuperBuild/CMake/font_qt.cmake new file mode 100644 index 0000000000000000000000000000000000000000..d88fdbf2e98033df456e29a6bba6b15205acfaa7 --- /dev/null +++ b/SuperBuild/CMake/font_qt.cmake @@ -0,0 +1,38 @@ +# +# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +get_filename_component(BUILD_DIR ${BUILD_DIR} DIRECTORY) + +if( NOT DOWNLOAD_LOCATION ) + set (DOWNLOAD_LOCATION ${BUILD_DIR}/src/) +endif() + +file(MAKE_DIRECTORY ${INSTALL_DIR}/lib/fonts/) +file(DOWNLOAD + http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2 + ${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2 + EXPECTED_MD5 d0efec10b9f110a32e9b8f796e21782c) + +execute_process( +COMMAND ${CMAKE_COMMAND} -E tar -xf ${DOWNLOAD_LOCATION}/dejavu-fonts-ttf-2.37.tar.bz2 +WORKING_DIRECTORY ${BUILD_DIR} ) + +file( COPY ${BUILD_DIR}/dejavu-fonts-ttf-2.37/ttf/. + DESTINATION ${INSTALL_DIR}/lib/fonts/.)