5 set(VERSION_REVISION "0")
6 set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
7 set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
8 set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
9 message(STATUS "OpenTX ${VERSION}")
11 cmake_minimum_required(VERSION 2.8)
12 cmake_policy(SET CMP0020 NEW)
13 cmake_policy(SET CMP0023 OLD)
15 cmake_policy(SET CMP0043 NEW)
18 set(CMAKE_CXX_STANDARD 11)
20 set(RADIO_DIRECTORY ${PROJECT_SOURCE_DIR}/radio)
21 set(RADIO_SRC_DIRECTORY ${RADIO_DIRECTORY}/src)
22 set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src)
24 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
25 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
26 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
28 find_package(Qt5Widgets)
30 find_package(Qt5LinguistTools)
31 find_package(Qt5PrintSupport)
32 find_package(Qt5Multimedia)
34 message(STATUS "Looking for SDL ")
37 message("SDL Include Path: " ${SDL_INCLUDE_DIR})
39 message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
42 message(STATUS "Looking for FOX ")
44 if ((NOT FOX_FOUND) AND (NOT WIN32))
45 message("Libfox not found, simu target will not be available")
53 add_subdirectory(${RADIO_SRC_DIRECTORY})
56 add_subdirectory(${COMPANION_SRC_DIRECTORY})