From 9e1aa50518e0abc6e8cfe811cedab32bb80a0fc5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 18 Mar 2017 20:24:19 -0700 Subject: Fix the lib name for the .pc file --- CMakeLists.txt | 12 +++++++----- 1 file 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 "") -- cgit v1.2.3