reorganize cmake in small scripts with some fix from https://github.com/cnjinhao/nana/pull/278

This commit is contained in:
qPCR4vir
2018-10-02 18:47:04 +02:00
parent b430f82855
commit 2e6a85bf89
10 changed files with 233 additions and 275 deletions

View File

@@ -4,10 +4,10 @@ option(NANA_CMAKE_ENABLE_AUDIO "Enable class audio::play for PCM playback." OFF)
if(NANA_CMAKE_ENABLE_AUDIO)
target_compile_definitions(nana PUBLIC NANA_ENABLE_AUDIO)
if(UNIX)
find_package(ASOUND)
find_package(ASOUND) # ? https://github.com/hintjens/demidi/blob/master/Findasound.cmake
if(ASOUND_FOUND)
target_include_directories(nana PUBLIC ${ASOUND_INCLUDE_DIRS})
target_link_libraries(nana PUBLIC ${ASOUND_LIBRARY})
target_link_libraries(nana PUBLIC ${ASOUND_LIBRARIES})
else()
message(FATAL_ERROR "libasound is not found")
endif()