<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_MAC)

# enable developer extras 
exec_program(defaults 
             ARGS write org.rstudio.RStudio WebKitDeveloperExtras -bool true
             OUTPUT_VARIABLE DEV_EXTRAS)

# 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)

# include files
file(GLOB_RECURSE DESKTOP_MAC_HEADER_FILES "*.h*")

configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desktop-config.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/desktop-config.h)

# source files
set(DESKTOP_MAC_SOURCE_FILES
   Main.m
   GwtCallbacks.m
   WebViewController.m
)


# include directories
include_directories(
  include
  ${CORE_SOURCE_DIR}/include
  ${CMAKE_CURRENT_BINARY_DIR}
)


find_library(APPKIT_LIBRARY NAMES AppKit)
find_library(OPENGL_LIBRARY NAMES OpenGL)
find_library(WEBKIT_LIBRARY NAMES WebKit)

# configure Info.plist
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
                ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)

# collect list of icns files
file(GLOB ICNS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icns/*.icns)

# set our icns as the bundle icon
set(MACOSX_BUNDLE_ICON_FILE RStudio.icns)
set_source_files_properties(${ICNS_FILES}
   PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

# define bundle name and executable
set(MACOSX_BUNDLE_BUNDLE_NAME "RStudio")

add_executable(RStudio MACOSX_BUNDLE
   ${DESKTOP_MAC_SOURCE_FILES}
   ${ICNS_FILES})

target_link_libraries(RStudio
   rstudio-core
   ${APPKIT_LIBRARY}
   ${OPENGL_LIBRARY}
   ${WEBKIT_LIBRARY})

# install target (OSX install goes into the bundle)
set_target_properties(RStudio PROPERTIES
  MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
install(TARGETS RStudio BUNDLE DESTINATION .)

# install mac-terminal script
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mac-terminal.in
               ${CMAKE_CURRENT_BINARY_DIR}/mac-terminal)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mac-terminal
                 DESTINATION ${RSTUDIO_INSTALL_BIN})

<commit_msg>tweaks to cmake lists: order and include header files in xcode project<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_MAC)

# libraries
find_library(APPKIT_LIBRARY NAMES AppKit)
find_library(OPENGL_LIBRARY NAMES OpenGL)
find_library(WEBKIT_LIBRARY NAMES WebKit)

# include files
file(GLOB_RECURSE DESKTOP_MAC_HEADER_FILES "*.h*")

configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desktop-config.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/desktop-config.h)

# source files
set(DESKTOP_MAC_SOURCE_FILES
   Main.m
   GwtCallbacks.m
   WebViewController.m
)

# include directories
include_directories(
  include
  ${CORE_SOURCE_DIR}/include
  ${CMAKE_CURRENT_BINARY_DIR}
)

# configure Info.plist
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
                ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)

# collect list of icns files
file(GLOB ICNS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icns/*.icns)

# set our icns as the bundle icon
set(MACOSX_BUNDLE_ICON_FILE RStudio.icns)
set_source_files_properties(${ICNS_FILES}
   PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

# define bundle name and executable
set(MACOSX_BUNDLE_BUNDLE_NAME "RStudio")

add_executable(RStudio MACOSX_BUNDLE
   ${DESKTOP_MAC_SOURCE_FILES}
   ${DESKTOP_MAC_HEADER_FILES}
   ${ICNS_FILES})

target_link_libraries(RStudio
   rstudio-core
   ${APPKIT_LIBRARY}
   ${OPENGL_LIBRARY}
   ${WEBKIT_LIBRARY})

# install target (OSX install goes into the bundle)
set_target_properties(RStudio PROPERTIES
  MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
install(TARGETS RStudio BUNDLE DESTINATION .)

# install mac-terminal script
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mac-terminal.in
               ${CMAKE_CURRENT_BINARY_DIR}/mac-terminal)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/mac-terminal
                 DESTINATION ${RSTUDIO_INSTALL_BIN})
                 
# enable developer extras 
exec_program(defaults 
             ARGS write org.rstudio.RStudio WebKitDeveloperExtras -bool true
             OUTPUT_VARIABLE DEV_EXTRAS)




{'fraction_non_alphanumeric': 0.07869664634146341, 'fraction_numerical': 0.003429878048780488, 'mean_word_length': 4.755482456140351, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4209436', 'n_tokens_mistral': 1877, 'n_tokens_neox': 1732, 'n_words': 404}