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:
@@ -31,6 +31,14 @@ find_package(Qt5LinguistTools)
|
|||||||
find_package(Qt5PrintSupport)
|
find_package(Qt5PrintSupport)
|
||||||
find_package(Qt5Multimedia)
|
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)
|
include(Macros)
|
||||||
today(DATE)
|
today(DATE)
|
||||||
now(TIME)
|
now(TIME)
|
||||||
|
|||||||
@@ -25,15 +25,10 @@ if(TABLE_LAYOUT)
|
|||||||
message(STATUS "Using QTableWidget")
|
message(STATUS "Using QTableWidget")
|
||||||
endif(TABLE_LAYOUT)
|
endif(TABLE_LAYOUT)
|
||||||
|
|
||||||
message(STATUS "Looking for SDL ")
|
|
||||||
find_package(Sdl)
|
|
||||||
if(SDL_FOUND)
|
if(SDL_FOUND)
|
||||||
include_directories(${SDL_INCLUDE_DIR})
|
include_directories(${SDL_INCLUDE_DIR})
|
||||||
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
|
|
||||||
add_definitions(-DJOYSTICKS)
|
|
||||||
add_definitions(-DSIMU_AUDIO)
|
add_definitions(-DSIMU_AUDIO)
|
||||||
else()
|
add_definitions(-DJOYSTICKS)
|
||||||
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Looking for QT lupdate ")
|
message(STATUS "Looking for QT lupdate ")
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ set(SIMU_SRC ${SIMU_SRC} simpgmspace.cpp)
|
|||||||
add_definitions(-DSIMU)
|
add_definitions(-DSIMU)
|
||||||
remove_definitions(-DCLI)
|
remove_definitions(-DCLI)
|
||||||
|
|
||||||
|
if(SDL_FOUND)
|
||||||
|
include_directories(${SDL_INCLUDE_DIR})
|
||||||
|
add_definitions(-DSIMU_AUDIO)
|
||||||
|
add_definitions(-DJOYSTICKS)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(Qt5Widgets_FOUND)
|
if(Qt5Widgets_FOUND)
|
||||||
set(SIMULATOR_FLAVOUR opentx-${FLAVOUR})
|
set(SIMULATOR_FLAVOUR opentx-${FLAVOUR})
|
||||||
set(SIMULATOR_TARGET ${SIMULATOR_FLAVOUR}-simulator)
|
set(SIMULATOR_TARGET ${SIMULATOR_FLAVOUR}-simulator)
|
||||||
@@ -14,6 +20,7 @@ if(Qt5Widgets_FOUND)
|
|||||||
include_directories(${COMPANION_SRC_DIRECTORY} ${COMPANION_SRC_DIRECTORY}/simulation)
|
include_directories(${COMPANION_SRC_DIRECTORY} ${COMPANION_SRC_DIRECTORY}/simulation)
|
||||||
add_library(${SIMULATOR_TARGET} SHARED ${SIMU_SRC} opentxsimulator.cpp)
|
add_library(${SIMULATOR_TARGET} SHARED ${SIMU_SRC} opentxsimulator.cpp)
|
||||||
add_dependencies(${SIMULATOR_TARGET} ${FIRMWARE_DEPENDENCIES})
|
add_dependencies(${SIMULATOR_TARGET} ${FIRMWARE_DEPENDENCIES})
|
||||||
|
target_link_libraries(${SIMULATOR_TARGET} ${SDL_LIBRARY})
|
||||||
qt5_use_modules(${SIMULATOR_TARGET} Core)
|
qt5_use_modules(${SIMULATOR_TARGET} Core)
|
||||||
add_custom_target(libsimulator DEPENDS ${SIMULATOR_TARGET})
|
add_custom_target(libsimulator DEPENDS ${SIMULATOR_TARGET})
|
||||||
endif()
|
endif()
|
||||||
@@ -30,7 +37,7 @@ if(NOT WIN32)
|
|||||||
add_executable(simu WIN32 ${SIMU_SRC} ../../simu.cpp)
|
add_executable(simu WIN32 ${SIMU_SRC} ../../simu.cpp)
|
||||||
add_dependencies(simu ${FIRMWARE_DEPENDENCIES})
|
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_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()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user