mirror of https://github.com/axmolengine/axmol.git
cmake:
- fix Audio engine build on Mac - remove duplicated defintions of _EXPORT_DLL_
This commit is contained in:
parent
dba8ef33bd
commit
8910b962a0
|
@ -1,46 +1,51 @@
|
|||
|
||||
if(WINDOWS AND NOT BUILD_STATIC)
|
||||
ADD_DEFINITIONS (-D_EXPORT_DLL_)
|
||||
endif()
|
||||
set(COCOS_AUDIO_SRC
|
||||
audio/AudioEngine.cpp
|
||||
)
|
||||
|
||||
if(WINDOWS)
|
||||
set(COCOS_AUDIO_SRC
|
||||
audio/win32/SimpleAudioEngine.cpp
|
||||
audio/win32/MciPlayer.cpp
|
||||
audio/win32/MciPlayer.h
|
||||
)
|
||||
set(COCOS_AUDIO_PLATFORM_SRC
|
||||
audio/win32/SimpleAudioEngine.cpp
|
||||
audio/win32/MciPlayer.cpp
|
||||
audio/win32/MciPlayer.h
|
||||
)
|
||||
|
||||
elseif(LINUX)
|
||||
set(COCOS_AUDIO_SRC
|
||||
audio/linux/SimpleAudioEngineFMOD.cpp
|
||||
audio/linux/FmodAudioPlayer.cpp
|
||||
audio/linux/FmodAudioPlayer.h
|
||||
audio/linux/AudioPlayer.h
|
||||
)
|
||||
set(COCOS_AUDIO_PLATFORM_SRC
|
||||
audio/linux/SimpleAudioEngineFMOD.cpp
|
||||
audio/linux/FmodAudioPlayer.cpp
|
||||
audio/linux/FmodAudioPlayer.h
|
||||
audio/linux/AudioPlayer.h
|
||||
)
|
||||
|
||||
include_directories( ../external/linux-specific/fmod/include/${ARCH_DIR} )
|
||||
include_directories( ../external/linux-specific/fmod/include/${ARCH_DIR} )
|
||||
|
||||
elseif(MACOSX)
|
||||
# split it in _C and non C
|
||||
# because C files needs to be compiled with C compiler and not C++
|
||||
# compiler
|
||||
set(COCOS_AUDIO_SRC_C
|
||||
set(COCOS_AUDIO_PLATFORM_SRC_C
|
||||
audio/mac/CDAudioManager.m
|
||||
audio/mac/CDOpenALSupport.m
|
||||
audio/mac/CocosDenshion.m
|
||||
audio/mac/SimpleAudioEngine_objc.m
|
||||
)
|
||||
set(COCOS_AUDIO_SRC
|
||||
${COCOS_AUDIO_SRC_C}
|
||||
)
|
||||
set(COCOS_AUDIO_PLATFORM_SRC
|
||||
${COCOS_AUDIO_PLATFORM_SRC_C}
|
||||
audio/apple/AudioCache.mm
|
||||
audio/apple/AudioEngine-inl.mm
|
||||
audio/apple/AudioPlayer.mm
|
||||
audio/mac/SimpleAudioEngine.mm
|
||||
audio/mac/CDXMacOSXSupport.mm
|
||||
)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${COCOS_AUDIO_SRC_C}
|
||||
)
|
||||
set_source_files_properties(
|
||||
${COCOS_AUDIO_PLATFORM_SRC_C}
|
||||
PROPERTIES LANGUAGE C
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND COCOS_AUDIO_SRC ${COCOS_AUDIO_PLATFORM_SRC})
|
||||
|
||||
if(LINUX)
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set(FMOD_LIB "fmodex64")
|
||||
|
|
Loading…
Reference in New Issue