From 3cd4cfe73d48afc31ac8a376ff12eb9476dd3c09 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 1 Jul 2017 20:48:17 -0700 Subject: Don't add --output-def to EXTRA_LDFLAGS --- CMakeLists.txt | 5 +++-- 1 file 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) -- cgit v1.2.3