blob: 754c2643d53b761b8567d1d198cc76ebc91670dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
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)
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 )
# 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" )
########## 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)
|