From 1aa6750f50b9dc656bcae22aba9f58230542a5c4 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 2 Apr 2023 16:56:14 -0600 Subject: [PATCH] Don't modify external targets --- src/SFML/Audio/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/SFML/Audio/CMakeLists.txt b/src/SFML/Audio/CMakeLists.txt index 6a768f2e..41a74c4b 100644 --- a/src/SFML/Audio/CMakeLists.txt +++ b/src/SFML/Audio/CMakeLists.txt @@ -72,14 +72,13 @@ sfml_find_package(OpenAL OPENAL_INCLUDE_DIR OPENAL_LIBRARY) sfml_find_package(VORBIS VORBIS_INCLUDE_DIRS VORBIS_LIBRARIES) sfml_find_package(FLAC FLAC_INCLUDE_DIR FLAC_LIBRARY) -# avoids warnings in vorbisfile.h -target_compile_definitions(VORBIS INTERFACE "OV_EXCLUDE_STATIC_CALLBACKS") -target_compile_definitions(FLAC INTERFACE "FLAC__NO_DLL") - # define the sfml-audio target sfml_add_library(Audio SOURCES ${SRC} ${CODECS_SRC}) +# avoids warnings in vorbisfile.h +target_compile_definitions(sfml-audio PRIVATE OV_EXCLUDE_STATIC_CALLBACKS FLAC__NO_DLL) + # setup dependencies target_link_libraries(sfml-audio PUBLIC SFML::System