17 ) |
17 ) |
18 |
18 |
19 #build a static library for human systems |
19 #build a static library for human systems |
20 set (build_type STATIC) |
20 set (build_type STATIC) |
21 |
21 |
22 if(WIN32) |
22 #visualstudio doesn't like static linking, so we're building a shared library just for it |
|
23 if(MSVC) |
23 #workaround for visualstudio (wants headers in the source list) |
24 #workaround for visualstudio (wants headers in the source list) |
24 set(openal_src |
25 set(openal_src |
25 openalwrap.h loaders.h endianness.h wrappers.h winstdint.h ${openal_src} |
26 openalwrap.h loaders.h endianness.h wrappers.h winstdint.h globals.h ${openal_src} |
26 ) |
27 ) |
27 #deps for the shared library |
28 #deps for the shared library |
28 link_libraries(${OPENAL_LIBRARY}) |
29 link_libraries(${OPENAL_LIBRARY}) |
29 link_libraries(${OGG_LIBRARY}) |
30 link_libraries(${OGG_LIBRARY}) |
30 link_libraries(${VORBIS_LIBRARY}) |
31 link_libraries(${VORBIS_LIBRARY}) |
31 link_libraries(${VORBISFILE_LIBRARY}) |
32 link_libraries(${VORBISFILE_LIBRARY}) |
32 #build a shared library |
33 #build a shared library |
33 set (build_type SHARED) |
34 set (build_type SHARED) |
34 endif(WIN32) |
35 endif(MSVC) |
35 |
36 |
36 #compiles and links actual library |
37 #compiles and links actual library |
37 add_library (openalbridge ${build_type} ${openal_src}) |
38 add_library (openalbridge ${build_type} ${openal_src}) |
38 |
39 |
39 if(WIN32) |
40 if(WIN32) |