VC++ compilation
This commit is contained in:
@@ -130,7 +130,7 @@ Section "OpenTX Companion" SecDummy
|
|||||||
|
|
||||||
CreateDirectory "$INSTDIR\lang"
|
CreateDirectory "$INSTDIR\lang"
|
||||||
SetOutPath "$INSTDIR\lang"
|
SetOutPath "$INSTDIR\lang"
|
||||||
File "*.qm"
|
File "*companion/src/.qm"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
;Store installation folder
|
;Store installation folder
|
||||||
|
|||||||
+12
-15
@@ -16,9 +16,7 @@ option(AUTOSWITCH "Automatic switch detection in menus" ON)
|
|||||||
|
|
||||||
set(OPT s)
|
set(OPT s)
|
||||||
|
|
||||||
if (NOT MSVC)
|
enable_language(ASM)
|
||||||
enable_language(ASM)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(THIRDPARTY_DIR thirdparty)
|
set(THIRDPARTY_DIR thirdparty)
|
||||||
set(LUA_DIR ${THIRDPARTY_DIR}/Lua/src)
|
set(LUA_DIR ${THIRDPARTY_DIR}/Lua/src)
|
||||||
@@ -659,16 +657,15 @@ endif()
|
|||||||
|
|
||||||
set(SRC ${SRC} ${FIRMWARE_SRC})
|
set(SRC ${SRC} ${FIRMWARE_SRC})
|
||||||
|
|
||||||
if(NOT MSVC)
|
include(CMakeForceCompiler)
|
||||||
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
|
||||||
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||||
|
|
||||||
if(ARCH STREQUAL ARM)
|
if(ARCH STREQUAL ARM)
|
||||||
cmake_force_c_compiler(arm-none-eabi-gcc GNU)
|
cmake_force_c_compiler(arm-none-eabi-gcc GNU)
|
||||||
cmake_force_cxx_compiler(arm-none-eabi-gcc GNU)
|
cmake_force_cxx_compiler(arm-none-eabi-gcc GNU)
|
||||||
set(CMAKE_ASM_COMPILER arm-none-eabi-as)
|
set(CMAKE_ASM_COMPILER arm-none-eabi-as)
|
||||||
@@ -701,7 +698,7 @@ if(NOT MSVC)
|
|||||||
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
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
cmake_force_c_compiler(avr-gcc GNU)
|
cmake_force_c_compiler(avr-gcc GNU)
|
||||||
cmake_force_cxx_compiler(avr-gcc GNU)
|
cmake_force_cxx_compiler(avr-gcc GNU)
|
||||||
|
|
||||||
@@ -734,17 +731,17 @@ if(NOT MSVC)
|
|||||||
COMMAND avr-size --mcu=${MCU} --format=avr firmware.elf
|
COMMAND avr-size --mcu=${MCU} --format=avr firmware.elf
|
||||||
DEPENDS firmware.hex
|
DEPENDS firmware.hex
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_target(firmware.lss
|
add_custom_target(firmware.lss
|
||||||
COMMAND avr-objdump -h -S firmware.elf > firmware.lss
|
COMMAND avr-objdump -h -S firmware.elf > firmware.lss
|
||||||
DEPENDS firmware.elf
|
DEPENDS firmware.elf
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CPU_FAMILY STREQUAL STM32)
|
if(CPU_FAMILY STREQUAL STM32)
|
||||||
add_custom_target(flash
|
add_custom_target(flash
|
||||||
COMMAND dfu-util --alt 0 --dfuse-address 0x08000000 -D firmware.bin
|
COMMAND dfu-util --alt 0 --dfuse-address 0x08000000 -D firmware.bin
|
||||||
DEPENDS firmware.bin
|
DEPENDS firmware.bin
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
add_truetype_font_target(horus tinsize "DejaVu Sans" 9)
|
add_truetype_font_target(horus tinsize "DejaVu Sans" 9)
|
||||||
add_truetype_font_target(horus smlsize "DejaVu Sans" 13)
|
add_truetype_font_target(horus smlsize "DejaVu Sans" 13)
|
||||||
add_truetype_font_target(horus stdsize "DejaVu Sans" 16)
|
add_truetype_font_target(horus stdsize "DejaVu Sans" 16)
|
||||||
add_truetype_font_target(horus midsize "DejaVu Sans" 24)
|
add_truetype_font_target(horus midsize "DejaVu Sans" 24)
|
||||||
add_truetype_font_target(horus xxlsize "DejaVu Sans" 48)
|
add_truetype_font_target(horus xxlsize "DejaVu Sans" 48)
|
||||||
add_custom_target(ttf_horus_fonts DEPENDS ttf_horus_tinsize ttf_horus_smlsize ttf_horus_stdsize ttf_horus_midsize ttf_horus_dblsize ttf_horus_xxlsize)
|
add_custom_target(ttf_horus_fonts DEPENDS ttf_horus_tinsize ttf_horus_smlsize ttf_horus_stdsize ttf_horus_midsize ttf_horus_dblsize ttf_horus_xxlsize)
|
||||||
|
|
||||||
add_bitmaps_target(horus_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/????[^_]*.png" 480 5/6/5/8)
|
add_bitmaps_target(horus_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/????[^_]*.png" 480 5/6/5/8)
|
||||||
add_bitmaps_target(horus_masks ${RADIO_SRC_DIRECTORY}/bitmaps/horus/mask_*.png 480 8bits)
|
add_bitmaps_target(horus_masks ${RADIO_SRC_DIRECTORY}/bitmaps/horus/mask_*.png 480 8bits)
|
||||||
add_bitmaps_target(horus_fonts ${RADIO_SRC_DIRECTORY}/fonts/horus/*.png 480 8bits)
|
add_bitmaps_target(horus_fonts ${RADIO_SRC_DIRECTORY}/fonts/horus/*.png 480 8bits)
|
||||||
add_dependencies(horus_bitmaps horus_masks)
|
add_dependencies(horus_bitmaps horus_masks)
|
||||||
|
|||||||
Reference in New Issue
Block a user