diff options
author | Chris Robinson <[email protected]> | 2023-07-28 10:31:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-07-28 10:31:18 -0700 |
commit | 4227cb83ced45b7a25e3720fe9d75381a40fe0ab (patch) | |
tree | c190e14db2dbc97295e3fef2c8360c760f973fee /CMakeLists.txt | |
parent | d8f34d616190bf26dd48c8778aa3311c73eca98b (diff) |
Use target_link_options to add linker flags
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f458f3e9..92e789e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1435,8 +1435,8 @@ else() if(NOT WIN32 AND NOT APPLE) # FIXME: This doesn't put a dependency on the version script. Changing # the version script will not cause a relink as it should. - set_property(TARGET ${IMPL_TARGET} APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,--version-script=${OpenAL_SOURCE_DIR}/libopenal.version") + target_link_options(${IMPL_TARGET} PRIVATE + "-Wl,--version-script=${OpenAL_SOURCE_DIR}/libopenal.version") endif() if(APPLE AND ALSOFT_OSX_FRAMEWORK) @@ -1513,8 +1513,7 @@ if(WIN32 AND MINGW AND ALSOFT_BUILD_IMPORT_LIB AND NOT LIBTYPE STREQUAL "STATIC" message(STATUS "WARNING: Cannot find dlltool, disabling .def/.lib generation") endif() else() - set_property(TARGET OpenAL APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,--output-def,OpenAL32.def") + target_link_options(OpenAL PRIVATE "-Wl,--output-def,OpenAL32.def") add_custom_command(TARGET OpenAL POST_BUILD COMMAND "${SED_EXECUTABLE}" -i -e "s/ @[^ ]*//" OpenAL32.def COMMAND "${CMAKE_DLLTOOL}" -d OpenAL32.def -l OpenAL32.lib -D OpenAL32.dll |