aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 523e288d..f596db4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1247,6 +1247,7 @@ ENDIF()
SET_TARGET_PROPERTIES(OpenAL PROPERTIES VERSION ${LIB_VERSION}
SOVERSION ${LIB_MAJOR_VERSION})
SET_TARGET_PROPERTIES(OpenAL PROPERTIES OUTPUT_NAME ${LIBNAME})
+SET_PROPERTY(TARGET OpenAL APPEND_STRING PROPERTY LINK_FLAGS ${EXTRA_LDFLAGS})
if(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
SET_TARGET_PROPERTIES(OpenAL PROPERTIES PREFIX "")
@@ -1263,7 +1264,8 @@ if(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
MESSAGE(STATUS "WARNING: Cannot find dlltool, disabling .def/.lib generation")
ENDIF()
ELSE()
- SET(EXTRA_LDFLAGS "${EXTRA_LDFLAGS} -Wl,--output-def,OpenAL32.def")
+ SET_PROPERTY(TARGET OpenAL APPEND_STRING PROPERTY LINK_FLAGS
+ " -Wl,--output-def,OpenAL32.def")
ADD_CUSTOM_COMMAND(TARGET OpenAL POST_BUILD
COMMAND "${SED_EXECUTABLE}" -i -e "s/ @[^ ]*//" OpenAL32.def
COMMAND "${DLLTOOL_EXECUTABLE}" -d OpenAL32.def -l OpenAL32.lib -D OpenAL32.dll
@@ -1274,7 +1276,6 @@ if(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
ENDIF()
ENDIF()
-SET_PROPERTY(TARGET OpenAL APPEND_STRING PROPERTY LINK_FLAGS ${EXTRA_LDFLAGS})
TARGET_LINK_LIBRARIES(OpenAL ${EXTRA_LIBS})
IF(TARGET build_version)
ADD_DEPENDENCIES(OpenAL build_version)