Auto-disable gme plugin if libraries are not present.

This commit is contained in:
casey langen 2022-12-22 22:09:28 -08:00
parent 813c8b7e35
commit b87e51d51e
2 changed files with 11 additions and 6 deletions

2
src/3rdparty/bin vendored

@ -1 +1 @@
Subproject commit 6b7541d98b232ea9d2a01b8da5d723eb894bb38d
Subproject commit 8b6a9f577c49864fbfe3c01e6151099bd25c4c4d

View File

@ -5,15 +5,20 @@ set (gmedecoder_SOURCES
GmeIndexerSource.cpp
)
add_definitions(-DHAVE_STDINT_H)
add_library(gmedecoder SHARED ${gmedecoder_SOURCES})
if (${BUILD_STANDALONE} MATCHES "true")
add_vendor_includes(gmedecoder)
find_vendor_library(GME gme)
add_vendor_includes(gmedecoder)
find_vendor_library(GME gme)
target_link_libraries(gmedecoder ${GME})
else()
find_library(GME NAMES gme)
find_library(GME NAMES gme)
if ("${GME}" STREQUAL "GME-NOTFOUND")
disable_plugin(gmedecoder)
else()
target_link_libraries(gmedecoder ${GME})
endif()
endif()
message(STATUS "[gmedecoder] using ${GME}")
add_definitions(-DHAVE_STDINT_H)
target_link_libraries(gmedecoder ${GME})