aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc41e949..bff76185 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1204,6 +1204,12 @@ IF(LIBTYPE STREQUAL "STATIC")
SET(PKG_CONFIG_CFLAGS -DAL_LIBTYPE_STATIC ${PKG_CONFIG_CFLAGS})
ENDIF()
+IF(NOT WIN32)
+ SET(LIBNAME "openal")
+ELSE()
+ SET(LIBNAME "OpenAL32")
+ENDIF()
+
FIND_PACKAGE(Git)
IF(GIT_FOUND AND EXISTS "${OpenAL_SOURCE_DIR}/.git")
# Get the current working branch and its latest abbreviated commit hash
@@ -1290,11 +1296,7 @@ ENDIF()
SET_TARGET_PROPERTIES(OpenAL PROPERTIES VERSION ${LIB_VERSION}
SOVERSION ${LIB_MAJOR_VERSION})
-IF(NOT WIN32)
- SET_TARGET_PROPERTIES(OpenAL PROPERTIES OUTPUT_NAME "openal")
-ELSE()
- SET_TARGET_PROPERTIES(OpenAL PROPERTIES OUTPUT_NAME "OpenAL32")
-ENDIF()
+SET_TARGET_PROPERTIES(OpenAL PROPERTIES OUTPUT_NAME ${LIBNAME})
if(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
SET_TARGET_PROPERTIES(OpenAL PROPERTIES PREFIX "")