diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2019-01-24 09:28:17 +0100 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2019-01-24 10:59:51 +0100 |
commit | af786beba6e195dea9ca02ae47315945c8f9b1c8 (patch) | |
tree | 8bdc0b08ae79a816c3885b1f4309fa7bda995eba /utils/midiplay | |
parent | 25c48a996ae22d226a4469340c01b1724b398fae (diff) | |
download | libADLMIDI-af786beba6e195dea9ca02ae47315945c8f9b1c8.tar.gz libADLMIDI-af786beba6e195dea9ca02ae47315945c8f9b1c8.tar.bz2 libADLMIDI-af786beba6e195dea9ca02ae47315945c8f9b1c8.zip |
fix the SDL2 library search
This allows to handle two variants of SDL2 find modules, which are incompatible:
- the first kind of module sets the SDL2_* variables
- the other kind exports the library target SDL2::SDL2
Diffstat (limited to 'utils/midiplay')
-rw-r--r-- | utils/midiplay/CMakeLists.txt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utils/midiplay/CMakeLists.txt b/utils/midiplay/CMakeLists.txt index 9857c4c..59f77fe 100644 --- a/utils/midiplay/CMakeLists.txt +++ b/utils/midiplay/CMakeLists.txt @@ -4,10 +4,8 @@ add_executable(adlmidiplay ) if(NOT ADLMIDI_DOS AND NOT MIDIPLAY_WAVE_ONLY) - find_package(SDL2 REQUIRED) - string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES) - target_include_directories(adlmidiplay PRIVATE ${SDL2_INCLUDE_DIRS}) - target_link_libraries(adlmidiplay PRIVATE ${SDL2_LIBRARIES}) + libADLMIDI_find_SDL2() + target_link_libraries(adlmidiplay PRIVATE ADLMIDI_SDL2) endif() if(MIDIPLAY_WAVE_ONLY) |