PROJECT( libplist ) SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/modules ) cmake_minimum_required(VERSION 2.6) FIND_PACKAGE( LibXml2 REQUIRED ) FIND_PACKAGE( GLIB2 REQUIRED ) FIND_PACKAGE( SWIG ) FIND_PACKAGE( PythonLibs ) 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 PYTHON_LIBRARY ) ADD_SUBDIRECTORY( swig ) ENDIF ( SWIG_FOUND AND PYTHON_LIBRARY ) CONFIGURE_FILE( "libplist.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" ) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Library to parse and generate Apple's binary and XML PList format") SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.LESSER") SET(CPACK_PACKAGE_VERSION_MAJOR "0") SET(CPACK_PACKAGE_VERSION_MINOR "1") SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "PList library") SET(CPACK_COMPONENT_DEV_DISPLAY_NAME "PList development files") SET(CPACK_COMPONENT_PLUTIL_DISPLAY_NAME "PList conversion tool") set(CPACK_COMPONENT_DEV_DEPENDS lib) set(CPACK_COMPONENT_PLUTIL_DEPENDS lib) INCLUDE(CPack)