Skip to content

Commit

Permalink
explicit link against the library target
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima authored and Wohlstand committed Apr 18, 2018
1 parent beceecd commit 84cda49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.11)
cmake_minimum_required (VERSION 3.2)
project (libADLMIDI)

#===========================================================================================
Expand Down Expand Up @@ -266,6 +266,13 @@ if(NOT libADLMIDI_STATIC AND NOT libADLMIDI_SHARED)
You must enable at least one of them!")
endif()

add_library(ADLMIDI INTERFACE)
if(libADLMIDI_SHARED)
target_link_libraries(ADLMIDI INTERFACE ADLMIDI_shared)
else()
target_link_libraries(ADLMIDI INTERFACE ADLMIDI_static)
endif()

if(WITH_MIDIPLAY)
if(NOT MSDOS AND NOT DJGPP AND NOT MIDIPLAY_WAVE_ONLY)
find_library(SDL2_LIBRARY SDL2 REQUIRED)
Expand Down

0 comments on commit 84cda49

Please sign in to comment.