mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 16:55:15 +03:00
Make simulator sound functional again in OS X (and probably Linux)
The radio/src/simu/CMakeLists.txt was missing the SDL defines/includes required for SDL audio
This commit is contained in:
parent
2e6570e209
commit
a2e5efa6c7
3 changed files with 17 additions and 7 deletions
|
@ -31,6 +31,14 @@ find_package(Qt5LinguistTools)
|
|||
find_package(Qt5PrintSupport)
|
||||
find_package(Qt5Multimedia)
|
||||
|
||||
message(STATUS "Looking for SDL ")
|
||||
find_package(Sdl)
|
||||
if(SDL_FOUND)
|
||||
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
|
||||
else()
|
||||
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
|
||||
endif()
|
||||
|
||||
include(Macros)
|
||||
today(DATE)
|
||||
now(TIME)
|
||||
|
|
|
@ -25,15 +25,10 @@ if(TABLE_LAYOUT)
|
|||
message(STATUS "Using QTableWidget")
|
||||
endif(TABLE_LAYOUT)
|
||||
|
||||
message(STATUS "Looking for SDL ")
|
||||
find_package(Sdl)
|
||||
if(SDL_FOUND)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
|
||||
add_definitions(-DJOYSTICKS)
|
||||
add_definitions(-DSIMU_AUDIO)
|
||||
else()
|
||||
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
|
||||
add_definitions(-DJOYSTICKS)
|
||||
endif()
|
||||
|
||||
message(STATUS "Looking for QT lupdate ")
|
||||
|
|
|
@ -7,6 +7,12 @@ set(SIMU_SRC ${SIMU_SRC} simpgmspace.cpp)
|
|||
add_definitions(-DSIMU)
|
||||
remove_definitions(-DCLI)
|
||||
|
||||
if(SDL_FOUND)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
add_definitions(-DSIMU_AUDIO)
|
||||
add_definitions(-DJOYSTICKS)
|
||||
endif()
|
||||
|
||||
if(Qt5Widgets_FOUND)
|
||||
set(SIMULATOR_FLAVOUR opentx-${FLAVOUR})
|
||||
set(SIMULATOR_TARGET ${SIMULATOR_FLAVOUR}-simulator)
|
||||
|
@ -14,6 +20,7 @@ if(Qt5Widgets_FOUND)
|
|||
include_directories(${COMPANION_SRC_DIRECTORY} ${COMPANION_SRC_DIRECTORY}/simulation)
|
||||
add_library(${SIMULATOR_TARGET} SHARED ${SIMU_SRC} opentxsimulator.cpp)
|
||||
add_dependencies(${SIMULATOR_TARGET} ${FIRMWARE_DEPENDENCIES})
|
||||
target_link_libraries(${SIMULATOR_TARGET} ${SDL_LIBRARY})
|
||||
qt5_use_modules(${SIMULATOR_TARGET} Core)
|
||||
add_custom_target(libsimulator DEPENDS ${SIMULATOR_TARGET})
|
||||
endif()
|
||||
|
@ -30,7 +37,7 @@ if(NOT WIN32)
|
|||
add_executable(simu WIN32 ${SIMU_SRC} ../../simu.cpp)
|
||||
add_dependencies(simu ${FIRMWARE_DEPENDENCIES})
|
||||
target_include_directories(simu PUBLIC /usr/local/include/fox-1.6 PUBLIC /usr/include/fox-1.6 /opt/local/include/fox-1.6)
|
||||
target_link_libraries(simu FOX-1.6 pthread)
|
||||
target_link_libraries(simu FOX-1.6 pthread ${SDL_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue