2020-10-25 18:58:02 +00:00
cmake_minimum_required ( VERSION 3.11 )
project ( harbour-sailfin )
set ( CMAKE_CXX_STANDARD 17 )
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } "${CMAKE_SOURCE_DIR}/cmake/" )
set ( CMAKE_AUTOMOC ON )
2020-10-25 23:14:46 +00:00
cmake_policy ( SET CMP0048 NEW )
2020-10-25 18:58:02 +00:00
# Options
2021-02-17 18:42:10 +00:00
option ( PLATFORM_SAILFISHOS "Build SailfishOS version of application" OFF )
option ( PLATFORM_QTQUICK "Build QtQuick version of application" ON )
2021-08-30 23:29:51 +00:00
option ( FREEDESKTOP_INTEGRATION "Integration with various FreeDesktop.org standards, such as MPRIS" ON )
2021-03-29 15:10:25 +00:00
option ( BUILD_PRECOMPILED_HEADERS "Build with precompiled headers for faster compile times when doing a full rebuild, at the cost of slower incremental builds whenever a header file is changed" OFF )
2021-09-02 13:34:32 +00:00
option ( USE_MLITE "Build with mlite (MeeGo lite library), only available on Linux-based platforms. Used to store settings using DConf." OFF )
2020-10-25 18:58:02 +00:00
2021-03-19 19:57:04 +00:00
if ( NOT SAILFIN_VERSION )
2021-09-04 20:23:54 +00:00
set ( SAILFIN_VERSION "1.0.0" )
2021-03-19 19:57:04 +00:00
endif ( )
2021-02-17 01:28:37 +00:00
if ( PLATFORM_SAILFISHOS )
2020-10-25 18:58:02 +00:00
# Hardcode this less?
2021-09-04 20:23:54 +00:00
set ( CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/share/harbour-sailfin/nl/netsoj/chris/Jellyfin" )
set ( USE_MLITE ON )
2020-10-25 18:58:02 +00:00
endif ( )
2021-09-04 20:23:54 +00:00
if ( PLATFORM_SAILFISHOS )
set ( CMAKE_BUILD_SHARED_LIBS NO )
endif ( )
2020-10-25 18:58:02 +00:00
add_subdirectory ( core )
2021-09-04 20:23:54 +00:00
2021-02-17 01:28:37 +00:00
if ( PLATFORM_SAILFISHOS )
2020-10-25 18:58:02 +00:00
add_subdirectory ( sailfish )
2021-02-17 01:28:37 +00:00
elseif ( PLATFORM_QTQUICK )
2020-10-25 18:58:02 +00:00
add_subdirectory ( qtquick )
endif ( )
2021-03-20 15:29:31 +00:00
include ( FeatureSummary )
feature_summary ( WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES )