-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
105 lines (90 loc) · 2.96 KB
/
CMakeLists.txt
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
cmake_minimum_required(VERSION 3.16)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(VER_MAJOR "1")
set(VER_MINOR "0")
set(VER_PATCH "2")
set(API_VER_PATCH "0")
set(CPACK_PACKAGE_VERSION_MAJOR ${VER_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VER_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VER_PATCH})
set(PROJECT_VERSION ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH})
set(API_VERSION ${VER_MAJOR}.${VER_MINOR}.${API_VER_PATCH})
project(o2
LANGUAGES CXX
VERSION ${PROJECT_VERSION}
)
option(BUILD_SHARED_LIBS "Build shared library" OFF)
set(o2_LIB_SUFFIX "" CACHE STRING "Suffix for install 'lib' directory, e.g. 64 for lib64")
option(o2_BUILD_EXAMPLES "Build examples" OFF)
option(o2_SHOW_TRACE "Show debugging messages" ON)
option(o2_WITH_DROPBOX "Authenticate with Dropbox" OFF)
option(o2_WITH_FACEBOOK "Authenticate with Facebook" OFF)
option(o2_WITH_FLICKR "Authenticate with Flickr" OFF)
option(o2_WITH_GOOGLE "Authenticate with Google" OFF)
option(o2_WITH_HUBIC "Authenticate with Hubic" OFF)
option(o2_WITH_MSGRAPH "Authenticate with MSGraph" OFF)
option(o2_WITH_SKYDRIVE "Authenticate with SkyDrive" OFF)
option(o2_WITH_SMUGMUG "Authenticate with SmugMug" OFF)
option(o2_WITH_SPOTIFY "Authenticate with Spotify" OFF)
option(o2_WITH_SURVEYMONKEY "Authenticate with SurveyMonkey" OFF)
option(o2_WITH_TWITTER "Authenticate with Twitter" OFF)
option(o2_WITH_UBER "Authenticate with Uber" OFF)
option(o2_WITH_VIMEO "Authenticate with Vimeo" OFF)
option(o2_WITH_KEYCHAIN "keychain store" OFF)
option(o2_WITH_OAUTH1 "Include OAuth1 authentication" OFF)
if(o2_WITH_TWITTER OR o2_WITH_DROPBOX OR o2_WITH_FLICKR OR o2_WITH_SMUGMUG)
set(o2_WITH_OAUTH1 ON)
endif()
if(NOT o2_SHOW_TRACE)
add_compile_definitions(QT_NO_DEBUG_OUTPUT=1)
endif()
add_subdirectory(src)
if(o2_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
# prepare variables for config header
if (o2_WITH_DROPBOX)
set(HAVE_DROPBOX_SUPPORT 1)
endif()
if (o2_WITH_FACEBOOK)
set(HAVE_FACEBOOK_SUPPORT 1)
endif()
if (o2_WITH_FLICKR)
set(HAVE_FLICKR_SUPPORT 1)
endif()
if (o2_WITH_GOOGLE)
set(HAVE_GOOGLE_SUPPORT 1)
endif()
if (o2_WITH_HUBIC)
set(HAVE_HUBIC_SUPPORT 1)
endif()
if (o2_WITH_MSGRAPH)
set(HAVE_MSGRAPH_SUPPORT 1)
endif()
if (o2_WITH_SKYDRIVE)
set(HAVE_SKYDRIVE_SUPPORT 1)
endif()
if (o2_WITH_SMUGMUG)
set(HAVE_SMUGMUG_SUPPORT 1)
endif()
if (o2_WITH_SPOTIFY)
set(HAVE_SPOTIFY_SUPPORT 1)
endif()
if (o2_WITH_SURVEYMONKEY)
set(HAVE_SURVEYMONKEY_SUPPORT 1)
endif()
if (o2_WITH_TWITTER)
set(HAVE_TWITTER_SUPPORT 1)
endif()
if (o2_WITH_UBER)
set(HAVE_UBER_SUPPORT 1)
endif()
if (o2_WITH_VIMEO)
set(HAVE_VIMEO_SUPPORT 1)
endif()
if (o2_WITH_KEYCHAIN)
set(HAVE_KEYCHAIN_SUPPORT 1)
endif()
if (o2_WITH_OAUTH1)
set(HAVE_OAUTH1_SUPPORT 1)
endif()