fix option order

This commit is contained in:
halx99 2020-07-31 11:22:42 +08:00
parent 77f9757d4d
commit 14e090f9bf
3 changed files with 14 additions and 15 deletions

View File

@ -37,7 +37,6 @@ macro(cocos2dx_depend)
${METAL_LIBRARY}
)
message(STATUS "[AudioBackend] CC_USE_ALSOFT_ON_APPLE=${CC_USE_ALSOFT_ON_APPLE}")
if(NOT CC_USE_ALSOFT_ON_APPLE)
find_library(OPENAL_LIBRARY OpenAL)
set(COCOS_APPLE_LIBS

View File

@ -34,6 +34,18 @@ set(COCOS2D_X_VERSION 4.0)
set(COCOS_CORE_LIB cocos2d)
project(cocos2d_libs)
# default value for cocos2dx extensions modules build
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EXTENSIONS "Build extension library" ON)
option(CC_USE_ALSOFT_ON_APPLE "Use openal-soft on apple platform" OFF)
set(CC_USE_ALSOFT_ON_APPLE ${CC_USE_ALSOFT_ON_APPLE} CACHE BOOL "Use openal-soft on apple platform" FORCE)
if(CC_USE_ALSOFT_ON_APPLE)
add_definitions(-DCC_USE_ALSOFT_ON_APPLE=1)
endif()
include(2d/CMakeLists.txt)
include(3d/CMakeLists.txt)
include(platform/CMakeLists.txt)
@ -47,18 +59,6 @@ include(ui/CMakeLists.txt)
include(network/CMakeLists.txt)
include(audio/CMakeLists.txt)
# default value for cocos2dx extensions modules build
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
option(BUILD_EXTENSIONS "Build extension library" ON)
option(CC_USE_ALSOFT_ON_APPLE "Use openal-soft on apple platform" OFF)
set(CC_USE_ALSOFT_ON_APPLE ${CC_USE_ALSOFT_ON_APPLE} CACHE BOOL "Use openal-soft on apple platform" FORCE)
if(CC_USE_ALSOFT_ON_APPLE)
add_definitions(-DCC_USE_ALSOFT_ON_APPLE=1)
endif()
if(BUILD_EDITOR_COCOSTUDIO)
include(editor-support/cocostudio/CMakeLists.txt)
set(COCOS_EDITOR_SUPPORT_SRC ${COCOS_EDITOR_SUPPORT_SRC} ${COCOS_CS_SRC} ${COCOS_CS_HEADER})

View File

@ -2,6 +2,8 @@
set(COCOS_AUDIO_SRC
audio/AudioEngine.cpp
)
message(STATUS "[AudioEngine] CC_USE_ALSOFT_ON_APPLE=${CC_USE_ALSOFT_ON_APPLE}")
if(WINDOWS)
@ -76,8 +78,6 @@ elseif(LINUX)
elseif(APPLE)
# common
message(STATUS "[AudioEngine] CC_USE_ALSOFT_ON_APPLE=${CC_USE_ALSOFT_ON_APPLE}")
set(COCOS_AUDIO_PLATFORM_HEADER
audio/include/AudioDecoderManager.h
audio/include/AudioDecoder.h