Possibly fixed the issues with LibGME mentioned in issue #14.

Not even the HAVE_LIBGME macro was defined apparently, huh.
This commit is contained in:
Monster Iestyn 2016-03-06 19:32:07 +00:00
parent e2b3adc04f
commit 4ab2c336e7
3 changed files with 8 additions and 4 deletions

View file

@ -6,16 +6,16 @@ find_path(GME_INCLUDE_DIR
NAMES gme.h NAMES gme.h
PATHS PATHS
${GME_PKGCONF_INCLUDE_DIRS} ${GME_PKGCONF_INCLUDE_DIRS}
/usr/include/gme "/usr/include/gme"
/usr/local/include/gme "/usr/local/include/gme"
) )
find_library(GME_LIBRARY find_library(GME_LIBRARY
NAMES gme NAMES gme
PATHS PATHS
${GME_PKGCONF_LIBRARY_DIRS} ${GME_PKGCONF_LIBRARY_DIRS}
/usr/lib "/usr/lib"
/usr/local/lib "/usr/local/lib"
) )
set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR) set(GME_PROCESS_INCLUDES GME_INCLUDE_DIR)

View file

@ -314,6 +314,7 @@ if(${SRB2_CONFIG_HAVE_GME})
find_package(GME) find_package(GME)
if(${GME_FOUND}) if(${GME_FOUND})
set(SRB2_HAVE_GME ON) set(SRB2_HAVE_GME ON)
add_definitions(-DHAVE_LIBGME)
else() else()
message(WARNING "You have specified that GME is available but it was not found.") message(WARNING "You have specified that GME is available but it was not found.")
endif() endif()

View file

@ -122,6 +122,7 @@ if(${SDL2_FOUND})
add_framework(SDL2 SRB2SDL2) add_framework(SDL2 SRB2SDL2)
add_framework(SDL2_mixer SRB2SDL2) add_framework(SDL2_mixer SRB2SDL2)
target_link_libraries(SRB2SDL2 PRIVATE target_link_libraries(SRB2SDL2 PRIVATE
${GME_LIBRARIES}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
@ -131,6 +132,7 @@ if(${SDL2_FOUND})
target_link_libraries(SRB2SDL2 PRIVATE target_link_libraries(SRB2SDL2 PRIVATE
${SDL2_LIBRARIES} ${SDL2_LIBRARIES}
${SDL2_MIXER_LIBRARIES} ${SDL2_MIXER_LIBRARIES}
${GME_LIBRARIES}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
@ -198,6 +200,7 @@ if(${SDL2_FOUND})
target_include_directories(SRB2SDL2 PRIVATE target_include_directories(SRB2SDL2 PRIVATE
${SDL2_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}
${SDL2_MIXER_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIRS}
${GME_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS}