mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Merge branch 'wip/android' of https://github.com/krzys-h/planetblupi into krzys-h-wip/android
This commit is contained in:
commit
815cf73e1a
@ -9,6 +9,7 @@ include (${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
|||||||
|
|
||||||
include_directories (${CMAKE_INSTALL_PREFIX}/include)
|
include_directories (${CMAKE_INSTALL_PREFIX}/include)
|
||||||
link_directories (${CMAKE_INSTALL_PREFIX}/lib)
|
link_directories (${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_INSTALL_PREFIX}") # This is required when cross-compiling
|
||||||
|
|
||||||
project (planetblupi)
|
project (planetblupi)
|
||||||
set (PB_VERSION_MAJOR 1)
|
set (PB_VERSION_MAJOR 1)
|
||||||
@ -23,6 +24,10 @@ set (PB_DESCRIPTION "Planet Blupi - A delirious spell-binding game")
|
|||||||
|
|
||||||
option (PB_HTTP_VERSION_CHECK "Run a version check over HTTP (with CURL)" OFF)
|
option (PB_HTTP_VERSION_CHECK "Run a version check over HTTP (with CURL)" OFF)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wno-error=c++11-narrowing ${CMAKE_CXX_FLAGS}") # TODO: FIXME in fog.cxx
|
||||||
|
|
||||||
|
option (ANDROID "Enable when building for Android" OFF)
|
||||||
|
|
||||||
configure_file (
|
configure_file (
|
||||||
"${PROJECT_SOURCE_DIR}/src/config.h.in"
|
"${PROJECT_SOURCE_DIR}/src/config.h.in"
|
||||||
"${PROJECT_BINARY_DIR}/include/config.h"
|
"${PROJECT_BINARY_DIR}/include/config.h"
|
||||||
@ -144,7 +149,7 @@ if ("${STATIC_BUILD}")
|
|||||||
# Statis dependencies for SDL_mixer
|
# Statis dependencies for SDL_mixer
|
||||||
pkg_search_module (VORBIS REQUIRED vorbisfile)
|
pkg_search_module (VORBIS REQUIRED vorbisfile)
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
pkg_search_module (ALSA REQUIRED alsa)
|
pkg_search_module (ALSA REQUIRED alsa)
|
||||||
pkg_search_module (PULSE REQUIRED libpulse)
|
pkg_search_module (PULSE REQUIRED libpulse)
|
||||||
endif ()
|
endif ()
|
||||||
@ -158,7 +163,11 @@ endif ()
|
|||||||
## Main binary dependencies
|
## Main binary dependencies
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
add_executable (planetblupi ${sources})
|
if (ANDROID)
|
||||||
|
add_library (planetblupi STATIC ${sources})
|
||||||
|
else ()
|
||||||
|
add_executable (planetblupi ${sources})
|
||||||
|
endif ()
|
||||||
|
|
||||||
if ("${STATIC_BUILD}")
|
if ("${STATIC_BUILD}")
|
||||||
set (planetblupi_DEPS
|
set (planetblupi_DEPS
|
||||||
@ -183,7 +192,7 @@ if ("${STATIC_BUILD}")
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
list (APPEND planetblupi_DEPS
|
list (APPEND planetblupi_DEPS
|
||||||
${ALSA_STATIC_LIBRARIES}
|
${ALSA_STATIC_LIBRARIES}
|
||||||
${PULSE_STATIC_LIBRARIES}
|
${PULSE_STATIC_LIBRARIES}
|
||||||
@ -251,6 +260,9 @@ endforeach (file)
|
|||||||
##############
|
##############
|
||||||
|
|
||||||
install (TARGETS planetblupi
|
install (TARGETS planetblupi
|
||||||
|
# TODO: merge conflict
|
||||||
|
#RUNTIME DESTINATION bin
|
||||||
|
#ARCHIVE DESTINATION lib
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user