QGIS/external/o2/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

119 lines
3.1 KiB
CMake
Raw Normal View History

2024-12-10 11:37:45 +01:00
cmake_minimum_required(VERSION 3.10.0)
2018-06-25 11:39:52 +02:00
if(POLICY CMP0048) # in CMake >= 3.0.0
2024-12-10 11:37:45 +01:00
cmake_policy(SET CMP0048 NEW)
2018-06-25 11:39:52 +02:00
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})
2024-12-10 11:37:45 +01:00
project(o2 VERSION ${PROJECT_VERSION})
2018-06-25 11:39:52 +02:00
2024-12-10 11:37:45 +01:00
option(o2_WITH_QT6 "Use Qt6" ON)
2018-06-25 11:39:52 +02:00
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()
2024-12-10 11:37:45 +01:00
option(o2_WITH_TESTS "Enable tests" OFF)
2018-06-25 11:39:52 +02:00
option(o2_WITH_TWITTER "Authenticate with Twitter" OFF)
option(o2_WITH_DROPBOX "Authenticate with Dropbox" OFF)
option(o2_WITH_GOOGLE "Authenticate with Google" OFF)
2024-12-10 11:37:45 +01:00
option(o2_WITH_VIMEO "Authenticate with Vimeo" OFF)
2018-06-25 11:39:52 +02:00
option(o2_WITH_FACEBOOK "Authenticate with Facebook" OFF)
2024-12-10 11:37:45 +01:00
option(o2_WITH_UBER "Authenticate with Uber" OFF)
2018-06-25 11:39:52 +02:00
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)
2024-12-10 11:37:45 +01:00
option(o2_WITH_SMUGMUG "Authenticate with SmugMug" OFF)
option(o2_WITH_MSGRAPH "Authenticate with MSGraph" OFF)
2018-06-25 11:39:52 +02:00
option(o2_WITH_KEYCHAIN "keychain store" ON)
option(o2_WITH_OAUTH1 "Include OAuth1 authentication" OFF)
2024-12-10 11:37:45 +01:00
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_KEYCHAIN)
if(o2_WITH_QT6)
find_package(Qt6Keychain CONFIG REQUIRED)
else()
find_package(Qt5Keychain CONFIG REQUIRED)
endif()
endif(o2_WITH_KEYCHAIN)
if(o2_WITH_TWITTER OR o2_WITH_DROPBOX OR o2_WITH_FLICKR OR o2_WITH_SMUGMUG)
2018-06-25 11:39:52 +02:00
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)
2024-12-10 11:37:45 +01:00
if(o2_WITH_TESTS)
enable_testing()
add_subdirectory(tests)
endif()