<commit_before>#
# CMakeLists.txt
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

project(DESKTOP)

# require Qt 4.8
set(QT_VERSION 4.8.0)

# on unix prefer qtsdk installs over system-level libraries. note this
# can be overriden by defining QT_QMAKE_EXECUTABLE when invoking cmake
if(NOT WIN32)
   # prefer rstudio qtsdk install then home qtsdk install
   if(NOT QT_QMAKE_EXECUTABLE)
      set(QMAKE_QT48_SDK "/opt/RStudio-QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake")
      if(EXISTS ${QMAKE_QT48_SDK})
         set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
      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})
         endif()
      endif()
   endif()
else()
   if(NOT QT_QMAKE_EXECUTABLE)
      set(QMAKE_QT48_SDK "C:\\Qt\\4.8.4\\bin\\qmake.exe")
      if(EXISTS ${QMAKE_QT48_SDK})
         set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
      endif()
   endif()
endif()

# find and include Qt
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
list(APPEND RSTUDIO_QT_COMPONENTS QtCore QtGui QtNetwork QtWebKit)
if(UNIX AND NOT APPLE)
   list(APPEND RSTUDIO_QT_COMPONENTS QtDBus)
endif()
find_package(Qt4 ${QT_VERSION} COMPONENTS ${RSTUDIO_QT_COMPONENTS} REQUIRED)
include(${QT_USE_FILE})

# disable clang warnings for qt sources
if(APPLE)
   add_definitions(-Wno-unused-private-field
                   -Wno-uninitialized)
endif()

# configure NOTICE file into build directory so it can be read at dev time
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../NOTICE
               ${CMAKE_CURRENT_BINARY_DIR}/.. COPYONLY)<commit_msg>use default framework qt on mac<commit_after>#
# CMakeLists.txt
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

project(DESKTOP)

# require Qt 4.8
set(QT_VERSION 4.8.0)

# on unix prefer qtsdk installs over system-level libraries. note this
# can be overriden by defining QT_QMAKE_EXECUTABLE when invoking cmake
if(UNIX AND NOT APPLE)
   # prefer rstudio qtsdk install then home qtsdk install
   if(NOT QT_QMAKE_EXECUTABLE)
      set(QMAKE_QT48_SDK "/opt/RStudio-QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake")
      if(EXISTS ${QMAKE_QT48_SDK})
         set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
      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})
         endif()
      endif()
   endif()
# on windows hard-code to default Qt 4.8.4 install location
elseif(WIN32)
   if(NOT QT_QMAKE_EXECUTABLE)
      set(QMAKE_QT48_SDK "C:\\Qt\\4.8.4\\bin\\qmake.exe")
      if(EXISTS ${QMAKE_QT48_SDK})
         set(QT_QMAKE_EXECUTABLE ${QMAKE_QT48_SDK})
      endif()
   endif()
# on apple use the default framework installation
elseif(APPLE)

endif()

# find and include Qt
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
list(APPEND RSTUDIO_QT_COMPONENTS QtCore QtGui QtNetwork QtWebKit)
if(UNIX AND NOT APPLE)
   list(APPEND RSTUDIO_QT_COMPONENTS QtDBus)
endif()
find_package(Qt4 ${QT_VERSION} COMPONENTS ${RSTUDIO_QT_COMPONENTS} REQUIRED)
include(${QT_USE_FILE})

# disable clang warnings for qt sources
if(APPLE)
   add_definitions(-Wno-unused-private-field
                   -Wno-uninitialized)
endif()

# configure NOTICE file into build directory so it can be read at dev time
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../NOTICE
               ${CMAKE_CURRENT_BINARY_DIR}/.. COPYONLY)
{'fraction_non_alphanumeric': 0.09726240819051858, 'fraction_numerical': 0.02025372802136657, 'mean_word_length': 3.8478964401294498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2861846', 'n_tokens_mistral': 1752, 'n_tokens_neox': 1558, 'n_words': 415}