[Companion] All binaries written at the root of the build directory to simplify things
This commit is contained in:
+2
-1
@@ -14,8 +14,9 @@ set(RADIO_DIRECTORY ${PROJECT_SOURCE_DIR}/radio)
|
|||||||
set(RADIO_SRC_DIRECTORY ${RADIO_DIRECTORY}/src)
|
set(RADIO_SRC_DIRECTORY ${RADIO_DIRECTORY}/src)
|
||||||
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src)
|
set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/companion/src)
|
||||||
|
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
include(Bitmaps)
|
|
||||||
|
|
||||||
add_subdirectory(${RADIO_SRC_DIRECTORY})
|
add_subdirectory(${RADIO_SRC_DIRECTORY})
|
||||||
add_subdirectory(${COMPANION_SRC_DIRECTORY})
|
add_subdirectory(${COMPANION_SRC_DIRECTORY})
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
include(Macros)
|
include(Macros)
|
||||||
|
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/companion)
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/companion)
|
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
|
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
|
||||||
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
|
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
|||||||
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||||
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
|
||||||
|
|
||||||
set(dependencies_9x 9x_bitmaps firmware_translations stamp)
|
set(dependencies_9x 9x_bitmaps firmware_translations)
|
||||||
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
|
||||||
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
|
||||||
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
|
||||||
@@ -77,7 +77,7 @@ add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
|
|||||||
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
|
||||||
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
|
||||||
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
|
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
|
||||||
set(dependencies_taranis taranis_bitmaps firmware_translations stamp)
|
set(dependencies_taranis taranis_bitmaps firmware_translations)
|
||||||
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
|
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
|
||||||
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
|
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
|
||||||
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis_x9e)
|
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis_x9e)
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
include(CMakeForceCompiler)
|
||||||
|
include(Bitmaps)
|
||||||
|
|
||||||
option(PCB "Radio type")
|
option(PCB "Radio type")
|
||||||
option(HELI "Heli menu" ON)
|
option(HELI "Heli menu" ON)
|
||||||
option(FLIGHT_MODES "Flight Modes" ON)
|
option(FLIGHT_MODES "Flight Modes" ON)
|
||||||
@@ -14,9 +17,8 @@ option(FAI "Competition mode (no telemetry)" OFF)
|
|||||||
option(AUTOSOURCE "Automatic source detection in menus" ON)
|
option(AUTOSOURCE "Automatic source detection in menus" ON)
|
||||||
option(AUTOSWITCH "Automatic switch detection in menus" ON)
|
option(AUTOSWITCH "Automatic switch detection in menus" ON)
|
||||||
|
|
||||||
set(OPT s)
|
|
||||||
|
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
|
set(OPT s)
|
||||||
|
|
||||||
set(THIRDPARTY_DIR thirdparty)
|
set(THIRDPARTY_DIR thirdparty)
|
||||||
set(LUA_DIR ${THIRDPARTY_DIR}/Lua/src)
|
set(LUA_DIR ${THIRDPARTY_DIR}/Lua/src)
|
||||||
@@ -657,8 +659,6 @@ endif()
|
|||||||
|
|
||||||
set(SRC ${SRC} ${FIRMWARE_SRC})
|
set(SRC ${SRC} ${FIRMWARE_SRC})
|
||||||
|
|
||||||
include(CMakeForceCompiler)
|
|
||||||
|
|
||||||
set(WARNING_FLAGS "-Wall -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits")
|
set(WARNING_FLAGS "-Wall -Wno-strict-aliasing -Wformat -Wreturn-type -Wunused -Wuninitialized -Wunknown-pragmas -Wno-switch -Wtype-limits")
|
||||||
|
|
||||||
# trick to remove the -rdynamic issue
|
# trick to remove the -rdynamic issue
|
||||||
@@ -697,6 +697,7 @@ if(ARCH STREQUAL ARM)
|
|||||||
add_custom_target(firmware.bin
|
add_custom_target(firmware.bin
|
||||||
COMMAND arm-none-eabi-objcopy -O binary firmware.elf firmware.bin
|
COMMAND arm-none-eabi-objcopy -O binary firmware.elf firmware.bin
|
||||||
DEPENDS firmware.elf
|
DEPENDS firmware.elf
|
||||||
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
cmake_force_c_compiler(avr-gcc GNU)
|
cmake_force_c_compiler(avr-gcc GNU)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# TODO if the files order is different (these 2 SRC sections exchanged), the bootloader hangs for 20s in USB init. Why?
|
# TODO if the files order is different (these 2 SRC sections exchanged), the bootloader hangs for 20s in USB init. Why?
|
||||||
|
|
||||||
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(PCBREV STREQUAL REV9E)
|
if(PCBREV STREQUAL REV9E)
|
||||||
set(BOOTLOADER_SRC
|
set(BOOTLOADER_SRC
|
||||||
${BOOTLOADER_SRC}
|
${BOOTLOADER_SRC}
|
||||||
|
|||||||
Reference in New Issue
Block a user