c9cfd31b29
Removed line 4-6 in CMake/InstallDependencies.cmake so Linux also get the macros. Edited DependenciesSource/.../CMakeLists.txt to add -fPIC compiler option on Linux 64bit. Edited all Examples/.../CMakeLists.txt to rename "Main.cpp" to "main.cpp". Edited cAudio/include/cSTLAllocator.h to make the inclusion of cstddef.h explicit for gcc 2.6+. Despite this you still need to copy Dependencies/include/OpenAL/alc.h to /usr/include/AL/alc.h (for Ubuntu or whatever path that is on your system) for it to compile if you are not running the development build of OpenAL.
55 lines
1.7 KiB
CMake
55 lines
1.7 KiB
CMake
#-------------------------------------------------------------------
|
|
# This file is part of the CMake build system for CAUDIO
|
|
#-------------------------------------------------------------------
|
|
|
|
############################################################
|
|
# Tutorial4_AudioCapture Player
|
|
############################################################
|
|
|
|
PROJECT(Tutorial4_AudioCapture)
|
|
|
|
set (SOURCE_FILES
|
|
src/main.cpp
|
|
)
|
|
|
|
if(CAUDIO_IOS_BUILD)
|
|
# TODO add ios appdelegate
|
|
endif()
|
|
|
|
|
|
include_directories (include ${CAUDIO_INCLUDE_DIR} )
|
|
add_executable(Tutorial4_AudioCapture ${SOURCE_FILES})
|
|
|
|
target_link_libraries(Tutorial4_AudioCapture cAudio)
|
|
add_dependencies(Tutorial4_AudioCapture cAudio)
|
|
|
|
if(CAUDIO_IOS_BUILD)
|
|
set_source_files_properties(src/main.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
|
|
endif()
|
|
|
|
if(${CAUDIO_STATIC})
|
|
ADD_DEFINITIONS(-DCAUDIO_STATIC_LIB=1)
|
|
endif()
|
|
|
|
if (WIN32)
|
|
# append _d for debug builds
|
|
set_property(TARGET Tutorial4_AudioCapture APPEND PROPERTY DEBUG_POSTFIX "_d")
|
|
endif()
|
|
|
|
if (APPLE)
|
|
# On OS X, create .app bundle
|
|
set_property(TARGET Tutorial4_AudioCapture PROPERTY MACOSX_BUNDLE TRUE)
|
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.YOUR_COMPANY.\${PRODUCT_NAME:rfc1034identifier}")
|
|
set_property(TARGET Tutorial4_AudioCapture PROPERTY MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist)
|
|
|
|
if(CAUDIO_IOS_BUILD)
|
|
set_target_properties(Tutorial4_AudioCapture PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO")
|
|
set_target_properties(Tutorial4_AudioCapture PROPERTIES XCODE_ATTRIBUTE_GCC_UNROLL_LOOPS "YES")
|
|
set_target_properties(Tutorial4_AudioCapture PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
|
|
endif()
|
|
|
|
endif ()
|
|
|
|
install_all_targets(Tutorial4_AudioCapture)
|
|
|