mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Avoid making assumptions about location of SDL2 headers
It is not an API guarantee that the SDL2 headers will be found in ${prefix}/include/SDL2, or that SDL2 is installed in the same prefix as planetblupi itself. Ask pkg-config instead. Signed-off-by: Simon McVittie <smcv@debian.org> Bug-Debian: https://bugs.debian.org/952105 Forwarded: no
This commit is contained in:
parent
a8a4e00d13
commit
bc6fe4b150
@ -9,7 +9,6 @@ include (${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
|||||||
include ("${CMAKE_SOURCE_DIR}/cmake/Ronn2Man.cmake")
|
include ("${CMAKE_SOURCE_DIR}/cmake/Ronn2Man.cmake")
|
||||||
|
|
||||||
include_directories (${CMAKE_INSTALL_PREFIX}/include)
|
include_directories (${CMAKE_INSTALL_PREFIX}/include)
|
||||||
include_directories (${CMAKE_INSTALL_PREFIX}/include/SDL2)
|
|
||||||
link_directories (${CMAKE_INSTALL_PREFIX}/lib)
|
link_directories (${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
|
||||||
project (planetblupi)
|
project (planetblupi)
|
||||||
@ -153,10 +152,13 @@ include_directories (${SDLKitchensink_INCLUDE_DIRS})
|
|||||||
find_package (PkgConfig REQUIRED)
|
find_package (PkgConfig REQUIRED)
|
||||||
if (NOT BUILD_JS)
|
if (NOT BUILD_JS)
|
||||||
pkg_search_module (SDL2 REQUIRED sdl2)
|
pkg_search_module (SDL2 REQUIRED sdl2)
|
||||||
|
include_directories (${SDL2_INCLUDE_DIRS})
|
||||||
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_STATIC_LIBRARIES})
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_STATIC_LIBRARIES})
|
||||||
pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
|
pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
|
||||||
|
include_directories (${SDL2_IMAGE_INCLUDE_DIRS})
|
||||||
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_IMAGE_STATIC_LIBRARIES})
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_IMAGE_STATIC_LIBRARIES})
|
||||||
pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
|
pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
|
||||||
|
include_directories (${SDL2_MIXER_INCLUDE_DIRS})
|
||||||
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_MIXER_STATIC_LIBRARIES})
|
set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_MIXER_STATIC_LIBRARIES})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user