mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
08dc59c885
* Fix macOS build * Update minimum cmake version * Correct compile errorswith Qt6.7 * Update minimum cmake version (2) * Use C++17 * Correct compile errors with Qt6.7 * Replace unsupported Lambda UniqueConnection * Support UTF-8 Output on console * Fix #1630
36 lines
1.8 KiB
CMake
36 lines
1.8 KiB
CMake
# Define the current source locations
|
|
SET( CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber )
|
|
SET( CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/audio )
|
|
|
|
if (WIN32)
|
|
add_definitions(-DUNICODE -D_UNICODE)
|
|
FILE ( GLOB AUDIO_GRABBER_SOURCES "${CURRENT_HEADER_DIR}/Audio*Windows.h" "${CURRENT_HEADER_DIR}/AudioGrabber.h" "${CURRENT_HEADER_DIR}/AudioWrapper.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*Windows.cpp" "${CURRENT_SOURCE_DIR}/AudioGrabber.cpp" "${CURRENT_SOURCE_DIR}/AudioWrapper.cpp")
|
|
elseif(${CMAKE_SYSTEM} MATCHES "Linux")
|
|
FILE ( GLOB AUDIO_GRABBER_SOURCES "${CURRENT_HEADER_DIR}/Audio*Linux.h" "${CURRENT_HEADER_DIR}/AudioGrabber.h" "${CURRENT_HEADER_DIR}/AudioWrapper.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*Linux.cpp" "${CURRENT_SOURCE_DIR}/AudioGrabber.cpp" "${CURRENT_SOURCE_DIR}/AudioWrapper.cpp")
|
|
elseif (APPLE)
|
|
#TODO
|
|
#FILE ( GLOB AUDIO_GRABBER_SOURCES "${CURRENT_HEADER_DIR}/Audio*Apple.h" "${CURRENT_HEADER_DIR}/AudioGrabber.h" "${CURRENT_HEADER_DIR}/AudioWrapper.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*Apple.cpp" "${CURRENT_SOURCE_DIR}/AudioGrabber.cpp" "${CURRENT_SOURCE_DIR}/AudioWrapper.cpp")
|
|
endif()
|
|
|
|
add_library( audio-grabber ${AUDIO_GRABBER_SOURCES} )
|
|
|
|
set(AUDIO_LIBS hyperion)
|
|
|
|
|
|
if (WIN32)
|
|
set(AUDIO_LIBS ${AUDIO_LIBS} DSound)
|
|
elseif(${CMAKE_SYSTEM} MATCHES "Linux")
|
|
find_package(ALSA REQUIRED)
|
|
if (ALSA_FOUND)
|
|
include_directories(${ALSA_INCLUDE_DIRS})
|
|
set(AUDIO_LIBS ${AUDIO_LIBS} ${ALSA_LIBRARIES})
|
|
endif(ALSA_FOUND)
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
find_package(Threads REQUIRED)
|
|
set(AUDIO_LIBS ${AUDIO_LIBS} Threads::Threads) # PRIVATE
|
|
endif()
|
|
|
|
|
|
target_link_libraries(audio-grabber ${AUDIO_LIBS} ${QT_LIBRARIES})
|