File: CMakeLists.txt

package info (click to toggle)
obexftp 0.24-5
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 680 kB
  • ctags: 620
  • sloc: ansic: 7,132; ruby: 229; sh: 89; perl: 43; makefile: 27; python: 16
file content (90 lines) | stat: -rwxr-xr-x 2,205 bytes parent folder | download | duplicates (2)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

cmake_minimum_required(VERSION 2.8.5)
project ( obexftp C )

#
# The project version
#
set ( VERSION_MAJOR 0 )
set ( VERSION_MINOR 24 )
set ( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}" )

#
# The path for our own CMake modules
#
set ( CMAKE_MODULE_PATH
  ${PROJECT_SOURCE_DIR}/CMakeModules
)

#
# Define the default build type
#
set ( CMAKE_CONFIGURATION_TYPES "Release;Debug"
      CACHE STRING "" FORCE )
if ( NOT CMAKE_BUILD_TYPE )
  set ( CMAKE_BUILD_TYPE Release
        CACHE STRING "Build type" FORCE )
endif ( NOT CMAKE_BUILD_TYPE )

include ( MaintainerMode )
include ( GNUInstallDirs )

#
# define how to build libraries
#
option ( BUILD_SHARED_LIBS "Build shared libraries" ON )


include_directories (
  ${PROJECT_SOURCE_DIR}
  ${PROJECT_SOURCE_DIR}/includes
)

#
# many parts of this project need the OpenObex includes
#
find_package ( OpenObex ${OpenObex_FORCE_VERSION} QUIET NO_MODULE)
if ( NOT OpenObex_FOUND )
  find_package ( OpenObex REQUIRED )
endif ( NOT OpenObex_FOUND )
include_directories ( ${OpenObex_INCLUDE_DIRS} )

#
# some code is only included if bluetooth is available
#
find_package ( Bluetooth )
if ( Bluetooth_FOUND )
  include_directories ( ${Bluetooth_INCLUDE_DIRS} )
  add_definitions ( -DHAVE_BLUETOOTH -DHAVE_SDP )
endif ( Bluetooth_FOUND )

add_subdirectory ( bfb )
add_subdirectory ( multicobex )
add_subdirectory ( obexftp )
add_subdirectory ( apps )
add_subdirectory ( fuse )
add_subdirectory ( swig )
add_subdirectory ( doc )
#examples

set ( prefix      "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
set ( libdir      "\${prefix}/${CMAKE_INSTALL_LIBDIR}" )
set ( includedir  "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}" )
set ( REQUIRES    "bluez openobex" )
configure_file (
  ${CMAKE_CURRENT_SOURCE_DIR}/obexftp.pc.in
  ${CMAKE_CURRENT_BINARY_DIR}/obexftp.pc
  @ONLY
)

if ( NOT CMAKE_INSTALL_PKGCONFIGDIR )
  set ( CMAKE_INSTALL_PKGCONFIGDIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig
        CACHE PATH "Where to install .pc files to" FORCE )
endif ( NOT CMAKE_INSTALL_PKGCONFIGDIR )
mark_as_advanced ( CMAKE_INSTALL_PKGCONFIGDIR )

install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/obexftp.pc
  DESTINATION ${CMAKE_INSTALL_PKGCONFIGDIR}
  COMPONENT devel
)