diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-09-13 17:36:01 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-10-24 18:55:01 +0200 |
commit | 6a1254dadcb25f212d74d45faaf1d8550bc0de76 (patch) | |
tree | 2ec9ef1a69b9f83280c6bce4070034800bd56856 /cmake | |
parent | ce74c93f8aa7af73af20095e5616c7ba01d2713d (diff) |
CMake: Assume statically linked PortTime if only porttime.h was found
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPortMidi.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/modules/FindPortMidi.cmake b/cmake/modules/FindPortMidi.cmake index 9f9b705664..2b204b6f32 100644 --- a/cmake/modules/FindPortMidi.cmake +++ b/cmake/modules/FindPortMidi.cmake @@ -67,11 +67,15 @@ find_package_handle_standard_args( DEFAULT_MSG PortMidi_LIBRARY PortMidi_INCLUDE_DIR - PortTime_LIBRARY PortTime_INCLUDE_DIR ) if(PortMidi_FOUND) - set(PortMidi_LIBRARIES ${PortMidi_LIBRARY} ${PortTime_LIBRARY}) + set(PortMidi_LIBRARIES ${PortMidi_LIBRARY}) + # Depending on the library configuration PortTime might be statically + # linked with PortMidi. + if(PortTime_LIBRARY) + list(APPEND PortMidi_LIBRARIES ${PortTime_LIBRARY}) + endif() set(PortMidi_INCLUDE_DIRS ${PortMidi_INCLUDE_DIR} ${PortTime_INCLUDE_DIR}) endif() |