author | unc0rr |
Wed, 26 Sep 2012 11:36:41 +0400 | |
changeset 7711 | 98b56578b9ba |
parent 7707 | e7e7b2082f44 |
child 7817 | 6cc558a69b58 |
permissions | -rw-r--r-- |
5019 | 1 |
#if the headers are not installed, the newer apis won't be activated |
2 |
||
3 |
#find which version of SDL_mixer we have (for Mix_Init) |
|
4 |
find_file(sdlmixer_h SDL_mixer.h ${SDLMIXER_INCLUDE_DIR}) |
|
5 |
if(sdlmixer_h) |
|
6 |
file(STRINGS ${sdlmixer_h} sdlmixer_majorversion_tmp REGEX "SDL_MIXER_MAJOR_VERSION[\t' ']+[0-9]+") |
|
7 |
file(STRINGS ${sdlmixer_h} sdlmixer_minorversion_tmp REGEX "SDL_MIXER_MINOR_VERSION[\t' ']+[0-9]+") |
|
8 |
file(STRINGS ${sdlmixer_h} sdlmixer_patchversion_tmp REGEX "SDL_MIXER_PATCHLEVEL[\t' ']+[0-9]+") |
|
9 |
string(REGEX MATCH ".([0-9]+)" sdlmixer_majorversion "${sdlmixer_majorversion_tmp}") |
|
10 |
string(REGEX MATCH ".([0-9]+)" sdlmixer_minorversion "${sdlmixer_minorversion_tmp}") |
|
11 |
string(REGEX MATCH ".([0-9]+)" sdlmixer_patchversion "${sdlmixer_patchversion_tmp}") |
|
12 |
math(EXPR sdlmixer_version "${sdlmixer_majorversion}*10000 + ${sdlmixer_minorversion}*100 + ${sdlmixer_patchversion}") |
|
13 |
||
14 |
if(sdlmixer_version GREATER "10209") |
|
7707
e7e7b2082f44
sdl_extras updated/fixed (is this file still needed?)
koda
parents:
6613
diff
changeset
|
15 |
message(STATUS "SDL_mixer - Mix_Init() found") |
e7e7b2082f44
sdl_extras updated/fixed (is this file still needed?)
koda
parents:
6613
diff
changeset
|
16 |
set(pascal_flags "-dSDL_MIXER_NEWER" ${pascal_flags}) |
5019 | 17 |
endif() |
18 |
endif() |
|
19 |
||
20 |
#find which version of SDL_image we have (for IMG_Init) |
|
21 |
find_file(sdlimage_h SDL_image.h ${SDLIMAGE_INCLUDE_DIR}) |
|
22 |
if(sdlimage_h) |
|
23 |
file(STRINGS ${sdlimage_h} sdlimage_majorversion_tmp REGEX "SDL_IMAGE_MAJOR_VERSION[\t' ']+[0-9]+") |
|
24 |
file(STRINGS ${sdlimage_h} sdlimage_minorversion_tmp REGEX "SDL_IMAGE_MINOR_VERSION[\t' ']+[0-9]+") |
|
25 |
file(STRINGS ${sdlimage_h} sdlimage_patchversion_tmp REGEX "SDL_IMAGE_PATCHLEVEL[\t' ']+[0-9]+") |
|
26 |
string(REGEX MATCH ".([0-9]+)" sdlimage_majorversion "${sdlimage_majorversion_tmp}") |
|
27 |
string(REGEX MATCH ".([0-9]+)" sdlimage_minorversion "${sdlimage_minorversion_tmp}") |
|
28 |
string(REGEX MATCH ".([0-9]+)" sdlimage_patchversion "${sdlimage_patchversion_tmp}") |
|
29 |
math(EXPR sdlimage_version "${sdlimage_majorversion}*10000 + ${sdlimage_minorversion}*100 + ${sdlimage_patchversion}") |
|
30 |
||
31 |
if(sdlimage_version GREATER "010207") |
|
7707
e7e7b2082f44
sdl_extras updated/fixed (is this file still needed?)
koda
parents:
6613
diff
changeset
|
32 |
message(STATUS "SDL_image - IMG_Init() found") |
e7e7b2082f44
sdl_extras updated/fixed (is this file still needed?)
koda
parents:
6613
diff
changeset
|
33 |
set(pascal_flags "-dSDL_IMAGE_NEWER" ${pascal_flags}) |
5019 | 34 |
endif() |
35 |
endif() |
|
36 |