CMakeLists.txt
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:2k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. project(llaudio)
  3. include(00-Common)
  4. include(Audio)
  5. include(LLAudio)
  6. include(FMOD)
  7. include(OPENAL)
  8. include(LLCommon)
  9. include(LLMath)
  10. include(LLMessage)
  11. include(LLVFS)
  12. include_directories(
  13.     ${LLAUDIO_INCLUDE_DIRS}
  14.     ${FMOD_INCLUDE_DIR}
  15.     ${LLCOMMON_INCLUDE_DIRS}
  16.     ${LLMATH_INCLUDE_DIRS}
  17.     ${LLMESSAGE_INCLUDE_DIRS}
  18.     ${LLVFS_INCLUDE_DIRS}
  19.     ${OGG_INCLUDE_DIRS}
  20.     ${VORBISENC_INCLUDE_DIRS}
  21.     ${VORBISFILE_INCLUDE_DIRS}
  22.     ${VORBIS_INCLUDE_DIRS}
  23.     ${OPENAL_LIB_INCLUDE_DIRS}
  24.     ${FREEAULT_LIB_INCLUDE_DIRS}
  25.     )
  26. set(llaudio_SOURCE_FILES
  27.     llaudioengine.cpp
  28.     lllistener.cpp
  29.     llaudiodecodemgr.cpp
  30.     llvorbisencode.cpp
  31.     )
  32. set(llaudio_HEADER_FILES
  33.     CMakeLists.txt
  34.     llaudioengine.h
  35.     lllistener.h
  36.     llaudiodecodemgr.h
  37.     llvorbisencode.h
  38.     llwindgen.h
  39.     )
  40. if (FMOD)
  41.     list(APPEND llaudio_SOURCE_FILES
  42.          llaudioengine_fmod.cpp
  43.          lllistener_fmod.cpp
  44.          llstreamingaudio_fmod.cpp
  45.          )
  46.     list(APPEND llaudio_HEADER_FILES
  47.          llaudioengine_fmod.h
  48.          lllistener_fmod.h
  49.          llstreamingaudio_fmod.h
  50.          )
  51.     if (LINUX)
  52.       if (${CXX_VERSION_NUMBER} GREATER 419)
  53.         set_source_files_properties(llaudioengine_fmod.cpp
  54.                                     llstreamingaudio_fmod.cpp
  55.                                     COMPILE_FLAGS -Wno-write-strings)
  56.       endif (${CXX_VERSION_NUMBER} GREATER 419)
  57.     endif (LINUX)
  58. endif (FMOD)
  59. if (OPENAL)
  60.   list(APPEND llaudio_SOURCE_FILES
  61.     llaudioengine_openal.cpp
  62.     lllistener_openal.cpp
  63.     )
  64.   
  65.   list(APPEND llaudio_HEADER_FILES
  66.     llaudioengine_openal.h
  67.     lllistener_openal.h
  68.     )
  69. endif (OPENAL)
  70. set_source_files_properties(${llaudio_HEADER_FILES}
  71.                             PROPERTIES HEADER_FILE_ONLY TRUE)
  72. list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
  73. add_library (llaudio ${llaudio_SOURCE_FILES})
  74. target_link_libraries(
  75.     llaudio
  76.     ${VORBISENC_LIBRARIES}
  77.     ${VORBISFILE_LIBRARIES}
  78.     ${VORBIS_LIBRARIES}
  79.     ${OGG_LIBRARIES}
  80.     )