<commit_before>PROJECT(libmusicbrainz3)
SET(PROJECT_VERSION 3.0.1)

# 1. If the library source code has changed at all since the last update, then increment revision.
# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
# 3. If any interfaces have been added since the last public release, then increment age.
# 4. If any interfaces have been removed since the last public release, then set age to 0. 
SET(musicbrainz3_SOVERSION_CURRENT  6)
SET(musicbrainz3_SOVERSION_REVISION 1)
SET(musicbrainz3_SOVERSION_AGE      1)

SET(musicbrainz3_VERSION ${musicbrainz3_SOVERSION_CURRENT}.${musicbrainz3_SOVERSION_AGE}.${musicbrainz3_SOVERSION_REVISION})
SET(musicbrainz3_SOVERSION ${musicbrainz3_SOVERSION_CURRENT})

SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
FIND_PACKAGE(Neon REQUIRED)
FIND_PACKAGE(CppUnit)
FIND_PACKAGE(DiscId)

SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
SET(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH  "Installation prefix for object code libraries" FORCE)
SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz3.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz3.pc)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h)

FILE(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/musicbrainz3/*.h)
INSTALL(FILES ${headers} DESTINATION ${INCLUDE_INSTALL_DIR}/musicbrainz3)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz3.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)

ADD_SUBDIRECTORY(src)
IF(CPPUNIT_FOUND)
    ADD_SUBDIRECTORY(test)
ENDIF(CPPUNIT_FOUND)
ADD_SUBDIRECTORY(examples)

ADD_CUSTOM_TARGET(docs<commit_msg>Fix SOVERSION calculating, increment version numbers<commit_after>cmake_minimum_required(VERSION 2.4)

PROJECT(libmusicbrainz3)
SET(PROJECT_VERSION 3.0.2)

# 1. If the library source code has changed at all since the last update, then increment revision.
# 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
# 3. If any interfaces have been added since the last public release, then increment age.
# 4. If any interfaces have been removed since the last public release, then set age to 0. 
SET(musicbrainz3_SOVERSION_CURRENT  8)
SET(musicbrainz3_SOVERSION_REVISION 0)
SET(musicbrainz3_SOVERSION_AGE      2)

MATH(EXPR musicbrainz3_SOVERSION_MAJOR "${musicbrainz3_SOVERSION_CURRENT} - ${musicbrainz3_SOVERSION_AGE}")
MATH(EXPR musicbrainz3_SOVERSION_MINOR "${musicbrainz3_SOVERSION_AGE}")
MATH(EXPR musicbrainz3_SOVERSION_PATCH "${musicbrainz3_SOVERSION_REVISION}")

SET(musicbrainz3_VERSION ${musicbrainz3_SOVERSION_MAJOR}.${musicbrainz3_SOVERSION_MINOR}.${musicbrainz3_SOVERSION_PATCH})
SET(musicbrainz3_SOVERSION ${musicbrainz3_SOVERSION_MAJOR})

SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
FIND_PACKAGE(Neon REQUIRED)
FIND_PACKAGE(CppUnit)
FIND_PACKAGE(DiscId)

SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE)
SET(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE)
SET(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH  "Installation prefix for object code libraries" FORCE)
SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE)

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmusicbrainz3.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz3.pc)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h)

FILE(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/musicbrainz3/*.h)
INSTALL(FILES ${headers} DESTINATION ${INCLUDE_INSTALL_DIR}/musicbrainz3)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmusicbrainz3.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)

ADD_SUBDIRECTORY(src)
IF(CPPUNIT_FOUND)
    ADD_SUBDIRECTORY(test)
ENDIF(CPPUNIT_FOUND)
ADD_SUBDIRECTORY(examples)

ADD_CUSTOM_TARGET(docs
{'fraction_non_alphanumeric': 0.08577540106951871, 'fraction_numerical': 0.015187165775401069, 'mean_word_length': 8.721413721413722, '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': '4574413', 'n_tokens_mistral': 1737, 'n_tokens_neox': 1621, 'n_words': 348}