Skip to content

Commit

Permalink
Fix a couple of problems when using cmake to build on macOS.
Browse files Browse the repository at this point in the history
1. Since both UNIX and APPLE are defined, the ALSA option needs further disambiguation.
2. Fix a bad path when using rtmid as a subproject.
  • Loading branch information
tgoulart committed Aug 7, 2018
1 parent 806dbbb commit 578f740
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Expand Up @@ -29,7 +29,9 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (Release,Debug)")

# API Options
option(RTMIDI_API_JACK "Compile with JACK support." ${HAVE_JACK})
option(RTMIDI_API_ALSA "Compile with ALSA support." ${UNIX})
if(UNIX AND NOT APPLE)
option(RTMIDI_API_ALSA "Compile with ALSA support." ON)
endif()
option(RTMIDI_API_WINMM "Compile with WINMM support." ${WIN32})
option(RTMIDI_API_CORE "Compile with CoreMIDI support." ${APPLE})

Expand Down Expand Up @@ -242,7 +244,7 @@ install(EXPORT RtMidiTargets

# Configure uninstall target.
configure_file(
"${CMAKE_SOURCE_DIR}/cmake/RtMidiConfigUninstall.cmake.in"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/RtMidiConfigUninstall.cmake.in"
"${CMAKE_BINARY_DIR}/RtMidiConfigUninstall.cmake" @ONLY)

# Create uninstall target.
Expand Down

0 comments on commit 578f740

Please sign in to comment.