Don't modify external targets

This commit is contained in:
Chris Thrasher 2023-04-02 16:56:14 -06:00
parent 26e54c7b2c
commit 1aa6750f50

View File

@ -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(VORBIS VORBIS_INCLUDE_DIRS VORBIS_LIBRARIES)
sfml_find_package(FLAC FLAC_INCLUDE_DIR FLAC_LIBRARY) 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 # define the sfml-audio target
sfml_add_library(Audio sfml_add_library(Audio
SOURCES ${SRC} ${CODECS_SRC}) SOURCES ${SRC} ${CODECS_SRC})
# avoids warnings in vorbisfile.h
target_compile_definitions(sfml-audio PRIVATE OV_EXCLUDE_STATIC_CALLBACKS FLAC__NO_DLL)
# setup dependencies # setup dependencies
target_link_libraries(sfml-audio target_link_libraries(sfml-audio
PUBLIC SFML::System PUBLIC SFML::System