mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
fixes for build system to work correctly on MinGW
This commit is contained in:
parent
8813473fe1
commit
8d99205e50
12 changed files with 126 additions and 353 deletions
|
@ -1,10 +1,27 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(SuperDerpy)
|
||||
project(SuperDerpy C)
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ansi -g")
|
||||
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/modules)
|
||||
|
||||
if(MINGW)
|
||||
# Guess MINGDIR from the value of CMAKE_C_COMPILER if it's not set.
|
||||
if("$ENV{MINGDIR}" STREQUAL "")
|
||||
string(REGEX REPLACE "/bin/[^/]*$" "" MINGDIR "${CMAKE_C_COMPILER}")
|
||||
message(STATUS "Guessed MinGW directory: ${MINGDIR}")
|
||||
else("$ENV{MINGDIR}" STREQUAL "")
|
||||
file(TO_CMAKE_PATH "$ENV{MINGDIR}" MINGDIR)
|
||||
message(STATUS "Using MINGDIR: ${MINGDIR}")
|
||||
endif("$ENV{MINGDIR}" STREQUAL "")
|
||||
|
||||
# Search in MINGDIR for headers and libraries.
|
||||
set(CMAKE_PREFIX_PATH "${MINGDIR}")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows")
|
||||
|
||||
endif(MINGW)
|
||||
|
||||
add_subdirectory(src)
|
||||
install(DIRECTORY data DESTINATION share/superderpy)
|
||||
|
||||
|
|
|
@ -1,48 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_FOUND - system has allegro5
|
||||
# ALLEGRO5_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_INCLUDE_DIR allegro.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_INCLUDE_DIR allegro5/allegro.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_LIBRARY
|
||||
NAMES allegro
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_NAMES ${ALLEGRO5_NAMES} allegro allegro_static liballegro liballegro_static)
|
||||
FIND_LIBRARY(ALLEGRO5_LIBRARY NAMES ${ALLEGRO5_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5 DEFAULT_MSG ALLEGRO5_LIBRARY ALLEGRO5_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_LIBRARY)
|
||||
SET(ALLEGRO5_LIBRARIES "${ALLEGRO5_LIBRARY}" CACHE STRING "Allegro5 Libraries")
|
||||
SET(ALLEGRO5_INCLUDE_DIRS "${ALLEGRO5_INCLUDE_DIR}" CACHE STRING "Allegro5 Include Dirs")
|
||||
SET(ALLEGRO5_FOUND TRUE)
|
||||
#MESSAGE(STATUS ${ALLEGRO5_LIBRARY})
|
||||
ENDIF(ALLEGRO5_LIBRARY)
|
||||
IF(ALLEGRO5_FOUND)
|
||||
SET(ALLEGRO5_LIBRARIES ${ALLEGRO5_LIBRARY})
|
||||
ENDIF(ALLEGRO5_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_INCLUDE_DIR ALLEGRO5_INCLUDE_DIRS ALLEGRO5_LIBRARIES ALLEGRO5_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_LIBRARY ALLEGRO5_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_ACODEC_FOUND - system has allegro5
|
||||
# ALLEGRO5_ACODEC_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_ACODEC_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_ACODEC_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_ACODEC_INCLUDE_DIR allegro_acodec.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_ACODEC_INCLUDE_DIR allegro5/allegro_acodec.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_ACODEC_LIBRARY
|
||||
NAMES allegro_acodec
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_ACODEC_NAMES ${ALLEGRO5_ACODEC_NAMES} allegro_acodec allegro_acodec_static liballegro_acodec liballegro_acodec_static)
|
||||
FIND_LIBRARY(ALLEGRO5_ACODEC_LIBRARY NAMES ${ALLEGRO5_ACODEC_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_ACODEC_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_ACODEC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_ACODEC DEFAULT_MSG ALLEGRO5_ACODEC_LIBRARY ALLEGRO5_ACODEC_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_ACODEC_LIBRARY)
|
||||
SET(ALLEGRO5_ACODEC_LIBRARIES "${ALLEGRO5_ACODEC_LIBRARY}" CACHE STRING "Allegro5 ACodec Libraries")
|
||||
SET(ALLEGRO5_ACODEC_INCLUDE_DIRS "${ALLEGRO5_ACODEC_INCLUDE_DIR}" CACHE STRING "Allegro5 ACodec Include Dirs")
|
||||
SET(ALLEGRO5_ACODEC_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_ACODEC_LIBRARY)
|
||||
IF(ALLEGRO5_ACODEC_FOUND)
|
||||
SET(ALLEGRO5_ACODEC_LIBRARIES ${ALLEGRO5_ACODEC_LIBRARY})
|
||||
ENDIF(ALLEGRO5_ACODEC_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_ACODEC_INCLUDE_DIR ALLEGRO5_ACODEC_INCLUDE_DIRS ALLEGRO5_ACODEC_LIBRARIES ALLEGRO5_ACODEC_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_ACODEC_LIBRARY ALLEGRO5_ACODEC_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_AUDIO_FOUND - system has allegro5
|
||||
# ALLEGRO5_AUDIO_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_AUDIO_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_AUDIO_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_AUDIO_INCLUDE_DIR allegro_audio.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_AUDIO_INCLUDE_DIR allegro5/allegro_audio.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_AUDIO_LIBRARY
|
||||
NAMES allegro_audio
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_AUDIO_NAMES ${ALLEGRO5_AUDIO_NAMES} allegro_audio allegro_audio_static liballegro_audio liballegro_audio_static)
|
||||
FIND_LIBRARY(ALLEGRO5_AUDIO_LIBRARY NAMES ${ALLEGRO5_AUDIO_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_AUDIO_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_AUDIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_AUDIO DEFAULT_MSG ALLEGRO5_AUDIO_LIBRARY ALLEGRO5_AUDIO_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_AUDIO_LIBRARY)
|
||||
SET(ALLEGRO5_AUDIO_LIBRARIES "${ALLEGRO5_AUDIO_LIBRARY}" CACHE STRING "Allegro5 Audio Libraries")
|
||||
SET(ALLEGRO5_AUDIO_INCLUDE_DIRS "${ALLEGRO5_AUDIO_INCLUDE_DIR}" CACHE STRING "Allegro5 Audio Include Dirs")
|
||||
SET(ALLEGRO5_AUDIO_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_AUDIO_LIBRARY)
|
||||
IF(ALLEGRO5_AUDIO_FOUND)
|
||||
SET(ALLEGRO5_AUDIO_LIBRARIES ${ALLEGRO5_AUDIO_LIBRARY})
|
||||
ENDIF(ALLEGRO5_AUDIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_AUDIO_INCLUDE_DIR ALLEGRO5_AUDIO_INCLUDE_DIRS ALLEGRO5_AUDIO_LIBRARIES ALLEGRO5_AUDIO_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_AUDIO_LIBRARY ALLEGRO5_AUDIO_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_FONT_FOUND - system has allegro5
|
||||
# ALLEGRO5_FONT_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_FONT_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_FONT_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_FONT_INCLUDE_DIR allegro_font.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_FONT_INCLUDE_DIR allegro5/allegro_font.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_FONT_LIBRARY
|
||||
NAMES allegro_font
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_FONT_NAMES ${ALLEGRO5_FONT_NAMES} allegro_font allegro_font_static liballegro_font liballegro_font_static)
|
||||
FIND_LIBRARY(ALLEGRO5_FONT_LIBRARY NAMES ${ALLEGRO5_FONT_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_FONT_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_FONT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_FONT DEFAULT_MSG ALLEGRO5_FONT_LIBRARY ALLEGRO5_FONT_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_FONT_LIBRARY)
|
||||
SET(ALLEGRO5_FONT_LIBRARIES "${ALLEGRO5_FONT_LIBRARY}" CACHE STRING "Allegro5 Font Libraries")
|
||||
SET(ALLEGRO5_FONT_INCLUDE_DIRS "${ALLEGRO5_FONT_INCLUDE_DIR}" CACHE STRING "Allegro5 Font Include Dirs")
|
||||
SET(ALLEGRO5_FONT_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_FONT_LIBRARY)
|
||||
IF(ALLEGRO5_FONT_FOUND)
|
||||
SET(ALLEGRO5_FONT_LIBRARIES ${ALLEGRO5_FONT_LIBRARY})
|
||||
ENDIF(ALLEGRO5_FONT_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_FONT_INCLUDE_DIR ALLEGRO5_FONT_INCLUDE_DIRS ALLEGRO5_FONT_LIBRARIES ALLEGRO5_FONT_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_FONT_LIBRARY ALLEGRO5_FONT_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_IMAGE_FOUND - system has allegro5
|
||||
# ALLEGRO5_IMAGE_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_IMAGE_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_IMAGE_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_IMAGE_INCLUDE_DIR allegro_image.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_IMAGE_INCLUDE_DIR allegro5/allegro_image.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_IMAGE_LIBRARY
|
||||
NAMES allegro_image
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_IMAGE_NAMES ${ALLEGRO5_IMAGE_NAMES} allegro_image allegro_image_static liballegro_image liballegro_image_static)
|
||||
FIND_LIBRARY(ALLEGRO5_IMAGE_LIBRARY NAMES ${ALLEGRO5_IMAGE_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_IMAGE_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_IMAGE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_IMAGE DEFAULT_MSG ALLEGRO5_IMAGE_LIBRARY ALLEGRO5_IMAGE_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_IMAGE_LIBRARY)
|
||||
SET(ALLEGRO5_IMAGE_LIBRARIES "${ALLEGRO5_IMAGE_LIBRARY}" CACHE STRING "Allegro5 Image Libraries")
|
||||
SET(ALLEGRO5_IMAGE_INCLUDE_DIRS "${ALLEGRO5_IMAGE_INCLUDE_DIR}" CACHE STRING "Allegro5 Image Include Dirs")
|
||||
SET(ALLEGRO5_IMAGE_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_IMAGE_LIBRARY)
|
||||
IF(ALLEGRO5_IMAGE_FOUND)
|
||||
SET(ALLEGRO5_IMAGE_LIBRARIES ${ALLEGRO5_IMAGE_LIBRARY})
|
||||
ENDIF(ALLEGRO5_IMAGE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_IMAGE_INCLUDE_DIR ALLEGRO5_IMAGE_INCLUDE_DIRS ALLEGRO5_IMAGE_LIBRARIES ALLEGRO5_IMAGE_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_IMAGE_LIBRARY ALLEGRO5_IMAGE_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,23 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_MAIN_FOUND - system has allegro5
|
||||
# ALLEGRO5_MAIN_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_MAIN_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_MAIN_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_MAIN_INCLUDE_DIR allegro_main.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_MAIN_INCLUDE_DIR allegro5/allegro_main.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_MAIN_LIBRARY
|
||||
NAMES allegro_main
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_MAIN_NAMES ${ALLEGRO5_MAIN_NAMES} allegro_main allegro_main_static liballegro_main liballegro_main_static)
|
||||
FIND_LIBRARY(ALLEGRO5_MAIN_LIBRARY NAMES ${ALLEGRO5_MAIN_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_MAIN_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_MAIN_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_MAIN DEFAULT_MSG ALLEGRO5_MAIN_LIBRARY ALLEGRO5_MAIN_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_MAIN_LIBRARY)
|
||||
SET(ALLEGRO5_MAIN_LIBRARIES "${ALLEGRO5_MAIN_LIBRARY}" CACHE STRING "Allegro5 Main Libraries")
|
||||
SET(ALLEGRO5_MAIN_INCLUDE_DIRS "${ALLEGRO5_MAIN_INCLUDE_DIR}" CACHE STRING "Allegro5 Main Include Dirs")
|
||||
SET(ALLEGRO5_MAIN_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_MAIN_LIBRARY)
|
||||
IF(ALLEGRO5_MAIN_FOUND)
|
||||
SET(ALLEGRO5_MAIN_LIBRARIES ${ALLEGRO5_MAIN_LIBRARY})
|
||||
ENDIF(ALLEGRO5_MAIN_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_MAIN_LIBRARY ALLEGRO5_MAIN_INCLUDE_DIR )
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_MAIN_INCLUDE_DIR ALLEGRO5_MAIN_INCLUDE_DIRS ALLEGRO5_MAIN_LIBRARIES ALLEGRO5_MAIN_LIBRARY)
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_NATIVE_DIALOGS_FOUND - system has allegro5
|
||||
# ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_NATIVE_DIALOGS_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIR allegro_native_dialog.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_NATIVE_DIALOGS_LIBRARY
|
||||
NAMES allegro_dialog
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_NATIVE_DIALOGS_LIBRARY}")
|
||||
|
||||
IF(ALLEGRO5_NATIVE_DIALOGS_LIBRARY)
|
||||
SET(ALLEGRO5_NATIVE_DIALOGS_LIBRARIES "${ALLEGRO5_NATIVE_DIALOGS_LIBRARY}" CACHE STRING "Allegro5 Native Dialogs Libraries")
|
||||
SET(ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIRS "${ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIR}" CACHE STRING "Allegro5 Native Dialogs Include Dirs")
|
||||
SET(ALLEGRO5_NATIVE_DIALOGS_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_NATIVE_DIALOGS_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIR ALLEGRO5_NATIVE_DIALOGS_INCLUDE_DIRS ALLEGRO5_NATIVE_DIALOGS_LIBRARIES ALLEGRO5_NATIVE_DIALOGS_LIBRARY)
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_PRIMITIVES_FOUND - system has allegro5
|
||||
# ALLEGRO5_PRIMITIVES_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_PRIMITIVES_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_PRIMITIVES_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_PRIMITIVES_INCLUDE_DIR allegro_primitives.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_PRIMITIVES_INCLUDE_DIR allegro5/allegro_primitives.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_PRIMITIVES_LIBRARY
|
||||
NAMES allegro_primitives
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_PRIMITIVES_NAMES ${ALLEGRO5_PRIMITIVES_NAMES} allegro_primitives allegro_primitives_static liballegro_primitives liballegro_primitives_static)
|
||||
FIND_LIBRARY(ALLEGRO5_PRIMITIVES_LIBRARY NAMES ${ALLEGRO5_PRIMITIVES_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_PRIMITIVES_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_PRIMITIVES_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_PRIMITIVES DEFAULT_MSG ALLEGRO5_PRIMITIVES_LIBRARY ALLEGRO5_PRIMITIVES_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_PRIMITIVES_LIBRARY)
|
||||
SET(ALLEGRO5_PRIMITIVES_LIBRARIES "${ALLEGRO5_PRIMITIVES_LIBRARY}" CACHE STRING "Allegro5 Primitives Libraries")
|
||||
SET(ALLEGRO5_PRIMITIVES_INCLUDE_DIRS "${ALLEGRO5_PRIMITIVES_INCLUDE_DIR}" CACHE STRING "Allegro5 Primitives Include Dirs")
|
||||
SET(ALLEGRO5_PRIMITIVES_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_PRIMITIVES_LIBRARY)
|
||||
IF(ALLEGRO5_PRIMITIVES_FOUND)
|
||||
SET(ALLEGRO5_PRIMITIVES_LIBRARIES ${ALLEGRO5_PRIMITIVES_LIBRARY})
|
||||
ENDIF(ALLEGRO5_PRIMITIVES_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_PRIMITIVES_INCLUDE_DIR ALLEGRO5_PRIMITIVES_INCLUDE_DIRS ALLEGRO5_PRIMITIVES_LIBRARIES ALLEGRO5_PRIMITIVES_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_PRIMITIVES_LIBRARY ALLEGRO5_PRIMITIVES_INCLUDE_DIR )
|
||||
|
|
|
@ -1,47 +1,22 @@
|
|||
# Try to find allegro 5
|
||||
#
|
||||
# ALLEGRO5_TTF_FOUND - system has allegro5
|
||||
# ALLEGRO5_TTF_INCLUDE_DIRS - the allrgo5 include directory
|
||||
# ALLEGRO5_TTF_INCLUDE_DIR - the allrgo5 include directory
|
||||
# ALLEGRO5_TTF_LIBRARIES - Link these to use allegro5
|
||||
#
|
||||
|
||||
FIND_PATH(ALLEGRO5_TTF_INCLUDE_DIR allegro_ttf.h
|
||||
HINTS
|
||||
$ENV{LUA_DIR}
|
||||
PATH_SUFFIXES include/allegro5 include/allegro include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
FIND_PATH(ALLEGRO5_TTF_INCLUDE_DIR allegro5/allegro_ttf.h)
|
||||
|
||||
FIND_LIBRARY(ALLEGRO5_TTF_LIBRARY
|
||||
NAMES allegro_ttf
|
||||
HINTS
|
||||
$ENV{ALLEGRO5_DIR}
|
||||
PATH_SUFFIXES lib64 lib
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
)
|
||||
SET(ALLEGRO5_TTF_NAMES ${ALLEGRO5_TTF_NAMES} allegro_ttf allegro_ttf_static liballegro_ttf liballegro_ttf_static)
|
||||
FIND_LIBRARY(ALLEGRO5_TTF_LIBRARY NAMES ${ALLEGRO5_TTF_NAMES} )
|
||||
|
||||
MESSAGE(STATUS "${ALLEGRO5_TTF_LIBRARY}")
|
||||
# handle the QUIETLY and REQUIRED arguments and set ALLEGRO5_TTF_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALLEGRO5_TTF DEFAULT_MSG ALLEGRO5_TTF_LIBRARY ALLEGRO5_TTF_INCLUDE_DIR)
|
||||
|
||||
IF(ALLEGRO5_TTF_LIBRARY)
|
||||
SET(ALLEGRO5_TTF_LIBRARIES "${ALLEGRO5_TTF_LIBRARY}" CACHE STRING "Allegro5 Font Libraries")
|
||||
SET(ALLEGRO5_TTF_INCLUDE_DIRS "${ALLEGRO5_TTF_INCLUDE_DIR}" CACHE STRING "Allegro5 Font Include Dirs")
|
||||
SET(ALLEGRO5_TTF_FOUND TRUE)
|
||||
ENDIF(ALLEGRO5_TTF_LIBRARY)
|
||||
IF(ALLEGRO5_TTF_FOUND)
|
||||
SET(ALLEGRO5_TTF_LIBRARIES ${ALLEGRO5_TTF_LIBRARY})
|
||||
ENDIF(ALLEGRO5_TTF_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(ALLEGRO5_TTF_INCLUDE_DIR ALLEGRO5_TTF_INCLUDE_DIRS ALLEGRO5_TTF_LIBRARIES ALLEGRO5_TTF_LIBRARY)
|
||||
MARK_AS_ADVANCED(ALLEGRO5_TTF_LIBRARY ALLEGRO5_TTF_INCLUDE_DIR )
|
||||
|
|
2
run
2
run
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
echo run $@ > gdb.tmp
|
||||
cd build
|
||||
make -j12 && cd .. && gdb build/superderpy -x gdb.tmp
|
||||
make -j12 && cd .. && gdb build/src/superderpy -x gdb.tmp
|
||||
rm gdb.tmp
|
||||
|
|
|
@ -23,16 +23,19 @@ find_package(Allegro5Primitives REQUIRED)
|
|||
find_package(Allegro5Audio REQUIRED)
|
||||
find_package(Allegro5ACodec REQUIRED)
|
||||
find_package(Allegro5Image REQUIRED)
|
||||
if(${APPLE})
|
||||
find_package(Allegro5Main REQUIRED)
|
||||
else(${APPLE})
|
||||
set(ALLEGRO5_MAIN_INCLUDE_DIRS "")
|
||||
endif(${APPLE})
|
||||
|
||||
include_directories(${ALLEGRO5_INCLUDE_DIRS} ${ALLEGRO5_FONT_INCLUDE_DIRS} ${ALLEGRO5_TTF_INCLUDE_DIRS} ${ALLEGRO5_PRIMITIVES_INCLUDE_DIRS} ${ALLEGRO5_AUDIO_INCLUDE_DIRS} ${ALLEGRO5_ACODEC_INCLUDE_DIRS} ${ALLEGRO5_IMAGE_INCLUDE_DIRS} ${ALLEGRO5_MAIN_INCLUDE_DIRS})
|
||||
if(APPLE)
|
||||
find_package(Allegro5Main)
|
||||
endif(APPLE)
|
||||
|
||||
add_executable(superderpy ${SRC_LIST})
|
||||
|
||||
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})
|
||||
|
||||
target_link_libraries(superderpy ${ALLEGRO5_LIBRARIES} ${ALLEGRO5_FONT_LIBRARIES} ${ALLEGRO5_TTF_LIBRARIES} ${ALLEGRO5_PRIMITIVES_LIBRARIES} ${ALLEGRO5_AUDIO_LIBRARIES} ${ALLEGRO5_ACODEC_LIBRARIES} ${ALLEGRO5_IMAGE_LIBRARIES} ${ALLEGRO5_MAIN_LIBRARIES} m)
|
||||
|
||||
if(ALLEGRO5_MAIN_FOUND)
|
||||
include_directories(${ALLEGRO5_MAIN_INCLUDE_DIR})
|
||||
target_link_libraries(superderpy ${ALLEGRO5_MAIN_INCLUDE_DIR})
|
||||
endif(ALLEGRO5_MAIN_FOUND)
|
||||
|
||||
install(TARGETS superderpy DESTINATION bin)
|
||||
|
|
Loading…
Reference in a new issue