<commit_before>PROJECT( libplist )

SET( LIBPLIST_VERSION_MAJOR "0" )
SET( LIBPLIST_VERSION_MINOR "16" )
SET( LIBPLIST_SOVERSION "0" )
SET( LIBPLIST_VERSION "${LIBPLIST_VERSION_MAJOR}.${LIBPLIST_VERSION_MINOR}" )
SET( LIBPLIST_LIBVERSION "${LIBPLIST_SOVERSION}.${LIBPLIST_VERSION}" )
SET( PLUTIL_VERSION ${LIBPLIST_VERSION} )

SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/modules )

cmake_minimum_required(VERSION 2.6)

IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
   SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)

FIND_PACKAGE( LibXml2 REQUIRED )
FIND_PACKAGE( GLIB2 REQUIRED )

OPTION(ENABLE_PYTHON "Enable Python bindings (needs Swig)" ON)

IF(ENABLE_PYTHON)
	FIND_PACKAGE( SWIG )
	FIND_PACKAGE( PythonInterp )
	FIND_PACKAGE( PythonLibs )
ENDIF(ENABLE_PYTHON)

INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}/include" )

ENABLE_TESTING()

ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( plutil )
ADD_SUBDIRECTORY( include )
ADD_SUBDIRECTORY( test )

IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
	ADD_SUBDIRECTORY( swig )
ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )

# add uninstall target
CONFIGURE_FILE(	"${CMAKE_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

########## PkgConfig ############################
CONFIGURE_FILE( "libplist.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" )
CONFIGURE_FILE( "libplist++.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist++.pc" )

########## INSTALL ##############################
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ )
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist++.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ )

########## CPack ################################
INCLUDE( libplistPackaging )
LIBPLIST_PACKAGE(LIBPLIST_VERSION_MAJOR LIBPLIST_VERSION_MINOR)
<commit_msg>Raise soversion since we removed a lot of symbols.<commit_after>PROJECT( libplist )

SET( LIBPLIST_VERSION_MAJOR "0" )
SET( LIBPLIST_VERSION_MINOR "16" )
SET( LIBPLIST_SOVERSION "1" )
SET( LIBPLIST_VERSION "${LIBPLIST_VERSION_MAJOR}.${LIBPLIST_VERSION_MINOR}" )
SET( LIBPLIST_LIBVERSION "${LIBPLIST_SOVERSION}.${LIBPLIST_VERSION}" )
SET( PLUTIL_VERSION ${LIBPLIST_VERSION} )

SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/modules )

cmake_minimum_required(VERSION 2.6)

IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
   SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)

FIND_PACKAGE( LibXml2 REQUIRED )
FIND_PACKAGE( GLIB2 REQUIRED )

OPTION(ENABLE_PYTHON "Enable Python bindings (needs Swig)" ON)

IF(ENABLE_PYTHON)
	FIND_PACKAGE( SWIG )
	FIND_PACKAGE( PythonInterp )
	FIND_PACKAGE( PythonLibs )
ENDIF(ENABLE_PYTHON)

INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}/include" )

ENABLE_TESTING()

ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( plutil )
ADD_SUBDIRECTORY( include )
ADD_SUBDIRECTORY( test )

IF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )
	ADD_SUBDIRECTORY( swig )
ENDIF ( SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND )

# add uninstall target
CONFIGURE_FILE(	"${CMAKE_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")

########## PkgConfig ############################
CONFIGURE_FILE( "libplist.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" )
CONFIGURE_FILE( "libplist++.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist++.pc" )

########## INSTALL ##############################
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ )
INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist++.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ )

########## CPack ################################
INCLUDE( libplistPackaging )
LIBPLIST_PACKAGE(LIBPLIST_VERSION_MAJOR LIBPLIST_VERSION_MINOR)

{'fraction_non_alphanumeric': 0.15637568015140763, 'fraction_numerical': 0.003785190442394133, 'mean_word_length': 8.787037037037036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2678425', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1608, 'n_words': 250}