2024-09-17 19:00:25 +00:00
|
|
|
# Deskflow -- mouse and keyboard sharing utility
|
2024-07-02 10:23:56 +00:00
|
|
|
# Copyright (C) 2012-2024 Symless Ltd.
|
|
|
|
|
# Copyright (C) 2009-2012 Nick Bolton
|
|
|
|
|
#
|
|
|
|
|
# This package is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# found in the file LICENSE that should have accompanied this file.
|
|
|
|
|
#
|
|
|
|
|
# This package is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
macro(configure_definitions)
|
|
|
|
|
|
|
|
|
|
configure_options()
|
|
|
|
|
|
2024-07-18 16:51:06 +00:00
|
|
|
set(INTEG_TESTS_BIN integtests)
|
|
|
|
|
set(UNIT_TESTS_BIN unittests)
|
|
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
2024-07-04 09:14:54 +00:00
|
|
|
message(STATUS "Disabling debug build")
|
2024-07-02 10:23:56 +00:00
|
|
|
add_definitions(-DNDEBUG)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
|
|
macro(configure_options)
|
2024-07-04 09:14:54 +00:00
|
|
|
|
|
|
|
|
set(DEFAULT_BUILD_GUI ON)
|
|
|
|
|
set(DEFAULT_BUILD_TESTS ON)
|
|
|
|
|
|
|
|
|
|
# unified binary is off by default for now, for backwards compatibility.
|
|
|
|
|
set(DEFAULT_BUILD_UNIFIED OFF)
|
|
|
|
|
|
|
|
|
|
# coverage is off by default because it's GCC only and a developer preference.
|
|
|
|
|
set(DEFAULT_ENABLE_COVERAGE OFF)
|
|
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
if("$ENV{DESKFLOW_BUILD_MINIMAL}" STREQUAL "true")
|
2024-07-04 09:14:54 +00:00
|
|
|
set(DEFAULT_BUILD_GUI OFF)
|
|
|
|
|
set(DEFAULT_BUILD_INSTALLER OFF)
|
2024-07-02 10:23:56 +00:00
|
|
|
endif()
|
|
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
if("$ENV{DESKFLOW_BUILD_TESTS}" STREQUAL "false")
|
2024-07-04 09:14:54 +00:00
|
|
|
set(DEFAULT_BUILD_TESTS OFF)
|
2024-07-02 10:23:56 +00:00
|
|
|
endif()
|
|
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
if("$ENV{DESKFLOW_BUILD_UNIFIED}" STREQUAL "true")
|
2024-07-04 09:14:54 +00:00
|
|
|
set(DEFAULT_BUILD_UNIFIED ON)
|
2024-07-02 10:23:56 +00:00
|
|
|
endif()
|
|
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
if("$ENV{DESKFLOW_ENABLE_COVERAGE}" STREQUAL "true")
|
2024-07-04 09:14:54 +00:00
|
|
|
set(DEFAULT_ENABLE_COVERAGE ON)
|
2024-07-02 10:23:56 +00:00
|
|
|
endif()
|
2024-07-04 09:14:54 +00:00
|
|
|
|
|
|
|
|
option(BUILD_GUI "Build GUI" ${DEFAULT_BUILD_GUI})
|
|
|
|
|
option(BUILD_TESTS "Build tests" ${DEFAULT_BUILD_TESTS})
|
|
|
|
|
option(BUILD_UNIFIED "Build unified binary" ${DEFAULT_BUILD_UNIFIED})
|
|
|
|
|
option(ENABLE_COVERAGE "Enable test coverage" ${DEFAULT_ENABLE_COVERAGE})
|
|
|
|
|
|
2024-07-02 10:23:56 +00:00
|
|
|
endmacro()
|