Fixed libopenmptdecoder macOS compile when static libraries are enabled.

This commit is contained in:
Casey Langen 2020-07-11 13:54:15 -07:00
parent b5ae2cae89
commit dbf90ddf45

View File

@ -11,8 +11,12 @@ add_library(openmptdecoder SHARED ${openmptdecoder_SOURCES})
# prefer static libraries on mac to make redist easier
if (${LINK_STATICALLY} MATCHES "true")
find_library(OPENMPTLIB NAMES libopenmpt.a openmpt)
target_link_libraries(openmptdecoder ${musikcube_LINK_LIBS} ${OPENMPTLIB})
find_library(MPG123LIB NAMES libmpg123.a mpg123)
find_library(ZLIB NAMES libz.a z)
message(STATUS "[libopenmptdecoder] using ${OPENMPTLIB}")
message(STATUS "[libopenmptdecoder] using ${MPG123LIB}")
message(STATUS "[libopenmptdecoder] using ${ZLIB}")
target_link_libraries(openmptdecoder ${musikcube_LINK_LIBS} ${OPENMPTLIB} ${MPG123LIB} ${ZLIB})
else()
target_link_libraries(openmptdecoder ${musikcube_LINK_LIBS} openmpt)
endif()