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.
57 lines
1.8 KiB
CMake
57 lines
1.8 KiB
CMake
#-------------------------------------------------------------------
|
|
# This file is part of the CMake build system for CAUDIO
|
|
#-------------------------------------------------------------------
|
|
|
|
############################################################
|
|
# Tutorial7_CustomLogReceiver Player
|
|
############################################################
|
|
|
|
PROJECT(Tutorial7_CustomLogReceiver)
|
|
|
|
set (SOURCE_FILES
|
|
include/cTestLogReceiver.h
|
|
src/cTestLogReceiver.cpp
|
|
src/main.cpp
|
|
)
|
|
|
|
if(CAUDIO_IOS_BUILD)
|
|
# TODO add ios appdelegate
|
|
endif()
|
|
|
|
|
|
include_directories (include ${CAUDIO_INCLUDE_DIR} )
|
|
add_executable(Tutorial7_CustomLogReceiver ${SOURCE_FILES})
|
|
|
|
target_link_libraries(Tutorial7_CustomLogReceiver cAudio)
|
|
add_dependencies(Tutorial7_CustomLogReceiver 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 Tutorial7_CustomLogReceiver APPEND PROPERTY DEBUG_POSTFIX "_d")
|
|
endif()
|
|
|
|
if (APPLE)
|
|
# On OS X, create .app bundle
|
|
set_property(TARGET Tutorial7_CustomLogReceiver PROPERTY MACOSX_BUNDLE TRUE)
|
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.YOUR_COMPANY.\${PRODUCT_NAME:rfc1034identifier}")
|
|
set_property(TARGET Tutorial7_CustomLogReceiver PROPERTY MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../Info.plist)
|
|
|
|
if(CAUDIO_IOS_BUILD)
|
|
set_target_properties(Tutorial7_CustomLogReceiver PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO")
|
|
set_target_properties(Tutorial7_CustomLogReceiver PROPERTIES XCODE_ATTRIBUTE_GCC_UNROLL_LOOPS "YES")
|
|
set_target_properties(Tutorial7_CustomLogReceiver PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
|
|
endif()
|
|
|
|
endif ()
|
|
|
|
install_all_targets(Tutorial7_CustomLogReceiver)
|
|
|