mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Add cmake stuff for retrieving SDL_kitchensink library
It fixes issue #1.
This commit is contained in:
parent
e68870b22b
commit
102e87d434
@ -99,6 +99,7 @@ set (CMAKE_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib)
|
|||||||
find_package (Intl REQUIRED)
|
find_package (Intl REQUIRED)
|
||||||
find_package (Iconv REQUIRED)
|
find_package (Iconv REQUIRED)
|
||||||
find_package (Argagg REQUIRED)
|
find_package (Argagg REQUIRED)
|
||||||
|
find_package (SDLKitchensink REQUIRED)
|
||||||
|
|
||||||
find_package (PkgConfig REQUIRED)
|
find_package (PkgConfig REQUIRED)
|
||||||
pkg_search_module (SDL2 REQUIRED sdl2)
|
pkg_search_module (SDL2 REQUIRED sdl2)
|
||||||
@ -120,13 +121,6 @@ endif ()
|
|||||||
|
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB")
|
||||||
|
|
||||||
##################
|
|
||||||
## SDL_kitchensink
|
|
||||||
##################
|
|
||||||
|
|
||||||
add_library (SDL_kitchensink STATIC IMPORTED)
|
|
||||||
set_property (TARGET SDL_kitchensink PROPERTY IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libSDL_kitchensink_static.a)
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
## Main binary dependencies
|
## Main binary dependencies
|
||||||
###########################
|
###########################
|
||||||
@ -140,7 +134,7 @@ set (planetblupi_DEPS
|
|||||||
${SDL2_MIXER_STATIC_LIBRARIES}
|
${SDL2_MIXER_STATIC_LIBRARIES}
|
||||||
${SDL2_IMAGE_STATIC_LIBRARIES}
|
${SDL2_IMAGE_STATIC_LIBRARIES}
|
||||||
${CURL_STATIC_LIBRARIES}
|
${CURL_STATIC_LIBRARIES}
|
||||||
SDL_kitchensink
|
${SDLKitchensink_STATIC_LIBRARIES}
|
||||||
${PNG_STATIC_LIBRARIES}
|
${PNG_STATIC_LIBRARIES}
|
||||||
${AVCODEC_STATIC_LIBRARIES}
|
${AVCODEC_STATIC_LIBRARIES}
|
||||||
${AVFORMAT_STATIC_LIBRARIES}
|
${AVFORMAT_STATIC_LIBRARIES}
|
||||||
|
58
cmake/FindSDLKitchensink.cmake
Normal file
58
cmake/FindSDLKitchensink.cmake
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||||
|
|
||||||
|
#.rst:
|
||||||
|
# FindSDLKitchensink
|
||||||
|
# --------
|
||||||
|
#
|
||||||
|
# Find the libsdlkitchensink headers and libraries.
|
||||||
|
#
|
||||||
|
# This module reports information about the libsdlkitchensink
|
||||||
|
# installation in several variables. General variables::
|
||||||
|
#
|
||||||
|
# SDLKitchensink_FOUND - true if the libsdlkitchensink headers and libraries were found
|
||||||
|
# SDLKitchensink_INCLUDE_DIRS - the directory containing the libsdlkitchensink headers
|
||||||
|
# SDLKitchensink_LIBRARIES - libsdlkitchensink libraries to be linked
|
||||||
|
#
|
||||||
|
# The following cache variables may also be set::
|
||||||
|
#
|
||||||
|
# SDLKitchensink_INCLUDE_DIR - the directory containing the libsdlkitchensink headers
|
||||||
|
# SDLKitchensink_LIBRARY - the libsdlkitchensink library (if any)
|
||||||
|
|
||||||
|
|
||||||
|
# Based on FindIconv written by Roger Leigh <rleigh@codelibre.net>
|
||||||
|
|
||||||
|
# Find include directory
|
||||||
|
find_path(SDLKitchensink_INCLUDE_DIR
|
||||||
|
NAMES "kitchensink/kitchensink.h"
|
||||||
|
DOC "libsdlkitchensink include directory")
|
||||||
|
mark_as_advanced(SDLKitchensink_INCLUDE_DIR)
|
||||||
|
|
||||||
|
# Find all SDLKitchensink libraries
|
||||||
|
find_library(SDLKitchensink_LIBRARY
|
||||||
|
NAMES SDL_kitchensink
|
||||||
|
DOC "libsdlkitchensink libraries)")
|
||||||
|
find_library(SDLKitchensink_STATIC_LIBRARY
|
||||||
|
NAMES SDL_kitchensink_static
|
||||||
|
DOC "libsdlkitchensink static libraries)")
|
||||||
|
mark_as_advanced(SDLKitchensink_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLKitchensink
|
||||||
|
FOUND_VAR SDLKitchensink_FOUND
|
||||||
|
REQUIRED_VARS SDLKitchensink_INCLUDE_DIR
|
||||||
|
FAIL_MESSAGE "Failed to find libsdlkitchensink")
|
||||||
|
|
||||||
|
if(SDLKitchensink_FOUND)
|
||||||
|
set(SDLKitchensink_INCLUDE_DIRS "${SDLKitchensink_INCLUDE_DIR}")
|
||||||
|
if(SDLKitchensink_LIBRARY)
|
||||||
|
set(SDLKitchensink_LIBRARIES "${SDLKitchensink_LIBRARY}")
|
||||||
|
else()
|
||||||
|
unset(SDLKitchensink_LIBRARIES)
|
||||||
|
endif()
|
||||||
|
if(SDLKitchensink_STATIC_LIBRARY)
|
||||||
|
set(SDLKitchensink_STATIC_LIBRARIES "${SDLKitchensink_STATIC_LIBRARY}")
|
||||||
|
else()
|
||||||
|
unset(SDLKitchensink_STATIC_LIBRARIES)
|
||||||
|
endif()
|
||||||
|
endif()
|
Loading…
x
Reference in New Issue
Block a user