mirror of https://github.com/axmolengine/axmol.git
Update CMake scripts
This commit is contained in:
parent
e44903c461
commit
77fb065481
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
### Highlight Features:
|
### Highlight Features:
|
||||||
* Refactor AudioEngine, OpenAL for all platforms
|
* Refactor AudioEngine, OpenAL for all platforms
|
||||||
* [openal-soft](https://github.com/kcat/openal-soft), pass -DCC_USE_ALSOFT=ON to cmake to force enable it
|
* [openal-soft](https://github.com/kcat/openal-soft), pass -DBUILD_EXT_ALSOF=ON to cmake to force enable it
|
||||||
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no ```CC_USE_MOJOAL``` and ```CC_USE_ALSOFT``` option specified, cmake script will choose it on osx/ios, even through it was mark as deprecated, but still avaiable.
|
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no ```BUILD_EXT_ALSOF``` option specified, cmake script will choose it on osx/ios, even through it was mark as deprecated, but still avaiable.
|
||||||
* Refactor UserDefault with [mio](https://github.com/mandreyel/mio), very fast
|
* Refactor UserDefault with [mio](https://github.com/mandreyel/mio), very fast
|
||||||
* Modularize all optional extension, all move from engine core to folder extensions
|
* Modularize all optional extension, all move from engine core to folder extensions
|
||||||
* Implement all .wav formats supported by ```openal-soft```, such as MS-ADPCM, ADPCM...
|
* Implement all .wav formats supported by ```openal-soft```, such as MS-ADPCM, ADPCM...
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
### 主要特性:
|
### 主要特性:
|
||||||
* 重构AudioEngine, 全平台OpenAL
|
* 重构AudioEngine, 全平台OpenAL
|
||||||
* [openal-soft](https://github.com/kcat/openal-soft), pass -DCC_USE_ALSOFT=ON to cmake to force enable it
|
* [openal-soft](https://github.com/kcat/openal-soft), pass -DBUILD_EXT_ALSOF=ON to cmake to force enable it
|
||||||
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no ```CC_USE_MOJOAL``` and ```CC_USE_ALSOFT``` option specified, cmake script will choose it on osx/ios, even through it was mark as deprecated, but still avaiable.
|
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no and ```BUILD_EXT_ALSOF``` option specified, cmake script will choose it on osx/ios, even through it was mark as deprecated, but still avaiable.
|
||||||
* 重构UserDefault, 全平台基于内存映射文件 [mio](https://github.com/mandreyel/mio), 性能提升百倍
|
* 重构UserDefault, 全平台基于内存映射文件 [mio](https://github.com/mandreyel/mio), 性能提升百倍
|
||||||
* 模块化所有引擎扩展库, 所有扩展库放到extensions目录下,如cocostudio, spine
|
* 模块化所有引擎扩展库, 所有扩展库放到extensions目录下,如cocostudio, spine
|
||||||
* AudioEngine实现wav所有 ```openal-soft``` 支持的封装格式, 例如MS-ADPCM, ADPCM等
|
* AudioEngine实现wav所有 ```openal-soft``` 支持的封装格式, 例如MS-ADPCM, ADPCM等
|
||||||
|
|
|
@ -2,6 +2,8 @@ macro(cocos2dx_depend)
|
||||||
# confim the libs, prepare to link
|
# confim the libs, prepare to link
|
||||||
set(PLATFORM_SPECIFIC_LIBS)
|
set(PLATFORM_SPECIFIC_LIBS)
|
||||||
|
|
||||||
|
message(STATUS "BUILD_EXT_ALSOFT=${BUILD_EXT_ALSOFT}")
|
||||||
|
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 userenv psapi winmm Version Iphlpapi opengl32)
|
list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 userenv psapi winmm Version Iphlpapi opengl32)
|
||||||
elseif(LINUX)
|
elseif(LINUX)
|
||||||
|
@ -37,21 +39,13 @@ macro(cocos2dx_depend)
|
||||||
${METAL_LIBRARY}
|
${METAL_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT (CC_USE_ALSOFT OR CC_USE_MOJOAL))
|
if(NOT BUILD_EXT_ALSOFT)
|
||||||
find_library(OPENAL_LIBRARY OpenAL)
|
find_library(OPENAL_LIBRARY OpenAL)
|
||||||
set(COCOS_APPLE_LIBS
|
set(COCOS_APPLE_LIBS
|
||||||
${OPENAL_LIBRARY}
|
${OPENAL_LIBRARY}
|
||||||
${COCOS_APPLE_LIBS}
|
${COCOS_APPLE_LIBS}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CC_USE_MOJOAL)
|
|
||||||
find_library(COREBLUETOOTH_LIBRARY CoreBluetooth)
|
|
||||||
set(COCOS_APPLE_LIBS
|
|
||||||
${COREBLUETOOTH_LIBRARY}
|
|
||||||
${COCOS_APPLE_LIBS}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MACOSX)
|
if(MACOSX)
|
||||||
list(APPEND PREBUILT_SPECIFIC_LIBS GLFW3)
|
list(APPEND PREBUILT_SPECIFIC_LIBS GLFW3)
|
||||||
|
|
|
@ -69,7 +69,7 @@ function build_ios_cmake()
|
||||||
cd $COCOS2DX_ROOT
|
cd $COCOS2DX_ROOT
|
||||||
mkdir -p ios_cmake_build
|
mkdir -p ios_cmake_build
|
||||||
cd ios_cmake_build
|
cd ios_cmake_build
|
||||||
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCC_USE_ALSOFT_ON_APPLE=ON
|
cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DBUILD_EXT_ALSOFT=ON
|
||||||
# cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DCMAKE_SYSTEM_NAME=iOS -DPLATFORM=OS -DENABLE_ARC=0 # too much logs on console when "cmake --build ."
|
# cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DCMAKE_SYSTEM_NAME=iOS -DPLATFORM=OS -DENABLE_ARC=0 # too much logs on console when "cmake --build ."
|
||||||
cmake --build . --config Release --target cpp-tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)"
|
cmake --build . --config Release --target cpp-tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue