patch-CMakeLists_txt 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. $OpenBSD: patch-CMakeLists_txt,v 1.2 2011/11/09 23:24:56 dcoppa Exp $
  2. --- CMakeLists.txt.orig Thu Sep 2 15:27:37 2010
  3. +++ CMakeLists.txt Sun Oct 24 08:11:32 2010
  4. @@ -32,7 +32,9 @@ OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSP
  5. OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
  6. OPTION(WANT_FFTW3F "Include SpectrumAnalyzer and ZynAddSubFX plugin" ON)
  7. OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
  8. +OPTION(WANT_SNDIO "Include sndio support" ON)
  9. OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
  10. +OPTION(WANT_OSS "Include OSS (Open Sound System) support" ON)
  11. OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
  12. #OPTION(WANT_PORTAUDIO "Include PortAudio support" ON) # TODO: fix PortAudio support
  13. OPTION(WANT_SDL "Include SDL (Simple DirectMedia Layer) support" ON)
  14. @@ -48,12 +50,16 @@ OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
  15. IF(LMMS_BUILD_WIN32)
  16. SET(WANT_ALSA OFF)
  17. SET(WANT_JACK OFF)
  18. + SET(WANT_OSS OFF)
  19. + SET(WANT_SNDIO OFF)
  20. SET(WANT_PULSEAUDIO OFF)
  21. SET(WANT_SYSTEM_SR OFF)
  22. SET(WANT_WINMM ON)
  23. SET(LMMS_HAVE_WINMM TRUE)
  24. SET(STATUS_ALSA "<not supported on this platform>")
  25. SET(STATUS_JACK "<not supported on this platform>")
  26. + SET(STATUS_OSS "<not supported on this platform>")
  27. + SET(STATUS_SNDIO "<not supported on this platform>")
  28. SET(STATUS_PULSEAUDIO "<not supported on this platform>")
  29. SET(STATUS_WINMM "OK")
  30. ELSE(LMMS_BUILD_WIN32)
  31. @@ -68,16 +74,19 @@ CHECK_INCLUDE_FILES(pthread.h LMMS_HAVE_PTHREAD_H)
  32. CHECK_INCLUDE_FILES(semaphore.h LMMS_HAVE_SEMAPHORE_H)
  33. CHECK_INCLUDE_FILES(unistd.h LMMS_HAVE_UNISTD_H)
  34. CHECK_INCLUDE_FILES(sys/types.h LMMS_HAVE_SYS_TYPES_H)
  35. -CHECK_INCLUDE_FILES(sys/ipc.h LMMS_HAVE_SYS_IPC_H)
  36. -CHECK_INCLUDE_FILES(sys/shm.h LMMS_HAVE_SYS_SHM_H)
  37. +IF(LMMS_HAVE_SYS_TYPES_H)
  38. + CHECK_INCLUDE_FILES("sys/types.h;sys/ipc.h" LMMS_HAVE_SYS_IPC_H)
  39. + CHECK_INCLUDE_FILES("sys/types.h;sys/shm.h" LMMS_HAVE_SYS_SHM_H)
  40. +ELSE(LMMS_HAVE_SYS_TYPES_H)
  41. + CHECK_INCLUDE_FILES(sys/ipc.h LMMS_HAVE_SYS_IPC_H)
  42. + CHECK_INCLUDE_FILES(sys/shm.h LMMS_HAVE_SYS_SHM_H)
  43. +ENDIF(LMMS_HAVE_SYS_TYPES_H)
  44. CHECK_INCLUDE_FILES(sys/time.h LMMS_HAVE_SYS_TIME_H)
  45. CHECK_INCLUDE_FILES(sys/wait.h LMMS_HAVE_SYS_WAIT_H)
  46. CHECK_INCLUDE_FILES(sys/select.h LMMS_HAVE_SYS_SELECT_H)
  47. CHECK_INCLUDE_FILES(stdarg.h LMMS_HAVE_STDARG_H)
  48. CHECK_INCLUDE_FILES(signal.h LMMS_HAVE_SIGNAL_H)
  49. CHECK_INCLUDE_FILES(sched.h LMMS_HAVE_SCHED_H)
  50. -CHECK_INCLUDE_FILES(sys/soundcard.h LMMS_HAVE_SYS_SOUNDCARD_H)
  51. -CHECK_INCLUDE_FILES(soundcard.h LMMS_HAVE_SOUNDCARD_H)
  52. CHECK_INCLUDE_FILES(fcntl.h LMMS_HAVE_FCNTL_H)
  53. CHECK_INCLUDE_FILES(sys/ioctl.h LMMS_HAVE_SYS_IOCTL_H)
  54. CHECK_INCLUDE_FILES(ctype.h LMMS_HAVE_CTYPE_H)
  55. @@ -232,12 +241,18 @@ ENDIF(WANT_OGGVORBIS)
  56. # check whether to enable OSS-support
  57. -IF(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  58. - SET(LMMS_HAVE_OSS TRUE)
  59. - SET(STATUS_OSS "OK")
  60. -ELSE(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  61. - SET(STATUS_OSS "<not found or not supported on this platform>")
  62. -ENDIF(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  63. +IF(WANT_OSS)
  64. + CHECK_INCLUDE_FILES(sys/soundcard.h LMMS_HAVE_SYS_SOUNDCARD_H)
  65. + CHECK_INCLUDE_FILES(soundcard.h LMMS_HAVE_SOUNDCARD_H)
  66. + IF(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  67. + SET(LMMS_HAVE_OSS TRUE)
  68. + SET(STATUS_OSS "OK")
  69. + ELSE(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  70. + SET(STATUS_OSS "<not found or not supported on this platform>")
  71. + ENDIF(LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H)
  72. +ELSE(WANT_OSS)
  73. + SET(STATUS_OSS "disabled")
  74. +ENDIF(WANT_OSS)
  75. # check for ALSA
  76. @@ -269,6 +284,18 @@ IF(WANT_JACK)
  77. ENDIF(WANT_JACK)
  78. +# check for SNDIO
  79. +IF(WANT_SNDIO)
  80. + FIND_PACKAGE(Sndio)
  81. + IF(SNDIO_FOUND)
  82. + SET(LMMS_HAVE_SNDIO TRUE)
  83. + SET(STATUS_SNDIO "OK")
  84. + ELSE(SNDIO_FOUND)
  85. + SET(STATUS_SNDIO "not found")
  86. + ENDIF(SNDIO_FOUND)
  87. +ENDIF(WANT_SNDIO)
  88. +
  89. +
  90. # check for FFTW3F-library
  91. IF(WANT_FFTW3F)
  92. PKG_CHECK_MODULES(FFTW3F fftw3f>=3.0.0)
  93. @@ -364,8 +391,8 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx
  94. # set compiler flags
  95. #SET(CMAKE_BUILD_TYPE relwithdebug)
  96. -SET(CMAKE_C_FLAGS "-O2 -g -Wall ${CMAKE_C_FLAGS}")
  97. -SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions -Wall ${CMAKE_CXX_FLAGS}")
  98. +SET(CMAKE_C_FLAGS "-g -Wall ${CMAKE_C_FLAGS}")
  99. +SET(CMAKE_CXX_FLAGS "-g -fno-exceptions -Wall ${CMAKE_CXX_FLAGS}")
  100. #SET(CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_C_FLAGS}")
  101. #SET(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_CXX_FLAGS}")
  102. @@ -381,7 +408,8 @@ SET(lmms_MOC ${lmms_INCLUDES})
  103. SET(lmms_EMBEDDED_RESOURCES ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/COPYING)
  104. -QT4_WRAP_CPP(lmms_MOC_out ${lmms_MOC} OPTIONS -nw)
  105. +#QT4_WRAP_CPP(lmms_MOC_out ${lmms_MOC} OPTIONS -nw)
  106. +QT4_WRAP_CPP(lmms_MOC_out ${lmms_MOC})
  107. QT4_WRAP_UI(lmms_UI_out ${lmms_UI})
  108. @@ -428,9 +456,9 @@ ADD_SUBDIRECTORY(data)
  109. #
  110. ADD_DEFINITIONS(-D'LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/"' -D'PLUGIN_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/lmms/"' ${PULSEAUDIO_DEFINITIONS} ${PORTAUDIO_DEFINITIONS})
  111. -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${SDL_INCLUDE_DIR} ${PORTAUDIO_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR} ${JACK_INCLUDE_DIRS} ${OGGVORBIS_INCLUDE_DIR} ${SAMPLERATE_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIRS})
  112. -LINK_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/lib ${ASOUND_LIBRARY_DIR} ${JACK_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS} ${SNDFILE_LIBRARY_DIRS})
  113. -LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT} ${QT_LIBRARIES} ${ASOUND_LIBRARY} ${SDL_LIBRARY} ${PORTAUDIO_LIBRARIES} ${PULSEAUDIO_LIBRARIES} ${JACK_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${SNDFILE_LIBRARIES})
  114. +INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${SDL_INCLUDE_DIR} ${PORTAUDIO_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR} ${SNDIO_INCLUDE_DIRS} ${JACK_INCLUDE_DIRS} ${OGGVORBIS_INCLUDE_DIR} ${SAMPLERATE_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIRS})
  115. +LINK_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/lib ${ASOUND_LIBRARY_DIR} ${SNDIO_LIBRARY_DIRS} ${JACK_LIBRARY_DIRS} ${SAMPLERATE_LIBRARY_DIRS} ${SNDFILE_LIBRARY_DIRS})
  116. +LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT} ${QT_LIBRARIES} ${ASOUND_LIBRARY} ${SDL_LIBRARY} ${PORTAUDIO_LIBRARIES} ${PULSEAUDIO_LIBRARIES} ${SNDIO_LIBRARY} ${JACK_LIBRARIES} ${OGGVORBIS_LIBRARIES} ${SAMPLERATE_LIBRARIES} ${SNDFILE_LIBRARIES})
  117. ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/lmms.1.gz COMMAND gzip -c ${CMAKE_SOURCE_DIR}/lmms.1 > ${CMAKE_BINARY_DIR}/lmms.1.gz DEPENDS ${CMAKE_SOURCE_DIR}/lmms.1 COMMENT "Generating lmms.1.gz")
  118. @@ -466,7 +494,7 @@ ELSE(LMMS_BUILD_WIN32)
  119. ENDIF(NOT LMMS_BUILD_APPLE)
  120. INSTALL(TARGETS lmms RUNTIME DESTINATION bin)
  121. - INSTALL(FILES ${CMAKE_BINARY_DIR}/lmms.1.gz DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1/ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
  122. + INSTALL(FILES ${CMAKE_SOURCE_DIR}/lmms.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1/ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
  123. ENDIF(LMMS_BUILD_WIN32)
  124. @@ -590,6 +618,7 @@ MESSAGE(
  125. "--------------------------\n"
  126. "* ALSA : ${STATUS_ALSA}\n"
  127. "* JACK : ${STATUS_JACK}\n"
  128. +"* SNDIO : ${STATUS_SNDIO}\n"
  129. "* OSS : ${STATUS_OSS}\n"
  130. #"* PortAudio : ${STATUS_PORTAUDIO}\n"
  131. "* PulseAudio : ${STATUS_PULSEAUDIO}\n"
  132. @@ -601,6 +630,7 @@ MESSAGE(
  133. "-------------------------\n"
  134. "* ALSA : ${STATUS_ALSA}\n"
  135. "* OSS : ${STATUS_OSS}\n"
  136. +"* SNDIO : ${STATUS_SNDIO}\n"
  137. "* WinMM : ${STATUS_WINMM}\n"
  138. )