diff options
author | Chris Robinson <[email protected]> | 2017-07-01 20:48:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-07-01 20:48:17 -0700 |
commit | 3cd4cfe73d48afc31ac8a376ff12eb9476dd3c09 (patch) | |
tree | 8de0b667315c05eaf9a07bfef4e6d33d2e98478c | |
parent | 74139c914d90796fdc7bac65640dcdb305ea344f (diff) |
Don't add --output-def to EXTRA_LDFLAGS
-rw-r--r-- | CMakeLists.txt | 5 |
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) |