mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-28 05:37:19 +00:00
Move link flags and other cmake configuration from Allegro's CMakeLists.txt to the main CMakeLists.txt.
Remove all the "modules" stuff from Allegro's CMakeLists.txt
This commit is contained in:
parent
3ef3fe3a3f
commit
87d2d5595f
214
CMakeLists.txt
214
CMakeLists.txt
@ -1,25 +1,69 @@
|
||||
# ASE - Allegro Sprite Editor
|
||||
# Copyright (C) 2001-2010 David Capello
|
||||
#
|
||||
# Parts of this file come from the Allegro 4.4 CMakeLists.txt
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
# CMake setup
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
|
||||
######################################################################
|
||||
# Global project name
|
||||
# CMP0003: Libraries linked via full path no longer produce linker search paths.
|
||||
#if(COMMAND cmake_policy)
|
||||
# cmake_policy(SET CMP0003 NEW)
|
||||
#endif(COMMAND cmake_policy)
|
||||
|
||||
project(aseprite)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
"Choose the type of build, options are:
|
||||
None Debug Release RelWithDebInfo Profile."
|
||||
FORCE)
|
||||
endif()
|
||||
|
||||
# Restrict configuration types to the selected build type.
|
||||
# Note: This needs to be done before the project command
|
||||
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE INTERNAL "internal")
|
||||
|
||||
# ASE project
|
||||
project(aseprite C CXX)
|
||||
|
||||
######################################################################
|
||||
# Options (these can be specified in cmake command line or modifying CMakeCache.txt)
|
||||
|
||||
option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)
|
||||
option(USE_STATIC_ALLEGRO "Use static version of Allegro library" off)
|
||||
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
|
||||
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
|
||||
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
|
||||
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
|
||||
|
||||
######################################################################
|
||||
# Directories of third-party libraries
|
||||
# Profile build type
|
||||
|
||||
list(APPEND CMAKE_BUILD_TYPES Profile)
|
||||
mark_as_advanced(
|
||||
CMAKE_C_FLAGS_PROFILE
|
||||
CMAKE_CXX_FLAGS_PROFILE
|
||||
CMAKE_EXE_LINKER_FLAGS_PROFILE
|
||||
)
|
||||
|
||||
if(COMPILER_GCC)
|
||||
set(CMAKE_C_FLAGS_PROFILE "-pg"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE}"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "-pg"
|
||||
CACHE STRING "profiling flags")
|
||||
endif(COMPILER_GCC)
|
||||
|
||||
if(COMPILER_MSVC)
|
||||
set(CMAKE_C_FLAGS_PROFILE "-Gd -Ox"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE}"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "-profile"
|
||||
CACHE STRING "profiling flags")
|
||||
endif(COMPILER_MSVC)
|
||||
|
||||
######################################################################
|
||||
# Directories
|
||||
|
||||
set(LIBFREETYPE_DIR ${CMAKE_SOURCE_DIR}/third_party/freetype)
|
||||
set(LIBJPEG_DIR ${CMAKE_SOURCE_DIR}/third_party/jpeg)
|
||||
@ -29,13 +73,25 @@ set(TINYXML_DIR ${CMAKE_SOURCE_DIR}/third_party/tinyxml)
|
||||
set(VACA_DIR ${CMAKE_SOURCE_DIR}/third_party/vaca)
|
||||
set(ZLIB_DIR ${CMAKE_SOURCE_DIR}/third_party/zlib)
|
||||
|
||||
# Allegro header files
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src/allegro/include)
|
||||
include_directories(${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
# Search in the "cmake" directory for additional CMake modules.
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Put libraries into "lib".
|
||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
######################################################################
|
||||
# Common definitions to compile all sources
|
||||
|
||||
|
||||
# Do not use MMX optimizations in PNG code
|
||||
add_definitions(-DPNG_NO_MMX_CODE)
|
||||
|
||||
# Static Allegro (the code of Allegro library is embedded).
|
||||
add_definitions(-DALLEGRO_STATICLINK)
|
||||
|
||||
# Debug C/C++ flags
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
add_definitions(-DDEBUGMODE -D_DEBUG)
|
||||
@ -43,15 +99,149 @@ else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
# Use static Allegro library
|
||||
if(USE_STATIC_ALLEGRO)
|
||||
add_definitions(-DALLEGRO_STATICLINK)
|
||||
endif()
|
||||
|
||||
if(ENABLE_MEMLEAK)
|
||||
add_definitions(-DMEMLEAK)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# Platform specific stuff
|
||||
|
||||
set(PLATFORM_LIBS)
|
||||
|
||||
# -- Unix --
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS)
|
||||
# Pthreads
|
||||
find_package(Threads)
|
||||
if(NOT CMAKE_USE_PTHREADS_INIT)
|
||||
message(FATAL_ERROR "Unix port requires pthreads support.")
|
||||
endif()
|
||||
list(APPEND PLATFORM_LIBS m ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
# X11
|
||||
find_package(X11)
|
||||
if(NOT X11_FOUND)
|
||||
message(FATAL_ERROR "Unix port requires X11 (e.g. libx11-dev).")
|
||||
endif()
|
||||
include_directories(SYSTEM ${X11_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_LIBS ${X11_LIBRARIES})
|
||||
|
||||
if(X11_XShm_FOUND)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xext_LIB})
|
||||
endif()
|
||||
|
||||
if(X11_Xcursor_FOUND)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xcursor_LIB})
|
||||
endif()
|
||||
|
||||
if(X11_Xpm_FOUND)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xpm_LIB})
|
||||
endif()
|
||||
|
||||
find_library(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
|
||||
mark_as_advanced(X11_Xxf86vm_LIB)
|
||||
if(X11_xf86vmode_FOUND)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xxf86vm_LIB})
|
||||
endif()
|
||||
|
||||
check_library_exists(X11 XOpenIM "${X11_LIB_SEARCH_PATH}" XIM_FOUND)
|
||||
check_library_exists(Xxf86dga XDGAQueryExtension
|
||||
"${X11_LIB_SEARCH_PATH}" XDGA_FOUND)
|
||||
|
||||
if(XDGA_FOUND)
|
||||
list(APPEND PLATFORM Xxf86dga ${X11_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# -- Windows --
|
||||
|
||||
if(WIN32)
|
||||
find_package(DDraw)
|
||||
find_package(DInput)
|
||||
find_package(DSound)
|
||||
find_package(DXGuid)
|
||||
|
||||
if(NOT DDRAW_FOUND OR NOT DINPUT_FOUND OR NOT DSOUND_FOUND OR NOT DXGUID_FOUND)
|
||||
if(MSVC)
|
||||
message(FATAL_ERROR
|
||||
"DirectX required for Windows port. You might need to add DirectX include and lib directories to your INCLUDE and LIB environment variables.")
|
||||
elseif(MINGW)
|
||||
message(FATAL_ERROR
|
||||
"DirectX required for Windows port. Get it from the Allegro web site (dx80_mgw.zip).")
|
||||
else()
|
||||
message(FATAL_ERROR "DirectX required for Windows port.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM
|
||||
${DDRAW_INCLUDE_DIR}
|
||||
${DINPUT_INCLUDE_DIR}
|
||||
${DSOUND_INCLUDE_DIR}
|
||||
${DXGUID_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
list(APPEND PLATFORM_LIBS
|
||||
kernel32
|
||||
user32
|
||||
gdi32
|
||||
comdlg32
|
||||
ole32
|
||||
${DINPUT_LIBRARIES}
|
||||
${DDRAW_LIBRARIES}
|
||||
${DXGUID_LIBRARIES}
|
||||
winmm
|
||||
${DSOUND_LIBRARIES}
|
||||
shlwapi
|
||||
psapi
|
||||
wininet
|
||||
)
|
||||
|
||||
if(MSVC AND ENABLE_MEMLEAK)
|
||||
list(APPEND PLATFORM_LIBS dbghelp)
|
||||
endif()
|
||||
|
||||
endif(WIN32)
|
||||
|
||||
# -- Mac OS X --
|
||||
|
||||
if(APPLE)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
find_package(QuickTime)
|
||||
mark_as_advanced(COCOA_LIBRARY CARBON_LIBRARY IOKIT_LIBRARY)
|
||||
mark_as_advanced(COREAUDIO_LIBRARY AUDIOUNIT_LIBRARY AUDIOTOOLBOX_LIBRARY)
|
||||
mark_as_advanced(QUICKTIME_INCLUDE_DIR QUICKTIME_LIBRARY)
|
||||
|
||||
list(APPEND PLATFORM_LIBS
|
||||
${COCOA_LIBRARY}
|
||||
${CARBON_LIBRARY}
|
||||
${IOKIT_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${AUDIOUNIT_LIBRARY}
|
||||
${AUDIOTOOLBOX_LIBRARY}
|
||||
${QUICKTIME_LIBRARY}
|
||||
)
|
||||
endif(APPLE)
|
||||
|
||||
# -- Haiku/BeOS -- (not officially supported)
|
||||
|
||||
if(BEOS)
|
||||
list(APPEND PLATFORM_LIBS game midi device)
|
||||
endif(BEOS)
|
||||
|
||||
# -- PSP -- (not officially supported)
|
||||
|
||||
if(PSP)
|
||||
include_directories(SYSTEM ${PSPSDK_PATH}/include)
|
||||
link_directories(${PSPSDK_PATH}/lib)
|
||||
list(APPEND PLATFORM_LIBS
|
||||
m pspaudio pspgu psprtc pspdebug pspdisplay pspge pspctrl pspsdk c pspnet pspnet_inet pspnet_resolver psputility pspuser pspkernel)
|
||||
endif(PSP)
|
||||
|
||||
######################################################################
|
||||
# Main ASE targets
|
||||
|
||||
|
@ -1,22 +1,6 @@
|
||||
# ASE - Allegro Sprite Editor
|
||||
# Copyright (C) 2001-2010 David Capello
|
||||
|
||||
if(WIN32)
|
||||
# System libraries on Windows
|
||||
set(sys_libs
|
||||
User32 Shell32 ComCtl32 ComDlg32 Gdi32 Msimg32
|
||||
WinMM AdvAPI32 Ole32 ShLwApi Vfw32 WinInet PsApi
|
||||
DDraw DxGuid DSound DInput8)
|
||||
|
||||
if(MSVC AND ENABLE_MEMLEAK)
|
||||
set(sys_libs ${sys_libs} dbghelp)
|
||||
endif()
|
||||
|
||||
else()
|
||||
# Pthreads
|
||||
set(sys_libs ${sys_libs} pthread)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Do not link with libcmt.lib (to avoid duplicated symbols with msvcrtd.lib)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
@ -1,13 +1,3 @@
|
||||
# XXX build chm files
|
||||
# XXX build devhelp files
|
||||
# XXX resources (keyboard/language) - pretty useless except on DOS
|
||||
# XXX install grabber.txt?
|
||||
# XXX png plugin for grabber
|
||||
# XXX what is fixbundle?
|
||||
# XXX applehelp bundle?
|
||||
# XXX projectbuilder application template?
|
||||
# XXX allegro.m4?
|
||||
|
||||
# Ports that used to work which aren't supported yet:
|
||||
# Haiku/BeOS port
|
||||
# djgpp port
|
||||
@ -17,26 +7,6 @@
|
||||
# DMC
|
||||
# PSP port?
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
#
|
||||
# CMake setup
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
"Choose the type of build, options are:
|
||||
None Debug Release RelWithDebInfo MinSizeRel Profile."
|
||||
FORCE)
|
||||
endif()
|
||||
# Restrict configuration types to the selected build type.
|
||||
# Note: This needs to be done before the project command
|
||||
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE INTERNAL "internal")
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
#
|
||||
# Build options
|
||||
@ -77,13 +47,6 @@ set(ALLEGRO_DLL_SHORTVER 44)
|
||||
# Search in the `cmake' directory for additional CMake modules.
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Search for C header files in these directories.
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
include_directories(${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
# Put libraries into `lib'.
|
||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
# Lists of all the source files.
|
||||
include(FileList)
|
||||
|
||||
@ -95,9 +58,6 @@ include(Common)
|
||||
# Build options
|
||||
#
|
||||
|
||||
option(SHARED "Build shared library for main Allegro library" off)
|
||||
set(BUILD_SHARED_LIBS ${SHARED}) # actual CMake variable
|
||||
|
||||
# On some 64-bit platforms, libraries should be installed into `lib64'
|
||||
# instead of `lib'. Set this to 64 to do that.
|
||||
set(LIB_SUFFIX "" CACHE STRING "Suffix for 'lib' directories, e.g. '64'")
|
||||
@ -315,37 +275,9 @@ endif(PSP)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WFLAGS} ${WFLAGS_C_ONLY}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WFLAGS}")
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DALLEGRO_STATICLINK")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DALLEGRO_STATICLINK")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUGMODE=1")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUGMODE=1")
|
||||
|
||||
list(APPEND CMAKE_BUILD_TYPES Profile)
|
||||
mark_as_advanced(
|
||||
CMAKE_C_FLAGS_PROFILE
|
||||
CMAKE_CXX_FLAGS_PROFILE
|
||||
CMAKE_EXE_LINKER_FLAGS_PROFILE
|
||||
)
|
||||
if(COMPILER_GCC)
|
||||
set(CMAKE_C_FLAGS_PROFILE "-pg"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE}"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "-pg"
|
||||
CACHE STRING "profiling flags")
|
||||
endif(COMPILER_GCC)
|
||||
if(COMPILER_MSVC)
|
||||
set(CMAKE_C_FLAGS_PROFILE "-Gd -Ox"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE}"
|
||||
CACHE STRING "profiling flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "-profile"
|
||||
CACHE STRING "profiling flags")
|
||||
endif(COMPILER_MSVC)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# Not sure if we want to support disabling these any more.
|
||||
@ -358,316 +290,82 @@ set(ALLEGRO_NO_ASM 1)
|
||||
# ALLEGRO_MMX left undefined
|
||||
# ALLEGRO_SSE left undefined
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
#
|
||||
# Unix modules
|
||||
#
|
||||
|
||||
option(WANT_MODULES "Use modules for drivers (Unix)" on)
|
||||
|
||||
if(WANT_MODULES AND ALLEGRO_UNIX)
|
||||
set(ALLEGRO_WITH_MODULES 1)
|
||||
set(ALLEGRO_MODULES_PATH
|
||||
${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/allegro/${ALLEGRO_VERSION})
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/modules.lst
|
||||
DESTINATION "${ALLEGRO_MODULES_PATH}"
|
||||
)
|
||||
endif(WANT_MODULES AND ALLEGRO_UNIX)
|
||||
|
||||
function(add_our_module nm files)
|
||||
if(ALLEGRO_WITH_MODULES)
|
||||
add_library(${nm} MODULE ${files})
|
||||
set_target_properties(${nm}
|
||||
PROPERTIES
|
||||
PREFIX ""
|
||||
COMPILE_FLAGS -DALLEGRO_MODULE
|
||||
)
|
||||
target_link_libraries(${nm} ${ARGN})
|
||||
install(TARGETS ${nm}
|
||||
DESTINATION "${ALLEGRO_MODULES_PATH}"
|
||||
)
|
||||
endif(ALLEGRO_WITH_MODULES)
|
||||
endfunction(add_our_module)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
#
|
||||
# Platform drivers
|
||||
#
|
||||
|
||||
set(PLATFORM_SOURCES)
|
||||
set(PLATFORM_LIBS) # always link with these libraries
|
||||
set(PLATFORM_LIBS_NON_MODULES) # only link with these if modules disabled
|
||||
set(PLATFORM_LIBS_MODULES) # only link with these if modules enabled
|
||||
|
||||
# -- Unix --
|
||||
|
||||
option(WANT_OSS "Build OSS support" on)
|
||||
option(WANT_ALSA "Build ALSA support" on)
|
||||
option(WANT_JACK "Build JACK support" on)
|
||||
option(WANT_SGIAUDIO "Build SGI audio support" on)
|
||||
|
||||
if(ALLEGRO_UNIX) # not MACOSX
|
||||
find_package(Threads)
|
||||
if(NOT CMAKE_USE_PTHREADS_INIT)
|
||||
message(FATAL_ERROR "Unix port requires pthreads support.")
|
||||
endif()
|
||||
set(ALLEGRO_HAVE_LIBPTHREAD 1)
|
||||
list(APPEND PLATFORM_LIBS m ${CMAKE_THREAD_LIBS_INIT})
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_UNIX_FILES})
|
||||
|
||||
find_library(DLOPEN_LIBRARY dl)
|
||||
mark_as_advanced(DLOPEN_LIBRARY)
|
||||
if(DLOPEN_LIBRARY)
|
||||
list(APPEND PLATFORM_LIBS_MODULES ${DLOPEN_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(ALLEGRO_HAVE_POSIX_MONOTONIC_CLOCK)
|
||||
list(APPEND PLATFORM_LIBS ${RT_LIBRARY})
|
||||
endif(ALLEGRO_HAVE_POSIX_MONOTONIC_CLOCK)
|
||||
|
||||
if(WANT_OSS)
|
||||
include(AllegroFindOSS)
|
||||
if(OSS_FOUND)
|
||||
set(ALLEGRO_WITH_OSSDIGI 1)
|
||||
set(ALLEGRO_WITH_OSSMIDI 1)
|
||||
include_directories(SYSTEM ${OSS_INCLUDE_DIR})
|
||||
endif(OSS_FOUND)
|
||||
endif(WANT_OSS)
|
||||
|
||||
if(WANT_ALSA)
|
||||
pkg_check_modules(ALSA alsa)
|
||||
if(ALSA_FOUND)
|
||||
# ALSA 0.5 is beyond obsolete.
|
||||
set(ALLEGRO_ALSA_VERSION 9)
|
||||
set(ALLEGRO_WITH_ALSADIGI 1)
|
||||
set(ALLEGRO_WITH_ALSAMIDI 1)
|
||||
include_directories(SYSTEM ${ALSA_INCLUDE_DIRS})
|
||||
list(APPEND PLATFORM_LIBS_NON_MODULES ${ALSA_LIBRARIES})
|
||||
add_our_module(alleg-alsadigi src/unix/alsa9.c ${ALSA_LIBRARIES})
|
||||
add_our_module(alleg-alsamidi src/unix/alsamidi.c ${ALSA_LIBRARIES})
|
||||
endif(ALSA_FOUND)
|
||||
endif(WANT_ALSA)
|
||||
|
||||
if(WANT_JACK)
|
||||
pkg_check_modules(JACK jack)
|
||||
if(JACK_FOUND)
|
||||
set(ALLEGRO_WITH_JACKDIGI 1)
|
||||
include_directories(SYSTEM ${JACK_INCLUDE_DIRS})
|
||||
list(APPEND PLATFORM_LIBS_NON_MODULES ${JACK_LIBRARIES})
|
||||
add_our_module(alleg-jack src/unix/jack.c ${JACK_LIBRARIES})
|
||||
endif(JACK_FOUND)
|
||||
endif(WANT_JACK)
|
||||
|
||||
# This is untested.
|
||||
if(WANT_SGIAUDIO)
|
||||
check_library_exists(audio alOpenPort "" SGIAUDIO_FOUND)
|
||||
if(SGIAUDIO_FOUND)
|
||||
set(ALLEGRO_WITH_SGIALDIGI 1)
|
||||
list(APPEND PLATFORM_LIBS_NON_MODULES audio)
|
||||
add_our_module(alleg-sgialdigi src/unix/sgial.c audio)
|
||||
endif(SGIAUDIO_FOUND)
|
||||
endif(WANT_SGIAUDIO)
|
||||
|
||||
# aRts is obsolete
|
||||
# esd is obsolete
|
||||
endif(ALLEGRO_UNIX)
|
||||
|
||||
# -- X11 --
|
||||
|
||||
option(WANT_X11 "Want X11 support (Unix)" on)
|
||||
|
||||
if(ALLEGRO_UNIX AND WANT_X11)
|
||||
find_package(X11)
|
||||
if(X11_FOUND)
|
||||
set(ALLEGRO_WITH_XWINDOWS 1)
|
||||
endif()
|
||||
if(ALLEGRO_UNIX AND X11_FOUND)
|
||||
set(ALLEGRO_WITH_XWINDOWS 1)
|
||||
endif()
|
||||
|
||||
if(ALLEGRO_WITH_XWINDOWS)
|
||||
include_directories(SYSTEM ${X11_INCLUDE_DIR})
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_X_FILES})
|
||||
list(APPEND PLATFORM_LIBS ${X11_LIBRARIES})
|
||||
|
||||
if(X11_XShm_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_SHM 1)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xext_LIB})
|
||||
endif()
|
||||
|
||||
if(X11_Xcursor_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XCURSOR 1)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xcursor_LIB})
|
||||
endif()
|
||||
|
||||
if(X11_Xcursor_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XCURSOR 1)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xcursor_LIB})
|
||||
endif()
|
||||
|
||||
if(X11_Xpm_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XPM 1)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xpm_LIB})
|
||||
endif()
|
||||
|
||||
find_library(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
|
||||
mark_as_advanced(X11_Xxf86vm_LIB)
|
||||
if(X11_xf86vmode_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XF86VIDMODE 1)
|
||||
list(APPEND PLATFORM_LIBS ${X11_Xxf86vm_LIB})
|
||||
endif()
|
||||
|
||||
check_library_exists(X11 XOpenIM "${X11_LIB_SEARCH_PATH}" XIM_FOUND)
|
||||
if(XIM_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XIM 1)
|
||||
endif(XIM_FOUND)
|
||||
|
||||
check_library_exists(Xxf86dga XDGAQueryExtension
|
||||
"${X11_LIB_SEARCH_PATH}" XDGA_FOUND)
|
||||
if(XDGA_FOUND)
|
||||
set(ALLEGRO_XWINDOWS_WITH_XF86DGA2 1)
|
||||
list(APPEND PLATFORM_LIBS_NON_MODULES Xxf86dga ${X11_LIBRARIES})
|
||||
add_our_module(alleg-dga2 src/x/xdga2.c Xxf86dga ${X11_LIBRARIES})
|
||||
endif()
|
||||
endif(ALLEGRO_WITH_XWINDOWS)
|
||||
|
||||
# -- Linux console --
|
||||
|
||||
option(WANT_LINUX_CONSOLE "Want Linux console support (Linux)" off)
|
||||
option(WANT_LINUX_VGA "Want Linux console VGA driver (Linux)" on)
|
||||
option(WANT_LINUX_FBCON "Want Linux console fbcon driver (Linux)" on)
|
||||
option(WANT_LINUX_SVGALIB "Want Linux console SVGAlib driver (Linux)" on)
|
||||
|
||||
if(WANT_LINUX_CONSOLE AND CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
set(ALLEGRO_LINUX 1)
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_LINUX_FILES})
|
||||
|
||||
if(WANT_LINUX_VGA)
|
||||
set(ALLEGRO_LINUX_VGA 1)
|
||||
add_our_module(alleg-vga src/misc/vga.c)
|
||||
endif()
|
||||
|
||||
if(WANT_LINUX_FBCON)
|
||||
check_c_source_compiles("
|
||||
#include <linux/fb.h>
|
||||
int main(void) {
|
||||
int x = FB_SYNC_ON_GREEN;
|
||||
return 0;
|
||||
}"
|
||||
CAN_FBCON)
|
||||
if(CAN_FBCON)
|
||||
set(ALLEGRO_LINUX_FBCON 1)
|
||||
add_our_module(alleg-fbcon src/linux/fbcon.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WANT_LINUX_SVGALIB)
|
||||
find_package(Svgalib)
|
||||
if(SVGALIB_FOUND)
|
||||
set(ALLEGRO_LINUX_SVGALIB 1)
|
||||
include_directories(SYSTEM ${SVGALIB_INCLUDE_DIR})
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${SVGALIB_LIBRARY})
|
||||
check_c_source_compiles("
|
||||
#include <vga.h>
|
||||
int main(void) {
|
||||
int x = vga_version;
|
||||
return 0;
|
||||
}"
|
||||
ALLEGRO_LINUX_SVGALIB_HAVE_VGA_VERSION)
|
||||
|
||||
list(APPEND PLATFORM_LIBS_NON_MODULES ${SVGALIB_LIBRARY})
|
||||
add_our_module(alleg-svgalib src/linux/svgalib.c
|
||||
${SVGALIB_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
endif(WANT_LINUX_CONSOLE AND CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
|
||||
# -- Windows --
|
||||
|
||||
if(WIN32)
|
||||
find_package(DDraw)
|
||||
find_package(DInput)
|
||||
find_package(DSound)
|
||||
find_package(DXGuid)
|
||||
|
||||
if(NOT DDRAW_FOUND OR NOT DINPUT_FOUND OR NOT DSOUND_FOUND OR NOT DXGUID_FOUND)
|
||||
if(MSVC)
|
||||
message(FATAL_ERROR
|
||||
"DirectX required for Windows port. You might need to add DirectX include and lib directories to your INCLUDE and LIB environment variables.
|
||||
")
|
||||
elseif(MINGW)
|
||||
message(FATAL_ERROR
|
||||
"DirectX required for Windows port. Get it from the Allegro web site (dx80_mgw.zip).")
|
||||
else()
|
||||
message(FATAL_ERROR "DirectX required for Windows port.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM
|
||||
${DDRAW_INCLUDE_DIR}
|
||||
${DINPUT_INCLUDE_DIR}
|
||||
${DSOUND_INCLUDE_DIR}
|
||||
${DXGUID_INCLUDE_DIR}
|
||||
)
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_WIN_FILES})
|
||||
list(APPEND PLATFORM_LIBS
|
||||
kernel32
|
||||
user32
|
||||
gdi32
|
||||
comdlg32
|
||||
ole32
|
||||
${DINPUT_LIBRARIES}
|
||||
${DDRAW_LIBRARIES}
|
||||
${DXGUID_LIBRARIES}
|
||||
winmm
|
||||
${DSOUND_LIBRARIES}
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
# -- Haiku/BeOS --
|
||||
|
||||
if(BEOS)
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_BEOS_FILES})
|
||||
list(APPEND PLATFORM_LIBS game midi device)
|
||||
endif(BEOS)
|
||||
|
||||
# -- Mac OS X --
|
||||
|
||||
if(ALLEGRO_MACOSX)
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_MACOSX_FILES})
|
||||
if(NOT SHARED)
|
||||
list(APPEND PLATFORM_SOURCES src/macosx/main.m)
|
||||
endif(NOT SHARED)
|
||||
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
||||
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
||||
find_package(QuickTime)
|
||||
mark_as_advanced(COCOA_LIBRARY CARBON_LIBRARY IOKIT_LIBRARY)
|
||||
mark_as_advanced(COREAUDIO_LIBRARY AUDIOUNIT_LIBRARY AUDIOTOOLBOX_LIBRARY)
|
||||
mark_as_advanced(QUICKTIME_INCLUDE_DIR QUICKTIME_LIBRARY)
|
||||
|
||||
list(APPEND PLATFORM_LIBS
|
||||
${COCOA_LIBRARY}
|
||||
${CARBON_LIBRARY}
|
||||
${IOKIT_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${AUDIOUNIT_LIBRARY}
|
||||
${AUDIOTOOLBOX_LIBRARY}
|
||||
${QUICKTIME_LIBRARY}
|
||||
)
|
||||
list(APPEND PLATFORM_SOURCES src/macosx/main.m)
|
||||
endif(ALLEGRO_MACOSX)
|
||||
|
||||
# -- PSP --
|
||||
|
||||
if(PSP)
|
||||
include_directories(SYSTEM ${PSPSDK_PATH}/include)
|
||||
link_directories(${PSPSDK_PATH}/lib)
|
||||
list(APPEND PLATFORM_SOURCES ${ALLEGRO_SRC_PSP_FILES})
|
||||
list(APPEND PLATFORM_LIBS
|
||||
m pspaudio pspgu psprtc pspdebug pspdisplay pspge pspctrl pspsdk c pspnet pspnet_inet pspnet_resolver psputility pspuser pspkernel)
|
||||
endif(PSP)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
@ -742,11 +440,6 @@ else()
|
||||
set(BUILD_TYPE_SUFFIX "")
|
||||
endif()
|
||||
|
||||
if(ALLEGRO_MODULES_PATH)
|
||||
set(ALLEGRO_MODULES_PATH_FLAG
|
||||
"-DALLEGRO_MODULES_PATH='\"${ALLEGRO_MODULES_PATH}\"'")
|
||||
endif(ALLEGRO_MODULES_PATH)
|
||||
|
||||
if(APPLE)
|
||||
# CMake 2.6.2 onwards passes these flags automatically.
|
||||
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STREQUAL 2.6 AND
|
||||
@ -763,15 +456,11 @@ add_our_library(allegro
|
||||
${ALLEGRO_PUBLIC_HEADERS}
|
||||
)
|
||||
|
||||
if(WIN32 AND SHARED)
|
||||
set(allegro_OUTPUT_NAME alleg${ALLEGRO_DLL_SHORTVER})
|
||||
else()
|
||||
set(allegro_OUTPUT_NAME alleg)
|
||||
endif()
|
||||
set(allegro_OUTPUT_NAME alleg)
|
||||
|
||||
set_target_properties(allegro
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-DALLEGRO_SRC ${ALLEGRO_MODULES_PATH_FLAG}"
|
||||
COMPILE_FLAGS "-DALLEGRO_SRC"
|
||||
LINK_FLAGS "${ALLEGRO_LINK_FLAGS}"
|
||||
OUTPUT_NAME ${allegro_OUTPUT_NAME}
|
||||
VERSION ${ALLEGRO_VERSION}
|
||||
@ -779,32 +468,19 @@ set_target_properties(allegro
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(SHARED)
|
||||
# Make mingw not add lib prefix to DLL, to match MSVC.
|
||||
set_target_properties(allegro
|
||||
PROPERTIES
|
||||
PREFIX ""
|
||||
)
|
||||
else(SHARED)
|
||||
# Add a -static postfix on the main library for Windows.
|
||||
# In earlier versions of Allegro this was "_s".
|
||||
set_target_properties(allegro
|
||||
PROPERTIES
|
||||
POSTFIX "-static"
|
||||
DEBUG_POSTFIX "-debug-static"
|
||||
PROFILE_POSTFIX "-profile-static"
|
||||
)
|
||||
endif(SHARED)
|
||||
# Add a -static postfix on the main library for Windows.
|
||||
# In earlier versions of Allegro this was "_s".
|
||||
set_target_properties(allegro
|
||||
PROPERTIES
|
||||
POSTFIX "-static"
|
||||
DEBUG_POSTFIX "-debug-static"
|
||||
PROFILE_POSTFIX "-profile-static"
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
set_our_framework_properties(allegro Allegro)
|
||||
|
||||
set(link_with ${PLATFORM_LIBS})
|
||||
if(ALLEGRO_WITH_MODULES)
|
||||
list(APPEND link_with ${PLATFORM_LIBS_MODULES})
|
||||
else()
|
||||
list(APPEND link_with ${PLATFORM_LIBS_NON_MODULES})
|
||||
endif()
|
||||
target_link_libraries(allegro ${link_with})
|
||||
|
||||
sanitize_cmake_link_flags(static_link_with ${link_with})
|
||||
@ -813,12 +489,7 @@ set_target_properties(allegro
|
||||
static_link_with "${static_link_with}"
|
||||
)
|
||||
|
||||
install_our_library(allegro)
|
||||
if(NOT WANT_FRAMEWORKS)
|
||||
install_our_headers(${ALLEGRO_PUBLIC_HEADERS})
|
||||
endif(NOT WANT_FRAMEWORKS)
|
||||
|
||||
if(APPLE AND SHARED OR WANT_FRAMEWORKS)
|
||||
if(WANT_FRAMEWORKS)
|
||||
add_our_library(alleg-main STATIC
|
||||
src/macosx/main.m
|
||||
)
|
||||
@ -828,8 +499,7 @@ if(APPLE AND SHARED OR WANT_FRAMEWORKS)
|
||||
COMPILE_FLAGS -DALLEGRO_SRC
|
||||
)
|
||||
target_link_libraries(allegro alleg-main)
|
||||
install_our_library(alleg-main)
|
||||
endif(APPLE AND SHARED OR WANT_FRAMEWORKS)
|
||||
endif(WANT_FRAMEWORKS)
|
||||
|
||||
if(PSP)
|
||||
add_our_library(alleg-main STATIC
|
||||
@ -842,52 +512,6 @@ if(PSP)
|
||||
)
|
||||
target_link_libraries(alleg-main pspuser pspkernel)
|
||||
target_link_libraries(allegro alleg-main)
|
||||
install_our_library(alleg-main)
|
||||
endif(PSP)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
#
|
||||
# allegro-config script
|
||||
#
|
||||
|
||||
if(UNIX) # including MACOSX
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(INCLUDE_PREFIX "${CMAKE_INSTALL_PREFIX}") # not sure what this is
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(LINK_WITH_STATIC_LIBS no)
|
||||
else()
|
||||
set(LINK_WITH_STATIC_LIBS yes)
|
||||
endif()
|
||||
set(LIB_TO_LINK alleg${BUILD_TYPE_SUFFIX})
|
||||
if(APPLE)
|
||||
set(LDFLAGS "-framework Cocoa -lalleg-main")
|
||||
else(APPLE)
|
||||
set(LDFLAGS "")
|
||||
endif(APPLE)
|
||||
sanitize_cmake_link_flags(LIBS
|
||||
${PLATFORM_LIBS}
|
||||
${PLATFORM_LIBS_NON_MODULES}
|
||||
${PLATFORM_LIBS_MODULES}
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
# XXX untested
|
||||
set(ACCEPT_FRAMEWORKS yes)
|
||||
set(FRAMEWORKS "-framework Cocoa -framework Allegro -lalleg-main${BUILD_TYPE_SUFFIX}")
|
||||
else()
|
||||
set(ACCEPT_FRAMEWORKS no)
|
||||
set(FRAMEWORKS "")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/misc/allegro-config.in
|
||||
${CMAKE_BINARY_DIR}/allegro-config
|
||||
@ONLY
|
||||
)
|
||||
|
||||
install(PROGRAMS ${CMAKE_BINARY_DIR}/allegro-config
|
||||
DESTINATION bin
|
||||
)
|
||||
endif(UNIX)
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
@ -1,73 +0,0 @@
|
||||
# - Find Open Sound System
|
||||
#
|
||||
# OSS_FOUND - True if OSS headers found.
|
||||
|
||||
# This file is Allegro-specific and requires the following variables to be
|
||||
# set elsewhere:
|
||||
# ALLEGRO_HAVE_MACHINE_SOUNDCARD_H
|
||||
# ALLEGRO_HAVE_LINUX_SOUNDCARD_H
|
||||
# ALLEGRO_HAVE_SYS_SOUNDCARD_H
|
||||
# ALLEGRO_HAVE_SOUNDCARD_H
|
||||
|
||||
|
||||
if(OSS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OSS_FIND_QUIETLY TRUE)
|
||||
endif(OSS_INCLUDE_DIR)
|
||||
|
||||
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||
|
||||
if(ALLEGRO_HAVE_SOUNDCARD_H OR ALLEGRO_HAVE_SYS_SOUNDCARD_H OR
|
||||
ALLEGRO_HAVE_MACHINE_SOUNDCARD_H OR ALLEGRO_LINUX_SYS_SOUNDCARD_H)
|
||||
|
||||
if(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -DALLEGRO_HAVE_MACHINE_SOUNDCARD_H)
|
||||
endif(ALLEGRO_HAVE_MACHINE_SOUNDCARD_H)
|
||||
|
||||
if(ALLEGRO_HAVE_LINUX_SOUNDCARD_H)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
-DALLEGRO_HAVE_LINUX_SOUNDCARD_H)
|
||||
endif(ALLEGRO_HAVE_LINUX_SOUNDCARD_H)
|
||||
|
||||
if(ALLEGRO_HAVE_SYS_SOUNDCARD_H)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
-DALLEGRO_HAVE_SYS_SOUNDCARD_H)
|
||||
endif(ALLEGRO_HAVE_SYS_SOUNDCARD_H)
|
||||
|
||||
if(ALLEGRO_HAVE_SOUNDCARD_H)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
-DALLEGRO_HAVE_SOUNDCARD_H)
|
||||
endif(ALLEGRO_HAVE_SOUNDCARD_H)
|
||||
|
||||
check_c_source_compiles("
|
||||
#ifdef ALLEGRO_HAVE_SOUNDCARD_H
|
||||
#include <soundcard.h>
|
||||
#endif
|
||||
#ifdef ALLEGRO_HAVE_SYS_SOUNDCARD_H
|
||||
#include <sys/soundcard.h>
|
||||
#endif
|
||||
#ifdef ALLEGRO_HAVE_LINUX_SOUNDCARD_H
|
||||
#include <linux/soundcard.h>
|
||||
#endif
|
||||
#ifdef ALLEGRO_HAVE_MACHINE_SOUNDCARD_H
|
||||
#include <machine/soundcard.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
audio_buf_info abi;
|
||||
return 0;
|
||||
}"
|
||||
OSS_COMPILES
|
||||
)
|
||||
|
||||
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||
|
||||
endif(ALLEGRO_HAVE_SOUNDCARD_H OR ALLEGRO_HAVE_SYS_SOUNDCARD_H OR
|
||||
ALLEGRO_HAVE_MACHINE_SOUNDCARD_H OR ALLEGRO_LINUX_SYS_SOUNDCARD_H)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OSS_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OSS DEFAULT_MSG
|
||||
OSS_COMPILES)
|
||||
|
||||
mark_as_advanced(OSS_COMPILES)
|
@ -1,21 +0,0 @@
|
||||
# - Find svgalib
|
||||
#
|
||||
# SVGALIB_INCLUDE_DIR - where to find vga.h, etc.
|
||||
# SVGALIB_LIBRARIES - List of libraries when using svgalib.
|
||||
# SVGALIB_FOUND - True if vorbis found.
|
||||
|
||||
if(SVGALIB_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(SVGALIB_FIND_QUIETLY TRUE)
|
||||
endif(SVGALIB_INCLUDE_DIR)
|
||||
find_path(SVGALIB_INCLUDE_DIR vga.h)
|
||||
find_library(SVGALIB_LIBRARY NAMES vga)
|
||||
# Handle the QUIETLY and REQUIRED arguments and set SVGALIB_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(SVGALIB DEFAULT_MSG
|
||||
SVGALIB_INCLUDE_DIR SVGALIB_LIBRARY)
|
||||
|
||||
mark_as_advanced(SVGALIB_INCLUDE_DIR)
|
||||
mark_as_advanced(SVGALIB_LIBRARY)
|
||||
|
@ -1,44 +0,0 @@
|
||||
# - Find vorbis
|
||||
# Find the native vorbis includes and libraries
|
||||
#
|
||||
# VORBIS_INCLUDE_DIR - where to find vorbis.h, etc.
|
||||
# VORBIS_LIBRARIES - List of libraries when using vorbis(file).
|
||||
# VORBIS_FOUND - True if vorbis found.
|
||||
|
||||
if(NOT GP2XWIZ)
|
||||
if(VORBIS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(VORBIS_FIND_QUIETLY TRUE)
|
||||
endif(VORBIS_INCLUDE_DIR)
|
||||
find_path(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
|
||||
find_library(OGG_LIBRARY NAMES ogg)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis)
|
||||
find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(VORBIS DEFAULT_MSG
|
||||
OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR
|
||||
OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
|
||||
else(NOT GP2XWIZ)
|
||||
find_path(VORBIS_INCLUDE_DIR tremor/ivorbisfile.h)
|
||||
find_library(VORBIS_LIBRARY NAMES vorbis_dec)
|
||||
find_package_handle_standard_args(VORBIS DEFAULT_MSG
|
||||
VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
|
||||
endif(NOT GP2XWIZ)
|
||||
|
||||
if(VORBIS_FOUND)
|
||||
if(NOT GP2XWIZ)
|
||||
set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}
|
||||
${OGG_LIBRARY})
|
||||
else(NOT GP2XWIZ)
|
||||
set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
|
||||
endif(NOT GP2XWIZ)
|
||||
else(VORBIS_FOUND)
|
||||
set(VORBIS_LIBRARIES)
|
||||
endif(VORBIS_FOUND)
|
||||
|
||||
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR)
|
||||
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
|
||||
|
@ -1,12 +0,0 @@
|
||||
# List of modules to be loaded by the Unix version of Allegro.
|
||||
|
||||
alleg-vga.so
|
||||
alleg-fbcon.so
|
||||
alleg-svgalib.so
|
||||
alleg-dga2.so
|
||||
alleg-esddigi.so
|
||||
alleg-artsdigi.so
|
||||
alleg-sgialdigi.so
|
||||
alleg-alsadigi.so
|
||||
alleg-alsamidi.so
|
||||
alleg-jackdigi.so
|
Loading…
x
Reference in New Issue
Block a user