towards win buildability

This commit is contained in:
ottona 2022-08-18 15:35:37 +02:00
parent ce5d03905a
commit a5db74568f
28 changed files with 16 additions and 6 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
*.lib filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text

View File

@ -29,3 +29,8 @@ MACRO_DISPLAY_FEATURE_LOG()
include_directories(
${OPENAL_INCLUDE_DIR}
)
if(WIN32)
include_directories(
"${OPENAL_INCLUDE_DIR}/../"
)
endif()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,6 +15,9 @@ set(CAUDIO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/i
include(cAudio_src_files.cmake)
add_library(cAudio ${CAUDIO_LIB_TYPE} ${file_root})
set(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIRS}/..) #dats gross but it helps finding the headers ;)
message(STATUS "openal include dirs:" ${OPENAL_INCLUDE_DIRS})
if(CAUDIO_ENABLE_OGG)
include_directories (include Headers ${CMAKE_BINARY_DIR}/include ${OPENAL_INCLUDE_DIRS} ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR})
target_link_libraries(cAudio ${VORBIS_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
@ -26,8 +29,8 @@ else()
target_link_libraries(cAudio ${OPENAL_LIBRARIES})
endif()
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY VERSION "2.3.0")
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY SOVERSION 2 )
set_property(TARGET cAudio PROPERTY VERSION "2.3.0")
set_property(TARGET cAudio PROPERTY SOVERSION 2 )
if (APPLE AND CAUDIO_IOS_BUILD)
set_target_properties(cAudio PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO")

View File

@ -20,7 +20,7 @@
namespace cAudio
{
#if defined(UNICODE) || defined(_UNICODE)
#if defined(CAUDIO_USE_UNICODE)
# define _CTEXT(x) L ## x
# define cstrcmp wcscmp
# define cAudioChar wchar_t
@ -35,15 +35,15 @@ namespace cAudio
#if CAUDIO_REROUTE_STRING_ALLOCATIONS == 1
typedef std::basic_string< cAudioChar, std::char_traits<cAudioChar>, cSTLAllocator<cAudioChar> > cAudioString;
#else
# if defined(UNICODE) || defined(_UNICODE)
# if defined(CAUDIO_USE_UNICODE)
typedef std::basic_string<cAudioChar> cAudioString;
# else
typedef std::string cAudioString;
# endif
#endif
#if defined(CAUDIO_PLATFORM_WIN)
// Conversion is only required if using wide characters in cAudioString
#if defined(CAUDIO_PLATFORM_WIN) && (defined(CAUDIO_USE_UNICODE))
static const char* toUTF8(const cAudioString& str)
{
static int id = 0;