|
|
|
################################################################################
|
|
|
|
# XDG Desktop Portal implementation for TDE #
|
|
|
|
# Copyright (C) 2024 Mavridis Philippe <mavridisf@gmail.com> #
|
|
|
|
# #
|
|
|
|
# Improvements and feedback are welcome! #
|
|
|
|
# This software is licensed under the terms of the GNU GPL v3 license. #
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
##### set project version ########################
|
|
|
|
|
|
|
|
include( TDEVersion )
|
|
|
|
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
|
|
|
|
tde_set_project_version( )
|
|
|
|
|
|
|
|
##### set project name ###########################
|
|
|
|
project( xdg-desktop-portal-tde )
|
|
|
|
|
|
|
|
### Required modules ###########################################################
|
|
|
|
include( FindPkgConfig )
|
|
|
|
include( CheckFunctionExists )
|
|
|
|
include( CheckSymbolExists )
|
|
|
|
include( CheckIncludeFile )
|
|
|
|
include( CheckLibraryExists )
|
|
|
|
include( CheckCSourceCompiles )
|
|
|
|
include( CheckCXXSourceCompiles )
|
|
|
|
|
|
|
|
### TDE macros #################################################################
|
|
|
|
include( TDEMacros )
|
|
|
|
include( TDESetupPaths )
|
|
|
|
|
|
|
|
### Basic project setup ########################################################
|
|
|
|
tde_setup_paths( )
|
|
|
|
|
|
|
|
### Optional support ###########################################################
|
|
|
|
# option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
|
|
|
|
|
|
|
### Modules to build ###########################################################
|
|
|
|
option( BUILD_ALL "Build all" ON )
|
|
|
|
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
|
|
|
# option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
|
|
|
|
|
|
|
|
### Other options ##############################################################
|
|
|
|
set(XDG_PREFIX "/usr")
|
|
|
|
|
|
|
|
### Configure checks ###########################################################
|
|
|
|
include( ConfigureChecks.cmake )
|
|
|
|
|
|
|
|
### Compiler settings ##########################################################
|
|
|
|
add_definitions( -DHAVE_CONFIG_H )
|
|
|
|
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
|
|
|
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
|
|
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
|
|
|
|
|
|
|
### Add subdirectories #########################################################
|
|
|
|
add_subdirectory( src )
|
|
|
|
add_subdirectory( interfaces )
|
|
|
|
tde_conditional_add_project_docs( BUILD_DOC )
|
|
|
|
# tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
|
|
|
|
|
|
|
|
### Write configuration ########################################################
|
|
|
|
configure_file( config.h.cmake config.h @ONLY )
|