link to allegro5-video

This commit is contained in:
Sebastian Krzyszkowiak 2017-06-26 15:21:13 +02:00
parent 28f9f708b9
commit 519a22c9ad
5 changed files with 29 additions and 3 deletions

View file

@ -16,6 +16,7 @@ public class SuperDerpyActivity extends AllegroActivity {
System.loadLibrary("allegro_ttf-debug");
System.loadLibrary("allegro_audio-debug");
System.loadLibrary("allegro_acodec-debug");
System.loadLibrary("allegro_video-debug");
}
/* By default, AllegroActivity.onCreate will cause Allegro to load the

View file

@ -16,6 +16,7 @@ public class SuperDerpyActivity extends AllegroActivity {
System.loadLibrary("allegro_ttf");
System.loadLibrary("allegro_audio");
System.loadLibrary("allegro_acodec");
System.loadLibrary("allegro_video");
}
/* By default, AllegroActivity.onCreate will cause Allegro to load the

View file

@ -0,0 +1,23 @@
# Try to find allegro 5
#
# ALLEGRO5_VIDEO_FOUND - system has allegro5
# ALLEGRO5_VIDEO_INCLUDE_DIR - the allrgo5 include directory
# ALLEGRO5_VIDEO_LIBRARIES - Link these to use allegro5
#
FIND_PATH(ALLEGRO5_VIDEO_INCLUDE_DIR allegro5/allegro_video.h)
SET(ALLEGRO5_VIDEO_NAMES ${ALLEGRO5_VIDEO_NAMES} allegro_video allegro_video_static liballegro_video liballegro_video_static AllegroVideo-5.2 allegro_video-debug)
FIND_LIBRARY(ALLEGRO5_VIDEO_LIBRARY NAMES ${ALLEGRO5_VIDEO_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_VIDEO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_VIDEO DEFAULT_MSG ALLEGRO5_VIDEO_LIBRARY ALLEGRO5_VIDEO_INCLUDE_DIR)
IF(ALLEGRO5_VIDEO_FOUND)
SET(ALLEGRO5_VIDEO_LIBRARIES ${ALLEGRO5_VIDEO_LIBRARY})
SET(ALLEGRO5_LIBS ${ALLEGRO5_LIBS} ${ALLEGRO5_VIDEO_LIBRARIES})
ENDIF(ALLEGRO5_VIDEO_FOUND)
MARK_AS_ADVANCED(ALLEGRO5_VIDEO_LIBRARY ALLEGRO5_VIDEO_INCLUDE_DIR )

View file

@ -47,11 +47,12 @@ find_package(Allegro5Audio REQUIRED)
find_package(Allegro5ACodec REQUIRED)
find_package(Allegro5Image REQUIRED)
find_package(Allegro5Color REQUIRED)
find_package(Allegro5Video REQUIRED)
if(APPLE)
find_package(Allegro5Main)
endif(APPLE)
include_directories(${ALLEGRO5_INCLUDE_DIR} ${ALLEGRO5_FONT_INCLUDE_DIR} ${ALLEGRO5_TTF_INCLUDE_DIR} ${ALLEGRO5_PRIMITIVES_INCLUDE_DIR} ${ALLEGRO5_AUDIO_INCLUDE_DIR} ${ALLEGRO5_ACODEC_INCLUDE_DIR} ${ALLEGRO5_IMAGE_INCLUDE_DIR})
include_directories(${ALLEGRO5_INCLUDE_DIR} ${ALLEGRO5_FONT_INCLUDE_DIR} ${ALLEGRO5_TTF_INCLUDE_DIR} ${ALLEGRO5_PRIMITIVES_INCLUDE_DIR} ${ALLEGRO5_AUDIO_INCLUDE_DIR} ${ALLEGRO5_ACODEC_INCLUDE_DIR} ${ALLEGRO5_VIDEO_INCLUDE_DIR} ${ALLEGRO5_IMAGE_INCLUDE_DIR})
MACRO(register_gamestate name)
@ -59,7 +60,7 @@ MACRO(register_gamestate name)
set_target_properties("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" PROPERTIES PREFIX "")
target_link_libraries("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_COLOR_LIBRARIES} m libsuperderpy)
target_link_libraries("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_VIDEO_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_COLOR_LIBRARIES} m libsuperderpy)
if (TARGET libsuperderpy-${LIBSUPERDERPY_GAMENAME})
target_link_libraries("libsuperderpy-${LIBSUPERDERPY_GAMENAME}-${name}" libsuperderpy-${LIBSUPERDERPY_GAMENAME})

View file

@ -12,6 +12,6 @@ add_library("libsuperderpy" SHARED ${SRC_LIST})
SET_TARGET_PROPERTIES("libsuperderpy" PROPERTIES PREFIX "")
target_link_libraries("libsuperderpy" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} m dl)
target_link_libraries("libsuperderpy" ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_VIDEO_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} m dl)
install(TARGETS "libsuperderpy" DESTINATION ${LIB_INSTALL_DIR})