<commit_before>### dtkDependencies.cmake --- 
## 
## Author: <NAME>
## Copyright (C) 2008 - <NAME>, Inria.
## Created: Fri Apr  2 09:11:53 2010 (+0200)
## Version: $Id$
## Last-Updated: Thu May  3 15:05:28 2012 (+0200)
##           By: <NAME>
##     Update #: 103
######################################################################
## 
### Commentary: 
## 
######################################################################
## 
### Change log:
## 
######################################################################

## #################################################################
## Qt
## #################################################################

set(QT_USE_QTOPENGL      TRUE)
set(QT_USE_QTXML         TRUE)
set(QT_USE_QTSQL         TRUE)
set(QT_USE_QTHELP        TRUE)
set(QT_USE_QTNETWORK     TRUE)
set(QT_USE_QTWEBKIT      TRUE)

if(WIN32)
  set(QT_USE_QTMAIN TRUE)
endif(WIN32)

find_package(Qt4 4.6.0 REQUIRED)

if(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
  set(QT_USE_QTDECLARATIVE TRUE)
endif(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)

include(${QT_USE_FILE})

mark_as_advanced(QT_QMAKE_EXECUTABLE)
mark_as_advanced(QT_QTMOTIF_INCLUDE_DIR)
mark_as_advanced(QT_QTMOTIF_LIBRARY_DEBUG)
mark_as_advanced(QT_QTMOTIF_LIBRARY_RELEASE)

## #################################################################
## Wrapping
## #################################################################

if(DTK_BUILD_WRAPPERS)

## #################################################################
## Swig
## #################################################################

mark_as_advanced(SWIG_DIR)
mark_as_advanced(SWIG_EXECUTABLE)
mark_as_advanced(SWIG_VERSION)

find_package(SWIG QUIET)

if(SWIG_FOUND)
  include(${SWIG_USE_FILE})
  set(CMAKE_SWIG_FLAGS "")
  
  macro(dtk_wrap project target name language input deps)
    
    set(wrap_output ${project}_wrap_${language}.cpp)
    
    add_custom_command(
      OUTPUT ${wrap_output}
      COMMAND ${SWIG_EXECUTABLE}
      ARGS
      "-${language}"
      "-c++"
      "-module" ${name}
      "-I${PROJECT_SOURCE_DIR}/.."
      "-outdir" ${CMAKE_CURRENT_BINARY_DIR}
      "-o" ${wrap_output}
      ${input}
      MAIN_DEPENDENCY ${input}
      COMMENT "Wrapping ${input} to ${language}")
    
    set(${target} ${${target}} ${wrap_output})
    
  endmacro(dtk_wrap)
endif(SWIG_FOUND)

if(SWIG_FOUND)
  add_definitions(-DHAVE_SWIG)
endif(SWIG_FOUND)

## #################################################################
## Tcl
## #################################################################

if(NOT WINDOWS)

find_package(TCL QUIET)

if(TCL_FOUND)
  include_directories(${TCL_INCLUDE_PATH})
endif(TCL_FOUND)

if(TCL_FOUND)
  add_definitions(-DHAVE_TCL)
endif(TCL_FOUND)

endif(NOT WINDOWS)

## #################################################################
## Python
## #################################################################

find_package(PythonLibs QUIET)

if(PYTHONLIBS_FOUND)
  include_directories(${PYTHON_INCLUDE_DIRS})
  get_filename_component(PYTHON_PATH ${PYTHON_LIBRARIES} PATH)
  link_directories(${PYTHON_PATH})
endif(PYTHONLIBS_FOUND)

if(PYTHONLIBS_FOUND)
  add_definitions(-DHAVE_PYTHON)
endif(PYTHONLIBS_FOUND)

## #################################################################
## Editline
## #################################################################

mark_as_advanced(EDITLINE_INCLUDE_DIR)
mark_as_advanced(EDITLINE_LIBRARY)

find_path(EDITLINE_INCLUDE_DIR histedit.h<commit_msg>Let TCL available on M$ Windows.<commit_after>### dtkDependencies.cmake --- 
## 
## Author: <NAME>
## Copyright (C) 2008 - <NAME>, Inria.
## Created: Fri Apr  2 09:11:53 2010 (+0200)
## Version: $Id$
## Last-Updated: Wed Jun 13 14:04:54 2012 (+0200)
##           By: <NAME>
##     Update #: 106
######################################################################
## 
### Commentary: 
## 
######################################################################
## 
### Change log:
## 
######################################################################

## #################################################################
## Qt
## #################################################################

set(QT_USE_QTOPENGL      TRUE)
set(QT_USE_QTXML         TRUE)
set(QT_USE_QTSQL         TRUE)
set(QT_USE_QTHELP        TRUE)
set(QT_USE_QTNETWORK     TRUE)
set(QT_USE_QTWEBKIT      TRUE)

if(WIN32)
  set(QT_USE_QTMAIN TRUE)
endif(WIN32)

find_package(Qt4 4.6.0 REQUIRED)

if(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
  set(QT_USE_QTDECLARATIVE TRUE)
endif(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)

include(${QT_USE_FILE})

mark_as_advanced(QT_QMAKE_EXECUTABLE)
mark_as_advanced(QT_QTMOTIF_INCLUDE_DIR)
mark_as_advanced(QT_QTMOTIF_LIBRARY_DEBUG)
mark_as_advanced(QT_QTMOTIF_LIBRARY_RELEASE)

## #################################################################
## Wrapping
## #################################################################

if(DTK_BUILD_WRAPPERS)

## #################################################################
## Swig
## #################################################################

mark_as_advanced(SWIG_DIR)
mark_as_advanced(SWIG_EXECUTABLE)
mark_as_advanced(SWIG_VERSION)

find_package(SWIG QUIET)

if(SWIG_FOUND)
  include(${SWIG_USE_FILE})
  set(CMAKE_SWIG_FLAGS "")
  
  macro(dtk_wrap project target name language input deps)
    
    set(wrap_output ${project}_wrap_${language}.cpp)
    
    add_custom_command(
      OUTPUT ${wrap_output}
      COMMAND ${SWIG_EXECUTABLE}
      ARGS
      "-${language}"
      "-c++"
      "-module" ${name}
      "-I${PROJECT_SOURCE_DIR}/.."
      "-outdir" ${CMAKE_CURRENT_BINARY_DIR}
      "-o" ${wrap_output}
      ${input}
      MAIN_DEPENDENCY ${input}
      COMMENT "Wrapping ${input} to ${language}")
    
    set(${target} ${${target}} ${wrap_output})
    
  endmacro(dtk_wrap)
endif(SWIG_FOUND)

if(SWIG_FOUND)
  add_definitions(-DHAVE_SWIG)
endif(SWIG_FOUND)

## #################################################################
## Tcl
## #################################################################

find_package(TCL QUIET)

if(TCL_FOUND)
  include_directories(${TCL_INCLUDE_PATH})
endif(TCL_FOUND)

if(TCL_FOUND)
  add_definitions(-DHAVE_TCL)
endif(TCL_FOUND)

## #################################################################
## Python
## #################################################################

find_package(PythonLibs QUIET)

if(PYTHONLIBS_FOUND)
  include_directories(${PYTHON_INCLUDE_DIRS})
  get_filename_component(PYTHON_PATH ${PYTHON_LIBRARIES} PATH)
  link_directories(${PYTHON_PATH})
endif(PYTHONLIBS_FOUND)

if(PYTHONLIBS_FOUND)
  add_definitions(-DHAVE_PYTHON)
endif(PYTHONLIBS_FOUND)

## #################################################################
## Editline
## #################################################################

mark_as_advanced(EDITLINE_INCLUDE_DIR)
mark_as_advanced(EDITLINE_LIBRARY)

find_path(EDITLINE_INCLUDE_DIR histedit.h
{'fraction_non_alphanumeric': 0.37592277115275413, 'fraction_numerical': 0.014054514480408859, 'mean_word_length': 6.862723214285714, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2199050', 'n_tokens_mistral': 2522, 'n_tokens_neox': 2220, 'n_words': 310}