-
Notifications
You must be signed in to change notification settings - Fork 148
/
CMakeLists.txt
106 lines (89 loc) · 2.78 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
106
cmake_minimum_required(VERSION 2.8.11)
if(POLICY CMP0048) # in CMake >= 3.0.0
cmake_policy(SET CMP0048 OLD) # keep project() from clearing VERSION variables
endif(POLICY CMP0048)
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
set(VER_MAJOR "1")
set(VER_MINOR "0")
set(VER_PATCH "1")
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)
option(o2_WITH_QT5 "Use Qt5" ON)
set(o2_LIB_SUFFIX "" CACHE STRING "Suffix for install 'lib' directory, e.g. 64 for lib64")
option(o2_SHOW_TRACE "Show debugging messages" OFF)
if(NOT o2_SHOW_TRACE)
add_definitions(-DQT_NO_DEBUG_OUTPUT=1)
endif()
option(o2_WITH_TWITTER "Authenticate with Twitter" OFF)
option(o2_WITH_DROPBOX "Authenticate with Dropbox" OFF)
option(o2_WITH_GOOGLE "Authenticate with Google" OFF)
option(o2_WITH_VIMEO "Authenticate with Vimeo" OFF)
option(o2_WITH_FACEBOOK "Authenticate with Facebook" OFF)
option(o2_WITH_UBER "Authenticate with Uber" OFF)
option(o2_WITH_SKYDRIVE "Authenticate with SkyDrive" OFF)
option(o2_WITH_FLICKR "Authenticate with Flickr" OFF)
option(o2_WITH_HUBIC "Authenticate with Hubic" OFF)
option(o2_WITH_SPOTIFY "Authenticate with Spotify" OFF)
option(o2_WITH_SURVEYMONKEY "Authenticate with SurveyMonkey" OFF)
option(o2_WITH_SMUGMUG "Authenticate with SmugMug" OFF)
option(o2_WITH_MSGRAPH "Authenticate with MSGraph" OFF)
option(o2_WITH_KEYCHAIN "keychain store" ON)
option(o2_WITH_OAUTH1 "Include OAuth1 authentication" OFF)
if (o2_WITH_TWITTER)
set(HAVE_TWITTER_SUPPORT 1)
endif()
if (o2_WITH_DROPBOX)
set(HAVE_DROPBOX_SUPPORT 1)
endif()
if (o2_WITH_GOOGLE)
set(HAVE_GOOGLE_SUPPORT 1)
endif()
if (o2_WITH_FACEBOOK)
set(HAVE_FACEBOOK_SUPPORT 1)
endif()
if (o2_WITH_UBER)
set(HAVE_UBER_SUPPORT 1)
endif()
if (o2_WITH_SKYDRIVE)
set(HAVE_SKYDRIVE_SUPPORT 1)
endif()
if (o2_WITH_FLICKR)
set(HAVE_FLICKR_SUPPORT 1)
endif()
if (o2_WITH_HUBIC)
set(HAVE_HUBIC_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_SMUGMUG)
set(HAVE_SMUGMUG_SUPPORT 1)
endif()
if (o2_WITH_MSGRAPH)
set(HAVE_MSGRAPH_SUPPORT 1)
endif()
if (o2_WITH_KEYCHAIN)
set(HAVE_KEYCHAIN_SUPPORT 1)
endif()
if (o2_WITH_OAUTH1)
set(HAVE_OAUTH1_SUPPORT 1)
endif()
if(o2_WITH_TWITTER OR o2_WITH_DROPBOX OR o2_WITH_FLICKR OR o2_WITH_SMUGMUG)
set(o2_WITH_OAUTH1 ON)
endif()
option(o2_BUILD_EXAMPLES "Build examples" OFF)
if(WIN32)
add_definitions(-DO2_DLL_EXPORT)
endif()
add_subdirectory(src)
if(o2_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(o2_BUILD_EXAMPLES)