summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 201a14e..754c264 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,12 @@
PROJECT( libplist )
+SET( LIBPLIST_VERSION_MAJOR "0" )
+SET( LIBPLIST_VERSION_MINOR "8" )
+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)
@@ -22,19 +29,15 @@ 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" )
-
+# 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")
-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)
+########## PkgConfig ############################
+CONFIGURE_FILE( "libplist.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" )
+########## INSTALL ##############################
+INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" DESTINATION ${LIBDATA_INSTALL_DIR}/pkgconfig/ )
+########## CPack ################################
+INCLUDE( libplistPackaging )
+LIBPLIST_PACKAGE(LIBPLIST_VERSION_MAJOR LIBPLIST_VERSION_MINOR)